Return failure exit code from log replay when errors are present (#1389)#1389
Open
anushamukka-dev wants to merge 1 commit into
Open
Return failure exit code from log replay when errors are present (#1389)#1389anushamukka-dev wants to merge 1 commit into
log replay when errors are present (#1389)#1389anushamukka-dev wants to merge 1 commit into
Conversation
Contributor
|
@anushamukka-dev has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112730861. |
8Keep
approved these changes
Jul 21, 2026
8Keep
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
…acebook#1389) Summary: Fixes the `FIXME(JakobDegen)(easy)` in `buck2_cmd_log_client/src/replay.rs`. Previously, `buck2 log replay` printed any errors from the replayed command to stderr but then unconditionally returned `ExitResult::success()`, so a replay of a failed command exited 0. Now, when `res.errors` is non-empty, we return `ExitResult::from_command_result_errors(res.errors)`, which derives the appropriate exit code from the errors' tags (the errors were already emitted to stderr by the loop above, so they are passed as emitted errors and not re-printed). Reviewed By: 8Keep Differential Revision: D112730861
log replay when errors are presentlog replay when errors are present (#1389)
anushamukka-dev
force-pushed
the
export-D112730861
branch
from
July 22, 2026 17:15
10721a3 to
5c64c60
Compare
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.
Summary:
Fixes the
FIXME(JakobDegen)(easy)inbuck2_cmd_log_client/src/replay.rs.Previously,
buck2 log replayprinted any errors from the replayedcommand to stderr but then unconditionally returned
ExitResult::success(), so a replay of a failed command exited 0.Now, when
res.errorsis non-empty, we returnExitResult::from_command_result_errors(res.errors), which derives theappropriate exit code from the errors' tags (the errors were already
emitted to stderr by the loop above, so they are passed as emitted
errors and not re-printed).
Reviewed By: 8Keep
Differential Revision: D112730861