Skip to content

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

Open
MasterPtato wants to merge 1 commit into
mainfrom
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 into
mainfrom
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 20, 2026 at 3:22 am
kitchen-sink ❌ Build Failed (View Logs) Web May 19, 2026 at 7:04 pm
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

Overview

This PR makes four targeted fixes:

  1. Silenced workflow handling - the gasoline KV puller now skips workflows that have a SilenceTsKey entry, matching the existing has_output skip path.
  2. Guard rustls cleanup - removes a duplicate CryptoProvider::install_default() that is already handled centrally in packages/pools/src/pools.rs.
  3. Runner pool error tracker lifecycle - captures the dispatched error tracker workflow ID so a Shutdown signal can be sent on exit; previously the ID was discarded and the tracker would run indefinitely after the pool workflow completed.
  4. reschedule_ts reset on allocation - adds state.reschedule_ts = None alongside the existing state.sleep_ts = None when an allocation succeeds.

All four changes are correct. A few notes below.


gasoline/src/db/kv/mod.rs - silenced workflow handling

  • Parallel fetch looks correct. silence_ts_key is added to the try_join! alongside the other workflow metadata, and is_silenced is derived correctly with .is_some().
  • Lease clearing is correct. The silenced case follows the same cleanup path as has_output: clear lease and worker_id, return None.
  • Minor style note: the if/else if ... if structure is logically fine but slightly unconventional. A single match (has_output, is_silenced) would make the warning branching and the shared cleanup more explicit, though the current form is readable.
  • Unused fetch data when silenced. When a workflow is silenced, input_chunks, state_chunks, and events are fetched but never used. This is not a bug since try_join! runs everything concurrently with no cheap short-circuit, but worth a follow-up if silenced workflows are common in production.

guard/src/lib.rs - rustls cleanup

  • Correct removal. The install_default() call is now centralized in pools.rs.
  • The rustls dep in guard/Cargo.toml has no remaining rustls:: usages in src/. Consider removing it from Cargo.toml in a follow-up (rustls-pemfile may still be needed, worth checking).

pegboard/src/workflows/runner_pool.rs - error tracker shutdown

  • Most impactful fix. Without it the error tracker child workflow would accumulate indefinitely across runner pool restarts.
  • Version consistency: Shutdown signal is sent via ctx.v(2), matching the dispatch version. Good.
  • Early return before dispatch: the return Ok(()) on the ReadDesiredOutput::Stop path exits before error_tracker_wf_id is set. That is correct because the tracker was never dispatched in that branch, so there is nothing to shut down.

pegboard/src/workflows/actor2/runtime.rs - reschedule_ts reset

  • Correct. sleep_ts and reschedule_ts should both be cleared when an allocation succeeds. The existing line 733 (state.reschedule_ts = None) confirms this pattern is used elsewhere in the same file.

Summary

No blocking issues. The silenced-workflow fetch optimization and the possible unused rustls dep in guard are the only follow-up items worth considering.

@MasterPtato MasterPtato force-pushed the 05-05-chore_clean_up_err_tracker_wf_ignore_silenced_wf branch from 48206ef to e0c972d Compare May 19, 2026 19:03
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