Commit changes to workspace member TOML files#15142
Open
crabbit-git wants to merge 1 commit into
Open
Conversation
cf0e09c to
ce6da5c
Compare
1 task
ce6da5c to
cf0e09c
Compare
This is necessary to avoid conflicts between uv.lock requires-dist and pyproject.toml.
cf0e09c to
5eb5a76
Compare
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
Fix issue #14937, at least to the extent that CI pipelines containing
uv sync --lockedno longer fail when workspace members (as opposed to top-levelpyproject.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.tomlfiles but not actually committing them because theirsupport_fileistrue. This is flawed because it results in therequires-distmetadata insideuv.lockbeing updated to match the edited requirements imposed by the TOML edits, which creates a conflict between the actually committed TOML anduv.lock, causing anyuv sync --lockedin 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 --lockedpasses while the temp-edited inner .toml file exists but fails once it is purged (simulating Dependabot's flow failing to commit it due tosupport_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