Skip to content

Commit changes to workspace member TOML files#15142

Open
crabbit-git wants to merge 1 commit into
dependabot:mainfrom
crabbit-git:fix/uv-workspace-member-conflict
Open

Commit changes to workspace member TOML files#15142
crabbit-git wants to merge 1 commit into
dependabot:mainfrom
crabbit-git:fix/uv-workspace-member-conflict

Conversation

@crabbit-git
Copy link
Copy Markdown

@crabbit-git crabbit-git commented May 26, 2026

What are you trying to accomplish?

Fix issue #14937, at least to the extent that CI pipelines containing uv sync --locked no longer fail when workspace members (as opposed to top-level pyproject.toml) have their dependencies updated by Dependabot.

The problem appears to be that the implementation of PR #14627 achieves its dependency updates for workspace members by editing the member pyproject.toml files but not actually committing them because their support_file is true. This is flawed because it results in the requires-dist metadata inside uv.lock being updated to match the edited requirements imposed by the TOML edits, which creates a conflict between the actually committed TOML and uv.lock, causing any uv sync --locked in CI pipelines to fail.

There is another thing that might be wrong which affects the repo I noticed this happening in: as I said on the issue, I believe the TOML shouldn't even be getting touched for these kinds of updates when the versioning strategy is set to "bump versions when necessary", as opposed to the default "bump versions". It should therefore be updating the TOML files relatively infrequently. Instead, it seems that it is falling back to the default strategy, causing it to update the TOML (even though, due to the aforementioned bug, it never commits said TOML) every time it updates something in the lock file. This may be out of scope for the PR and may not even reside in this repo so I'm not going to try to address it here for the time being; the much more urgent problem is the CI failures caused by this mismatch between different parts of the lock file and between the lock file and the TOML.

How will you know you've accomplished your goal?

I manually replicated the approach taken by Dependabot against the uv repo that I noticed the problem in to verify that uv sync --locked passes while the temp-edited inner .toml file exists but fails once it is purged (simulating Dependabot's flow failing to commit it due to support_file = true).

Unfortunately, it appears that I will be unable to run the kind of testing I would prefer, because that would require x86 architecture and the only machine I currently have on hand is ARM. I'm therefore having to trust a mix of CI and manual sanity checking to confirm that this has worked and does not have unintended impact. If anybody has access to x86 and is able and willing to run the testing on their end (ideally including running the script to dry-run it on an example repo), I would be very grateful for the assist.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@crabbit-git crabbit-git requested a review from a team as a code owner May 26, 2026 10:29
@crabbit-git crabbit-git force-pushed the fix/uv-workspace-member-conflict branch 3 times, most recently from cf0e09c to ce6da5c Compare May 26, 2026 10:32
@crabbit-git crabbit-git force-pushed the fix/uv-workspace-member-conflict branch from ce6da5c to cf0e09c Compare May 26, 2026 13:18
This is necessary to avoid conflicts between uv.lock requires-dist and
pyproject.toml.
@crabbit-git crabbit-git force-pushed the fix/uv-workspace-member-conflict branch from cf0e09c to 5eb5a76 Compare May 26, 2026 13:19
@crabbit-git
Copy link
Copy Markdown
Author

crabbit-git commented May 26, 2026

This passed all CI when I rebased and pushed it earlier, including the build stage. Somebody re-triggered it after that and the build stage failed with a "suspended account" error. Rebasing again to see if it works this time. EDIT: passed again.

@robaiken robaiken self-assigned this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metadata requires-dist floor raised in uv.lock even though it wasn't changed in pyproject.toml

2 participants