Skip to content

Ensure publish to crates.io is idempotent#19361

Merged
zanieb merged 1 commit into
mainfrom
zb/crates-idempotent
May 11, 2026
Merged

Ensure publish to crates.io is idempotent#19361
zanieb merged 1 commit into
mainfrom
zb/crates-idempotent

Conversation

@zanieb

@zanieb zanieb commented May 11, 2026

Copy link
Copy Markdown
Member

No description provided.

@zanieb zanieb force-pushed the zb/crates-idempotent branch from b5d33dd to 6d8c0f3 Compare May 11, 2026 14:48
@zanieb zanieb marked this pull request as ready for review May 11, 2026 14:57
Comment thread scripts/publish/test_publish_crates.py Outdated
@@ -0,0 +1,70 @@
import importlib.util

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I think I'll remove this file. I don't want tests Codex is just insistent

Co-authored-by: Codex <noreply@openai.com>
@zanieb zanieb force-pushed the zb/crates-idempotent branch from 6d8c0f3 to a813d96 Compare May 11, 2026 15:05
Comment thread scripts/publish/test_publish_crates.py Outdated
import sys
import unittest

REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent.parent

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate these, would much prefer git rev-parse --show-toplevel

Comment thread scripts/publish/test_publish_crates.py Outdated
Comment thread scripts/publish-crates.py
CRATES_IO_API = "https://crates.io/api/v1"
USER_AGENT = "uv-crates-io-publish (github.com/astral-sh/uv)"

REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing here, git parse-rev --show-repo-root

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm this is a standard pattern in our Python scripts today. I'm not sure it should require git.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's revisit it separately, if that's okay?

Comment thread scripts/publish/test_publish_crates.py Outdated
@@ -0,0 +1,70 @@
import importlib.util

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add this to CI?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naw I'm deleting it it's silly. I didn't mean to commit it.

@zanieb zanieb enabled auto-merge (squash) May 11, 2026 15:40
@zanieb zanieb merged commit 96b43af into main May 11, 2026
101 of 103 checks passed
@zanieb zanieb deleted the zb/crates-idempotent branch May 11, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants