Skip to content

Fix restart failure when version already set (#81) - #82

Merged
ericof merged 1 commit into
mainfrom
issue-81
Jul 7, 2026
Merged

ericof merged 1 commit into
mainfrom
issue-81

Conversation

@ericof

@ericof ericof commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Fixes a failure when restarting a release past the version step, e.g.:

repoplone release --start-step release_frontend <version>

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_version treat it as a new version and
reject it as an already-existing Git tag, aborting the restart.

Fix

Skip re-resolution in process_desired_version when the desired version
already 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_steps and process_desired_version, each with dedicated tests.

Tests

  • 8 new tests in tests/release/test_pipeline.py covering both helpers,
    including a regression test asserting resolve_skipped_version is not
    called when restarting with the current version.
  • Full release test suite passes.

Closes #81

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.
@ericof
ericof requested a review from a team as a code owner July 1, 2026 16:38
@ericof
ericof requested a review from fredvd July 1, 2026 16:38

@fredvd fredvd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericof
ericof merged commit 0b982f7 into main Jul 7, 2026
8 checks passed
@ericof
ericof deleted the issue-81 branch July 7, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repoplone release --start-step release_frontend <version> fails

2 participants