fix(driver): surface the real startup failure instead of swallowing it#305
Merged
Merged
Conversation
When startup's main() failed at the "get processor" step, the error was lost: Main() discarded main()'s returned error (`exitCode, _ := main(...)`) and only logged a generic "startup failed, will retry", and getProcessor returned the wrapped error before the meta-state error-logging defer was registered — so nothing logged the cause. A crash-looping driver showed only the retry line with no reason. - Main() now keeps main()'s error and logs it on the retry line (Infofe). - getProcessor logs explicitly on both the GetProcessorWithProject RPC error and the FromPB error. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
When the streaming driver's
startup.main()fails at the get-processor step, the real error is currently lost — a crash-looping driver logs onlystartup failed, will retry after 30swith no reason.Two gaps cause this:
Main()discardsmain()'s returned error:exitCode, _ := main(...), then logs a generic retry line.main(), the deferred error logger (the "record meta error" defer) is registered after the get-processor step, andgetProcessorreturns its wrapped error before that — so unlike the connect-to-processor-service step (which has an explicitErrorfe), a get-processor failure is logged nowhere.Changes
Main()keepsmain()'s error and includes it on the retry line (Infofe).getProcessorlogs explicitly on both failure paths — theGetProcessorWithProjectRPC error and theFromPBerror.No behavior change beyond logging; the retry/exit-code flow is unchanged.
Test
bazel build //driver/controller/startup/...— green.