Skip to content

[TT-16977] fix: goreleaser skipped on push/tag when dep-guard is skipped#8007

Merged
buger merged 1 commit intomasterfrom
hotfix/fix-goreleaser-skip
Apr 15, 2026
Merged

[TT-16977] fix: goreleaser skipped on push/tag when dep-guard is skipped#8007
buger merged 1 commit intomasterfrom
hotfix/fix-goreleaser-skip

Conversation

@buger
Copy link
Copy Markdown
Member

@buger buger commented Apr 15, 2026

$(gh pr view 8007 --repo TykTechnologies/tyk --json body -q .body)

Related Tickets

The goreleaser job depends on dep-guard which only runs on PRs.
On push/tag/schedule events dep-guard is skipped, causing goreleaser
to also be skipped — breaking all release builds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@buger buger requested a review from a team as a code owner April 15, 2026 07:36
@github-actions
Copy link
Copy Markdown
Contributor

API Changes

no api changes detected

@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Apr 15, 2026

This PR fixes a critical issue in the CI/CD pipeline where the goreleaser job was being skipped on push and tag events, effectively blocking all new releases.

The root cause was a dependency condition. The goreleaser job depends on the dep-guard job. However, dep-guard is configured to run only on pull_request events. For any other event like a push to a release branch, dep-guard is skipped. The goreleaser job's conditional logic did not account for this skipped state, causing it to be skipped as well.

The fix updates the if condition for the goreleaser job to explicitly proceed if the dep-guard job's result is either success or skipped, ensuring the release process runs correctly on all intended trigger events.

Files Changed Analysis

  • .github/workflows/release.yml: Modified to adjust the conditional logic for the goreleaser job, allowing it to run even when its dependency job is skipped.

Architecture & Impact Assessment

  • What this PR accomplishes: It repairs the automated release workflow, unblocking the creation of new software releases for the project.
  • Key technical changes: The if condition in the goreleaser job was changed from a simple draft check to a multi-line condition that now evaluates the result of its dependency (dep-guard).
  • Affected system components: This change directly affects the project's CI/CD release pipeline managed by GitHub Actions.
graph TD
    subgraph release_workflow_logic ["Release Workflow Logic"]
        A[Event: push, tag] --> B(dep-guard job)
        B -- "Condition: only on pull_request" --> C["Result: 'skipped'"]
        C --> D{goreleaser job}
        D -- "Old if: Did not check for 'skipped'" --> E[Job Skipped ❌]
        D -- "New if: (result == 'success' || result == 'skipped')" --> F[Job Runs ✅]
    end
Loading

Scope Discovery & Context Expansion

  • The change is confined to the CI/CD configuration and has no impact on the application's runtime code.
  • The primary impact is on the development and release lifecycle, restoring the automated build and release process that was broken.
  • Examining the release.yml workflow confirms it is triggered on pushes to master, release-* branches, and tags, all of which were previously failing.
Metadata
  • Review Effort: 1 / 5
  • Primary Label: bug

Powered by Visor from Probelabs

Last updated: 2026-04-15T07:39:27.898Z | Triggered by: pr_opened | Commit: 7f7793b

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Apr 15, 2026

\n\n

Architecture Issues (1)

Severity Location Issue
🟠 Error .github/workflows/release.yml:42-45
The `if` condition is logically flawed and will not fix the issue for non-pull-request events like pushes or tags. The expression `github.event.pull_request.draft == false` will evaluate to `false` when the event is not a pull request, as `github.event.pull_request` will be `null`. This will cause the entire condition to be false, and the `goreleaser` job will continue to be skipped on release-triggering events, which is the bug this change intends to fix.
💡 SuggestionThe condition should be modified to explicitly handle cases where the event is not a pull request. It should allow the job to run for non-PR events, or for PRs that are not drafts.
🔧 Suggested Fix
if: |
  !cancelled() &&
  (needs.dep-guard.result == 'success' || needs.dep-guard.result == 'skipped') &&
  (github.event_name != 'pull_request' || github.event.pull_request.draft == false)

✅ Performance Check Passed

No performance issues found – changes LGTM.

Quality Issues (1)

Severity Location Issue
🔴 Critical .github/workflows/release.yml:42-44
The condition `github.event.pull_request.draft == false` will prevent the job from running on `push` or `tag` events, as `github.event.pull_request` is null for those events. Accessing a property on a null object results in an empty string, and `'' == false` evaluates to `false` in GitHub Actions expressions, causing the entire `if` condition to fail. This undermines the purpose of the fix, which is to allow the workflow to run on events other than pull requests.
💡 SuggestionThe check for a draft pull request should only be performed when the event is a `pull_request`. Modify the condition to apply the draft check conditionally based on the event type.
🔧 Suggested Fix
      (github.event_name != 'pull_request' || github.event.pull_request.draft == false)

Powered by Visor from Probelabs

Last updated: 2026-04-15T07:39:10.526Z | Triggered by: pr_opened | Commit: 7f7793b

💡 TIP: You can chat with Visor using /visor ask <your question>

@buger buger merged commit a001207 into master Apr 15, 2026
16 of 21 checks passed
@buger buger deleted the hotfix/fix-goreleaser-skip branch April 15, 2026 07:57
@probelabs probelabs Bot changed the title fix: goreleaser skipped on push/tag when dep-guard is skipped [TT-16977] fix: goreleaser skipped on push/tag when dep-guard is skipped Apr 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚨 Jira Linter Failed

Commit: 7f7793b
Failed at: 2026-04-15 09:11:09 UTC

The Jira linter failed to validate your PR. Please check the error details below:

🔍 Click to view error details
failed to validate branch and PR title rules: branch name 'hotfix/fix-goreleaser-skip' must contain a valid Jira ticket ID (e.g., ABC-123)

Next Steps

  • Ensure your branch name contains a valid Jira ticket ID (e.g., ABC-123)
  • Verify your PR title matches the branch's Jira ticket ID
  • Check that the Jira ticket exists and is accessible

This comment will be automatically deleted once the linter passes.

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.

1 participant