Repository navigation
Conversation
When restarting a release with --start-step past the version step, the repository version is already the target version, so passing the same version on the command line made resolve_skipped_version reject it as an existing tag. Skip re-resolution when the desired version already matches the current one. The step-selection and version-resolution logic is extracted into process_steps and process_desired_version helpers, each covered by tests.
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.
Summary
Fixes a failure when restarting a release past the
versionstep, e.g.:On a restart the repository version is already the target version (it was
set during the previous, interrupted run). Passing the same version on the
command line made
resolve_skipped_versiontreat it as a new version andreject it as an already-existing Git tag, aborting the restart.
Fix
Skip re-resolution in
process_desired_versionwhen the desired versionalready matches the current repository version — in that case the version is
correct as-is and no validation against Git tags is needed.
While here, the step-selection and version-resolution logic that lived inline
in
ReleasePipeline.__init__is extracted into two module-level helpers,process_stepsandprocess_desired_version, each with dedicated tests.Tests
tests/release/test_pipeline.pycovering both helpers,including a regression test asserting
resolve_skipped_versionis notcalled when restarting with the current version.
Closes #81