Repository navigation
test(queue): prove a dependent runs after Done on a restarted queue (RIG-11227) - #180
Closed
rigel-mintaka wants to merge 1 commit into
Closed
rigel-mintaka wants to merge 1 commit into
rigel-mintaka wants to merge 1 commit into
Conversation
…RIG-11227) Guard test for a dependent after a server restart. The dependency is polled before the restart and is missing from the restarted queue. Done then returns ErrNotFound, and the dependent must still be released with the dependency status. Refs RIG-11227 Co-Authored-By: Matt Wilkinson <matt@rigel.build> Co-authored-by: Matt Wilkinson <matt@rigel.build>
Author
|
Moved to RigelBuild/nebula#191 (RIG-10145 fork archive). |
rigel-nemo Bot
pushed a commit
to RigelBuild/nebula
that referenced
this pull request
Nov 21, 2026
…RIG-11227) (#191) Add TestWithTaskStoreRestartReleasesDependentOnUnknownDone in server/queue/persistent_test.go. After a restart the dependency row is gone. Done for it returns ErrNotFound, and the dependent is still released with the dependency status. Ported from RigelBuild/woodpecker#180. Test-only change. Co-authored-by: Matt Wilkinson <matt@rigel.build>
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 does this do
Adds a guard test,
TestWithTaskStoreRestartReleasesDependentOnUnknownDone, inserver/queue/persistent_test.go. It covers a dependent that waits on a task still running at a server restart.Why do we need it
RIG-11227 asked whether dependents stall after a server restart. This test proves the path works on
rigel-release: after a restart,Donefor the missing dependency releases the dependent with the dependency status.Summary
DonereturnsErrNotFound, as on this base. The dependent is still released withDepStatusset to the dependency status.Verification
nix shell nixpkgs#gcc -c env CGO_ENABLED=1 go test ./server/queue/ -run 'TestWithTaskStoreRestart' -v--- PASS: TestWithTaskStoreRestartReleasesDependentOnUnknownDone (0.22s)ok go.woodpecker-ci.org/woodpecker/v3/server/queueRisks
Test-only. No production code changes.
Spec impact
Spec-impact: none
Checks skipped:
p0:RIG-9887Refs RIG-11227
Co-authored-by: Matt Wilkinson matt@rigel.build