Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RB] Handle retries in the CLI rather than server-side #8195

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

maggie-lou
Copy link
Contributor

@maggie-lou maggie-lou commented Jan 16, 2025

Extracted CLI code from #8172

This PR disables automatic retries when using the remote bazel CLI. The CLI then implements retry behavior itself so it can detect when a retry is happening

This fixes a bug where if the remote run fails due to a transient error, the CLI will report a failure. However the scheduler may retry the run in the background and it may eventually succeed. When users go to the invocation link, they'll see that it succeeded despite expecting a failure

Slack thread (Issue 2): https://buildbuddy-corp.slack.com/archives/C07GMM2VBLY/p1734595804049229?thread_ts=1734595606.837269&cid=C07GMM2VBLY

Should be merged after #8172 is rolled out

@maggie-lou maggie-lou force-pushed the rb_reenq_cli branch 2 times, most recently from 99f87cd to 40dcab6 Compare January 16, 2025 17:58
@maggie-lou maggie-lou changed the base branch from master to rb_reenq January 16, 2025 17:59
@maggie-lou maggie-lou force-pushed the rb_reenq branch 2 times, most recently from 8db56b9 to 1688dae Compare January 16, 2025 18:53
@maggie-lou maggie-lou marked this pull request as ready for review January 16, 2025 20:30
Copy link
Contributor

@dan-stowell dan-stowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
(Any cheap way to test?)

@maggie-lou
Copy link
Contributor Author

Looks good! (Any cheap way to test?)

Not the cheapest, but I tested by hard coding a local executor to return a retryable error 20% of the time and verified by the remote bazel logs that the CLI was successfully retrying

cli/remotebazel/remotebazel.go Outdated Show resolved Hide resolved
cli/remotebazel/remotebazel.go Outdated Show resolved Hide resolved
cli/remotebazel/remotebazel.go Show resolved Hide resolved
cli/remotebazel/remotebazel.go Show resolved Hide resolved
docs/remote-bazel-introduction.md Outdated Show resolved Hide resolved
@maggie-lou maggie-lou force-pushed the rb_reenq_cli branch 3 times, most recently from 8774574 to b16cc78 Compare January 28, 2025 19:17
@maggie-lou maggie-lou requested a review from bduffany January 28, 2025 19:18
@maggie-lou maggie-lou force-pushed the rb_reenq branch 2 times, most recently from fc2dbba to bea6602 Compare January 31, 2025 17:01
maggie-lou added a commit that referenced this pull request Jan 31, 2025
… bazel (#8172)

This PR adds a platform property to disable automatic retries by the
scheduler. This can be used to ensure non-idempotent tasks are not
retried.

For example, someone using remote bazel for a deploy may not want
automatic retries

Pre-req to #8195
Base automatically changed from rb_reenq to master January 31, 2025 17:45
@maggie-lou maggie-lou merged commit 923eb4d into master Feb 6, 2025
16 checks passed
@maggie-lou maggie-lou deleted the rb_reenq_cli branch February 6, 2025 16:36
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.

3 participants