Skip to content

chore: clean up err tracker wf, ignore silenced wf#4979

Open
MasterPtato wants to merge 1 commit intomainfrom
05-05-chore_clean_up_err_tracker_wf_ignore_silenced_wf
Open

chore: clean up err tracker wf, ignore silenced wf#4979
MasterPtato wants to merge 1 commit intomainfrom
05-05-chore_clean_up_err_tracker_wf_ignore_silenced_wf

Conversation

@MasterPtato
Copy link
Copy Markdown
Contributor

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link
Copy Markdown

railway-app Bot commented May 5, 2026

🚅 Deployed to the rivet-pr-4979 environment in rivet-frontend

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web May 8, 2026 at 10:47 pm
kitchen-sink ❌ Build Failed (View Logs) Web May 8, 2026 at 12:27 am
mcp-hub ✅ Success (View Logs) Web May 5, 2026 at 8:02 pm
ladle ❌ Build Failed (View Logs) Web May 5, 2026 at 8:00 pm
frontend-cloud ❌ Build Failed (View Logs) Web May 5, 2026 at 8:00 pm
frontend-inspector ❌ Build Failed (View Logs) Web May 5, 2026 at 8:00 pm

Copy link
Copy Markdown
Contributor Author

MasterPtato commented May 5, 2026

@MasterPtato MasterPtato marked this pull request as ready for review May 5, 2026 19:58
@MasterPtato MasterPtato requested a review from NathanFlurry May 5, 2026 19:58
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 5, 2026

Code Review: chore: clean up err tracker wf, ignore silenced wf

This PR makes four focused, independent changes. All are correct and clean.


1. engine/packages/gasoline/src/db/kv/mod.rs — Skip silenced workflows during poll dispatch

Good. The SilenceTsKey fetch is added inside the existing tokio::try_join! block, so it runs in parallel with all other FDB reads at no extra round-trip cost. The early-return path clears the lease and worker-id key, which mirrors what happens for already-completed workflows — consistent with the pattern at line ~568 in clear_expired_leases.

One minor observation: the warning level (tracing::warn!) for "workflow silenced, ignoring" is the same as "workflow already completed". Since silencing is intentional/expected behavior, tracing::debug! might be more appropriate — but this is a style preference, not a bug.


2. engine/packages/guard/src/lib.rs — Remove duplicate rustls crypto provider init

Good. The removed block was dead code; pools.rs and envoy-client both call install_default() with the same is_err() guard already. The removal is safe.


3. engine/packages/pegboard/src/workflows/actor2/runtime.rs — Clear reschedule_ts on successful allocation

Correct fix. sleep_ts was already being cleared on successful allocation, but reschedule_ts was left stale. compare_retry sets reschedule_ts when retry backoff is active; clearing it on allocation success prevents a spurious reschedule after an actor comes back online. Consistent with the reset path in compare_retry (line 733).


4. engine/packages/pegboard/src/workflows/runner_pool.rs — Capture error tracker WF ID and send Shutdown on exit

Good lifecycle fix. Previously the error tracker sub-workflow would wait indefinitely for signals after the runner pool workflow completed (since it only exits on Shutdown). Sending Shutdown on exit is the correct cleanup.

One note: the Shutdown signal is added after the main loop without a ctx.v(N) version branch at the runner pool level. For in-progress workflow replays that have already exited the loop, this new code will execute on next wake-up, sending an extra Shutdown to the error tracker. That should be safe since the tracker handles it idempotently (returns Ok(true) and breaks). No blocking concern, but worth being aware of during rollout.


Summary: All four changes are correct and targeted. No blocking issues.

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