-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
BES: make uploader retry attempts configurable #16305
BES: make uploader retry attempts configurable #16305
Conversation
7202e2b
to
d6562e4
Compare
Not to sure how to test this just yet. I want to do this in Java but it might need to be a Bash test instead 🤔. Open for suggestion. |
The changes LGTM but I will let @michaeledgar to make the decision. |
d6562e4
to
b536c75
Compare
I gave the flag names and docs slight tweak to better reflect their usages. I am looking into
|
Depends on different Build Event Service setup, there could be different failure modes that may tolerate less or more failures for Build Events uploading. Allow users to tweak the number without having to use a custom JVM args or shipping a fork of Bazel with these number tweaked.
b536c75
to
4b0f209
Compare
I added a small test for the retry attempt count. Not quite sure how to test the delay value though, I would need to be able to assert the info log somehow but I could not find a good way to do that. |
@michaeledgar I would appreciate it if you could take a look at this PR. Just want to know if you folks are ok with the direction. |
@@ -227,6 +227,17 @@ public void testCreatesStreamerForBesTransport() throws Exception { | |||
.isInstanceOf(BuildEventServiceTransport.class); | |||
} | |||
|
|||
@Test | |||
public void testRetryCount() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for adding a test! It is pretty suspicious that we don't have any other test that exercised the now-defunct environment variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge this shortly. Thanks for sending this out, and persisting despite my unavailability!
public int buildEventUploadAttempt; | ||
|
||
@Option( | ||
name = "experimental_build_event_upload_retry_attempt_delay", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should switch this to a Duration.
Since this sat in my inbox for so long, I'll save us the round-trip and do it myself.
Depends on different Build Event Service setup, there could be different failure modes that may tolerate less or more failures for Build Events uploading.
Allow users to tweak the number without having to use a custom JVM args or shipping a fork of Bazel with these number tweaked.