Skip to content

fix(ci): fix release workflow to wait specifically on validate check - #54

Merged
dhc-tech merged 3 commits into
mainfrom
fix/release-wait-check
Aug 25, 2026
Merged

fix(ci): fix release workflow to wait specifically on validate check#54
dhc-tech merged 3 commits into
mainfrom
fix/release-wait-check

Conversation

@dhc-tech

@dhc-tech dhc-tech commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Ensure release workflow waits specifically for validate check to pass before publishing.

Summary by Sourcery

Make release publishing wait for a successful validate check and prevent concurrent releases.

Bug Fixes:

  • Ensure releases wait for the specific validate check to complete successfully before publishing.

Enhancements:

  • Serialize release workflows to prevent concurrent publishing operations.

CI:

  • Grant the release workflow permission to read check results and replace broad check waiting with targeted validate-check polling and timeout handling.

@dhc-tech dhc-tech added the autosubmit Automatically merges PR when CI passes and review is approved label Aug 25, 2026
@sourcery-ai

sourcery-ai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The release workflow now gates publishing on the current commit’s validate check using a single pinned wait-on-check step, replacing the previous workflow-wide wait and correcting the check target for this repository.

Sequence diagram for release gating on validate check

sequenceDiagram
    participant Release as Release workflow
    participant Checks as GitHub checks
    participant Publisher as Publisher

    Release->>Checks: wait-on-check(ref, check-name: validate)
    loop Every 15 seconds
        Checks-->>Release: validate status
    end
    alt validate conclusion is success or neutral
        Release->>Publisher: Publish release
    else validate is not allowed
        Release-->>Publisher: Publishing blocked
    end
Loading

File-Level Changes

Change Details Files
Configure the release workflow to wait for the repository’s specific validate check before publishing.
  • Rename the wait step to reflect the validate check it monitors.
  • Target the pinned wait-on-check action at the current commit’s validate check.
  • Remove the separate workflow-wide wait and shorten the polling interval to 15 seconds.
  • Retain success/neutral conclusions as permitted outcomes.
.github/workflows/release.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions Bot added size:S Small diff (<=100 lines changed) type:fix Bug fix status:needs-review Awaiting review or checks infra: workflows and removed size:S Small diff (<=100 lines changed) type:fix Bug fix status:needs-review Awaiting review or checks labels Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@sourcery-ai review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/workflows/release.yml" line_range="55-61" />
<code_context>
-        allowed-conclusions: success,neutral
-        verbose: false
-
-    - name: Wait on all tests
-      uses: lewagon/wait-on-check-action@369769072fe522a3a8a85c03c96af1e5242a1994 # v1.9.1
-      with:
-        ref: ${{ github.sha }}
-        running-workflow-name: 'release'
-        repo-token: ${{ secrets.GITHUB_TOKEN }}
-        wait-interval: 60
+        wait-interval: 15
         allowed-conclusions: success,neutral
</code_context>
<issue_to_address>
**issue (bug_risk):** Removing the second `wait-on-check-action` step removes the only serialization against another running `release` workflow. Two pushes to `main` can therefore publish concurrently, causing overlapping tag/package updates and release failures or inconsistent publication state.

**Triggers:** When multiple commits reach `main` before the earlier release workflow finishes.

**Suggested fix:** Keep a wait or add a workflow-level concurrency group that serializes `release` runs while retaining the validate-check gate.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and the release job will now proceed after only the validate check, so another failing check could be skipped and a faulty release could be published. Reverting restores the old gate, but it cannot fully undo artifacts or versions already consumed by users.

Blocking findings: .github/workflows/release.yml:61


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/workflows/release.yml
@github-actions github-actions Bot added status:changes-requested A reviewer requested changes and removed status:needs-review Awaiting review or checks labels Aug 25, 2026
@dhc-tech

Copy link
Copy Markdown
Owner Author

@sourcery-ai resolve
@sourcery-ai review

@github-actions

Copy link
Copy Markdown
Contributor

@sourcery-ai review

@dhc-tech
dhc-tech merged commit b5a8d53 into main Aug 25, 2026
10 checks passed
@dhc-tech
dhc-tech deleted the fix/release-wait-check branch August 25, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Automatically merges PR when CI passes and review is approved infra: workflows size:S Small diff (<=100 lines changed) status:changes-requested A reviewer requested changes type:fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants