Skip to content

Avoid retries in subscription example - #1385

Merged
bgentry merged 1 commit into
masterfrom
bg/stabilize-subscription-example
Sep 25, 2026
Merged

bgentry merged 1 commit into
masterfrom
bg/stabilize-subscription-example

Conversation

@bgentry

@bgentry bgentry commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

The subscription example inserts a failing job with the default retry limit. On a busy CI runner, its retry can finish before shutdown and leave a second failed-job event buffered, so the example prints an event instead of the expected closed-channel message.

Set that job's maximum attempts to one and update the expected state to discarded. This keeps the example focused on subscription behavior and makes its output independent of retry timing.

The subscription example leaves a failed job eligible for retry. When it
runs again before shutdown, a second failure event stays buffered and
breaks the expected output after the client stops.

Limit that job to one attempt and expect its discarded state. The
example now produces one failed-job event regardless of CI timing.
@bgentry
bgentry requested a review from brandur September 25, 2026 00:06
@bgentry

bgentry commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

@brandur minor flaky fix that came out of another task, originally failed in https://github.com/riverqueue/river/actions/runs/36066052308/job/107855949199

@bgentry
bgentry enabled auto-merge (squash) September 25, 2026 00:07
@bgentry
bgentry merged commit 03c6303 into master Sep 25, 2026
15 checks passed
@bgentry
bgentry deleted the bg/stabilize-subscription-example branch September 25, 2026 01:00
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.

2 participants