Skip to content

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

Merged
rigel-nemo[bot] merged 1 commit into
mainfrom
ci-pipelines/rig-11227-prove-a-dependent-runs-after-done-on-a
Nov 21, 2026
Merged

rigel-nemo[bot] merged 1 commit into
mainfrom
ci-pipelines/rig-11227-prove-a-dependent-runs-after-done-on-a

Conversation

@rigel-mintaka

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

Copy link
Copy Markdown
Contributor

What does this do

Adds a guard test, TestWithTaskStoreRestartReleasesDependentOnUnknownDone, in forks/woodpecker/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 shows the path works: after a restart, Done for the missing dependency releases the dependent with the dependency status.

This is a port of RigelBuild/woodpecker#180 (RIG-11227) into the nebula monorepo under forks/woodpecker/, as part of the RIG-10145 fork archive. The old PR is closed with a pointer to this one.

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

  • CGO_ENABLED=1 nix shell nixpkgs#gcc -c go test -tags test -count=1 -run TestWithTaskStoreRestart -v ./server/queue/ in forks/woodpecker: --- PASS: TestWithTaskStoreRestartReleasesDependentOnUnknownDone, ok.
  • CGO_ENABLED=0 on the same package fails with the go-sqlite3 cgo stub. The new test uses the existing sqlite test store, so it needs cgo. I did not run the base to confirm; the existing TestPersistentQueue* tests fail the same way.

Risks

Test-only. No production code changes. Rollback: revert this commit.

Spec impact

Spec-impact: none.

Checks skipped: nebula fork port; no local hook runner

Refs RIG-11227

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

…RIG-11227)

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

linear-code Bot commented Nov 21, 2026

Copy link
Copy Markdown

RIG-11227

@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

All-clear at bbf9eef

Review round 1: 0 high, 0 medium, 0 low.

  • Fidelity: the diff is the same as test(queue): prove a dependent runs after Done on a restarted queue (RIG-11227) woodpecker#180, apart from the forks/woodpecker/ prefix.
  • The old PR had no review findings to carry over.
  • This is a test-only change. The test restarts the queue over the same store and checks that Done on the missing dependency releases the dependent with DepStatus set.
  • Run in forks/woodpecker: CGO_ENABLED=1 go test -tags test -count=1 -run TestWithTaskStoreRestart ./server/queue/ PASS.
  • Body: no private-repo references.

@rigel-nemo

rigel-nemo Bot commented Nov 21, 2026

Copy link
Copy Markdown

Checks read:

@rigel-nemo
rigel-nemo Bot merged commit dd27b09 into main Nov 21, 2026
6 of 10 checks passed
@rigel-nemo
rigel-nemo Bot deleted the ci-pipelines/rig-11227-prove-a-dependent-runs-after-done-on-a branch November 21, 2026 14:56

This branch had an error being deployed

1 failed deployment
ci — bbf9eef3 Deployed Nov 21, 2026 by rigel-mintaka via CI (x86_64-linux) #897
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