-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[MetricsAdvisor] Added RetryOnTooManyRequestsPolicy to tests #20653
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,7 @@ public async Task UpdateHookAsync() | |
} | ||
|
||
[Test] | ||
[Ignore("https://github.com/Azure/azure-sdk-for-net/issues/20677")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Issue has been present for more than a week and is not related to these changes. This one is from Apr 19th: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=849790&view=logs&j=68082d65-ebf7-5f3f-494d-d3fd09e80dd6&t=6f6444ca-c101-5878-5224-de85502bb056&l=89 |
||
public async Task GetHooksAsync() | ||
{ | ||
string endpoint = MetricsAdvisorUri; | ||
|
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.
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.
Doubling the default maximum number of retries allowed by our retry policy (default = 3).
At first, my original approach was trying to use an
HttpPipelinePolicy
to keep retrying as long as we got 429 errors back from the service (you can check it here). It worked just fine.However, I have changed the approach to something simpler (and a bit less deterministic). The
HttpPipelinePolicy
could end up in an endless loop if the service kept returning a 429 for any reason (for example, a bug on their side).Increasing the maximum number of retries seems to be enough to solve the problem. Here is the list of status codes affected by this change. These are not critical errors and will be retried 3 more times in case of failure.
I have run the live tests pipeline 3 times with the
MaxRetries
approach and had zero failures, which is great given that we were hitting the problem in 100% of the runs. We can easily increase the number if we start seeing the error again, or consider using theHttpPipelinePolicy
again if the error persists.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.
Out of curiosity, are the other languages facing this too? And are the solutions the same? I ask because this seems generic enough that according to how their pipelines are set, it will apply to everyone else.
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 raised this concern during standup some weeks ago when the issue started, but no other languages seemed to be facing it at the time. It depends on how the pipelines are set like you said, and on the number of tests as well.