Relock uv.lock after the version bump, and run CI on develop pushes - #78
Conversation
a086ca6 raised the version to 0.1.0 in pyproject.toml without relocking, so uv.lock still records 0.0.1 for this package and `uv lock --check` fails. develop is red on that step right now, and so is every pull request based on it. One line. This is the check #62 added, working as intended. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
The stale lockfile in the previous commit reached develop and stayed red without anyone seeing it, because the workflow only triggers on pushes to main and on pull requests. A direct push to develop runs nothing. A pull request that targets develop still fires on pull_request alone, so this does not double up the ordinary case. It does double up one case: #61 has develop as its head branch, so a push to develop now produces both a push run and a synchronize run for #61. Those are not the same tree, since the pull request run tests develop merged into main, and the concurrency key keys on the ref so neither cancels the other. That seems worth the extra run rather than something to suppress. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
c8865f3 to
4420121
Compare
|
Took all three points; they were all mine to fix and none needed a code change. The workflow comment now describes the lasting reason rather than the state before the change, and no longer points at a lockfile that is not in that file. The no-duplicate-runs claim is corrected in both the commit message and the body: it holds for a pull request targeting develop and not for one whose head is develop, which is #61. The body now also says that merging this will not turn the other pull requests green by itself, since One premise worth recording as checked rather than assumed: the note about #75 renaming |
A plain uv sync rewrites uv.lock when it no longer matches, so a checkout that has drifted quietly becomes a working environment that is no longer the released one. That is the failure this section exists to prevent, and it has happened twice already: #62 and #78 both landed because a submodule bump left the lockfile stale. --locked stops and says so instead. Verified both ways: it exits 0 on a clean release checkout, and on a lockfile that no longer matches it refuses with 'the lockfile at uv.lock needs to be updated, but --locked was provided'. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
developis red right now, and so is every pull request based on it.a086ca6raised the version to0.1.0inpyproject.tomlwithout relocking, souv.lockstill records0.0.1for this package:uv lock --checkfails on that, which is the step #62 added and it is working as intended. The fix is one line.I confirmed it is
developitself rather than anything downstream: checking outdevelop's files into a clean tree and runninguv lock --checkfails the same way.Why nobody saw it
The workflow triggers on
push: branches: [main]and onpull_request. A direct push todevelopruns nothing at all, so a commit can sit there red until the next pull request inherits it.The second commit adds
developto the push trigger. Drop it if you would rather keep the trigger as it is; the relock alone unblocks everything.I had written that this adds no duplicate runs. That is true for a pull request targeting develop, and wrong for one whose head is develop, which is exactly what #61 is. A push to develop will now produce both a push run and a
synchronizerun for #61. They are not the same tree, since the pull request run tests develop merged into main, and the concurrency key is on the ref so neither cancels the other. Worth the extra run rather than something to suppress, but the claim was too broad and the commit message now says so.After this merges
The other open pull requests will not go green on their own.
pull_requestfires on head changes, not base changes, so their existing red runs stay as they are until each head branch is updated, rebased, or the pull request is reopened. Re-running the old job does not help either, since it pins the merge commit that was computed against the broken base.#61 is the exception: develop is its head, so merging this updates it directly.
@zuorenchen this one is worth taking ahead of the other open pull requests, since none of them can go green until it lands.