Fix approved gated pipeline scheduling#6627
Merged
6543 merged 8 commits intoMay 26, 2026
Merged
Conversation
Contributor
Account with some automation detected 🤖🧑💻We noticed a mix of typical human activity and some patterns often associated with automation or AI agents. Human? 65% likely to be a human.
Have thoughts about this account? Let the community know. 🕵🏽 Analyzed 200 public events via AgentScan |
6543
approved these changes
May 26, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6627 +/- ##
==========================================
+ Coverage 41.60% 41.65% +0.05%
==========================================
Files 432 432
Lines 28805 28874 +69
==========================================
+ Hits 11983 12028 +45
- Misses 15747 15759 +12
- Partials 1075 1087 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
What changed
Approved gated pipelines now rebuild a fresh pending workflow tree and atomically replace the old blocked workflow rows before queueing tasks.
This keeps the existing guard in the normal workflow creation path, while giving approval its own replace path so loaded blocked workflows do not prevent scheduling.
Why
After the workflow-save guard was added, approval loaded the blocked workflow tree and then reused the normal creation helper. That helper refused to save generated workflows when
pipeline.Workflowswas already populated, so the approval path could leave a pipeline accepted/pending without anything queued.Closes #6619
Validation
go test -race -tags test ./server/pipeline -count=1go test -race -tags test ./e2e/scenarios -run TestApprovedGatedPipelineRuns -count=1 -vGOROOT=$(go env GOROOT) GOTOOLCHAIN=local PATH="$(go env GOROOT)/bin:$PATH" go test -race -cover -coverpkg=./... -coverprofile e2e-coverage.out -timeout 60s -tags test ./e2e/... -count=1make build-uiGOROOT=$(go env GOROOT) GOTOOLCHAIN=local PATH="$(go env GOROOT)/bin:$PATH" make test-serverNote: the explicit Go toolchain env avoids a local
/usr/local/gotool mismatch in this workstation.