Skip to content

test(queue): prove a dependent runs after Done on a restarted queue (RIG-11227) - #180

Closed
rigel-mintaka wants to merge 1 commit into
rigel-releasefrom
ci-pipelines/rig-11227-prove-a-dependent-runs-after-done-on-a
Closed

rigel-mintaka wants to merge 1 commit into
rigel-releasefrom
ci-pipelines/rig-11227-prove-a-dependent-runs-after-done-on-a

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 20, 2026 •

Copy link
Copy Markdown

What does this do

Adds a guard test, TestWithTaskStoreRestartReleasesDependentOnUnknownDone, in server/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, Done for the missing dependency releases the dependent with the dependency status.

Summary

  • Polls the dependency on a first queue, so its row leaves the store.
  • Restarts the queue over the same store.
  • Done returns ErrNotFound, as on this base. The dependent is still released with DepStatus set 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/queue

Risks

Test-only. No production code changes.

Spec impact

Spec-impact: none

Checks skipped: p0:RIG-9887

Refs RIG-11227

Co-authored-by: Matt Wilkinson matt@rigel.build

…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>
@linear-code

linear-code Bot commented Nov 20, 2026

Copy link
Copy Markdown

RIG-11227

@rigel-mintaka

Copy link
Copy Markdown
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>
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