Skip to content

fix(release): one version runs two releases and leaves a draft #7933

Backlog

Description

@dan-petty

Problem

Release v0.264.1 ran two times on 2026-11-30: from pull request #7918 (commit c0b3dd0) and from pull request #7919 (commit 7bda220).

  • The git tag and the published release are at c0b3dd0.
  • Release run 46489323868, for 7bda220, built the images again and moved each image tag v0.264.1 to a new digest. For service, the digest changed during the day.
  • That run then failed at the step Attach the Packages and Publish the Release: HTTP 422 ... Cannot delete asset from an immutable release.
  • A draft release v0.264.1 remains, with target 7bda220.

The two commits differ only in CHANGELOG.md.

Expected behavior

  • One version is released one time.
  • A run for a published version moves no image tag, and it ends before the build.
  • No draft release of a published version remains.

Reproduction

  1. devops gh run view 46489323868 --log-failed
  2. devops gh api 'repos/dan-petty/devops-cli/releases?per_page=3'

Existing tool considered

release-please, which makes each release, and the concurrency and if rules of GitHub Actions. No new tool.

Source

Source: #7919

Proposed design

Problem statement

Release v0.264.1 ran two times on 2026-11-30. The second run rebuilt images, moved the v0.264.1 image tags and failed on an immutable release. It left a draft release. The two commits differ only in CHANGELOG.md. The fix stops a run for a published version before the build. It also removes a draft release of a published version.

Acceptance criteria

Requirement: Release workflow static checks

The release workflow SHALL pass the workflow static checks after the guard and cleanup changes.

Scenario: Workflow static checks

  • WHEN uv run devops ci --check --only actionlint,zizmor runs
  • THEN the command exits 0 and reports no error for .github/workflows/release.yml.

Requirement: Guard stops a duplicate release run

The release workflow MUST stop a run before the image build when the version tag points to a different commit.

Scenario: Second run for a published version

  • WHEN a release run for v0.264.1 starts at commit 7bda220 and tag v0.264.1 points to c0b3dd0
  • THEN the live check uv run devops gh run view <duplicate-run-id> --log-failed shows the guard step exited before the image build.

Requirement: Image tag does not move

A duplicate release run MUST NOT move an image tag of a published version.

Scenario: Image digest after a duplicate run

  • WHEN a duplicate release run for v0.264.1 starts after the published release exists
  • THEN the live check uv run devops gh run view <duplicate-run-id> --log-failed shows the guard exited before the build and the image tag v0.264.1 keeps its digest.

Requirement: Draft release cleanup

The release workflow SHALL delete a draft release when its version has a published release.

Scenario: Draft release of a published version

  • WHEN the release workflow runs for a version that has a published release and a draft release
  • THEN the live check uv run devops gh api 'repos/dan-petty/devops-cli/releases?per_page=3' shows no draft release for that version.

Requirement: Pending a person after the merge

A person MUST delete the existing draft release v0.264.1 after the fix merges.

Scenario: Existing draft release v0.264.1

  • WHEN the fix merges and a person runs uv run devops gh api 'repos/dan-petty/devops-cli/releases?per_page=3'
  • THEN the command shows one published release for v0.264.1 and no draft release for v0.264.1.

Existing Tool Considered

No alternatives check has run. Keep release-please as ADR 0013 requires. Use the built-in concurrency and if rules of GitHub Actions. release-please does not stop a second workflow run after two release commits exist. The workflow guard does that. No new tool and no new product code are needed.

Key questions

  • Which tool makes each release?: Keep release-please as ADR 0013 requires. Do not add a release tool or product code. [sources: .github/workflows/release.yml]
  • How does the release workflow stop a second run for a published version?: Add a pre-build guard job. It reads the release and tag for the version. It exits when the tag points to a different commit. Use a concurrency group keyed by the version with cancel-in-progress false. (best practice) [sources: .github/workflows/release.yml]
    • Chosen: Pre-build tag guard plus concurrency. The guard stops a later run; concurrency stops overlapping runs.
    • Rejected: Concurrency only. Concurrency serializes runs but does not skip a later run.
    • Rejected: Release-please configuration only. It cannot stop a workflow run after two release commits exist.
  • Does the fix change the release-merge workflow?: No. The release-merge workflow already picks at most one release pull request per run. The guard in the release workflow stops a second run for a published version. (best practice) [sources: .github/workflows/release-merge.yml, .github/workflows/release.yml]
    • Chosen: Keep release-merge unchanged. It already picks one release pull request per run.
    • Rejected: Add a second merge guard. The release workflow guard covers the duplicate run.
  • How is a draft release of a published version removed?: Add a cleanup step to the release workflow. It deletes a draft release when the version has a published release. A person deletes the existing draft v0.264.1 after the merge. (best practice) [sources: .github/workflows/release.yml]
    • Chosen: Workflow cleanup plus one person step. The workflow prevents recurrence; the person clears the current draft.
    • Rejected: Person only. A future draft can remain.
    • Rejected: Workflow only. The current draft stays until a run.
  • Should the concurrency group cancel an in-progress release run?: No. Set cancel-in-progress to false. A cancelled release run can leave partial assets. (best practice) [sources: .github/workflows/release.yml]
    • Chosen: Do not cancel in-progress. A cancelled run can leave partial release assets.
    • Rejected: Cancel in-progress. It can stop a release at an unsafe point.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/release
    source/agent
    status/new
    on Nov 30, 2026
  2. dan-petty commented on Nov 30, 2026

    @dan-petty
    OwnerAuthor
  3. added
    effort/medium
    value/high
    priority/p1-high
    on Nov 30, 2026
  4. devops-cli-service commented on Nov 30, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  5. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor

    Part of the cause, from the log of Release run 46486938299 on 2026-11-30:

    Why the search did not find the new release is not known.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p1-highscope/releasesource/agentstatus/newtype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions