fix: log and exit non-zero when the tycho feed stops - #409
Draft
brunoguerios wants to merge 2 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
40 of 43 fynd shutdowns in the last 48h ended the Tycho stream cleanly:
TychoFeed::runbroke itsloop, returned
Ok(()), the spawn wrapper logged nothing,tycho_feed_failures_totaldid notincrement, and the process exited 0 (
reason: Completed). The dominant prod failure mode wasinvisible to both logs and metrics.
Now any end of the stream — clean or error — returns
StreamError("<stream> stream ended (last block: N)"). The existing spawn wrappers insolver.rslog it at ERROR and increment
tycho_feed_failures_totalwith no change. The feed arm ofFyndRPC::runsetsfatal_error, so the process exits 1 and k8s recordsreason: Error. The gasarm had the same defect and gets the same one-line fix.
Not in scope: reconnect-with-backoff inside
TychoFeed, and the upstream tycho-clientRevertPositionNotFoundfix (tycho repo) that causes most of these stream ends.run_with_step_controllerkeeps its clean end — that end is deliberate test behavior.Before prod rollout: dashboards or alerts that key on
last_terminated_reason="Completed"for fyndpods now see
Error, and Loki queries that count the INFO lineProtocol stream endedmust switchto the
tycho feed errorERROR line or to the metric.Local CI green (fmt, clippy, doc, 1270 tests). Not yet verified on staging — that needs a forced
stream end on one chain to confirm the exit code and the log line.