Repository navigation
feat: move Poetry version ownership to poetry-lock-update - #74
Merged
Merged
Conversation
pre-commit-autoupdate now excludes the poetry hook, and poetry-lock-update bumps it to the newest cooldown-eligible release and regenerates poetry.lock with it, so the pinned toolchain and the lock always move together in one PR. Previously an autoupdate PR that bumped the poetry rev silently changed the Poetry CI installs (base-setup reads the hook rev) without updating poetry.lock, so the poetry-lock hook failed the static and release jobs.
|
Addresses review feedback: - pre-commit-autoupdate now derives the poetry exclusion from the actual configured hook URL via build_exclude_repos.sh, so ssh and .git forms are covered too, not just the hardcoded https URL. - Extracts the lock-update staging/commit into stage_update.sh and adds focused tests: build_exclude_repos covers https/ssh/quoted/missing forms, and stage_update verifies the hook revision is committed together with the regenerated poetry.lock.
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
Splits ownership of the Poetry version between the two bot actions:
pre-commit-autoupdatenow leaves the poetry hook alone (newexclude-reposinput, defaulting to the poetry repo).poetry-lock-updatenow bumps the poetry hook in.pre-commit-config.yamlto the newest cooldown-eligible release (prek update --repo), reinstalls that Poetry, and regeneratespoetry.lockwith it. Both files land in the same PR, and the body gains a## Poetry versionsection.Why
base-setupderives CI's Poetry from the poetry hookrev. An autoupdate PR that bumped that rev silently upgraded the Poetry used to generate/check the lock, but only committed.pre-commit-config.yaml. Poetry stamps its own version intopoetry.lock, so thepoetry-lockhook then rewrote the lock and failed:staticjob (pre-commit-run) with "files were modified by this hook", andjust installrunspre-commit installand the release action'sgit committripped the same hook.Reproduced locally; see Calysto/metakernel#495.
Notes
get_poetry_version.pygains--repo; tests extended.