-
Notifications
You must be signed in to change notification settings - Fork 171
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
SNOW-577665: Wrong retry 403 logic #916
SNOW-577665: Wrong retry 403 logic #916
Conversation
return response != null | ||
&& (response.getStatusLine().getStatusCode() < 500 | ||
|| // service unavailable | ||
response.getStatusLine().getStatusCode() >= 600) | ||
&& // gateway timeout | ||
response.getStatusLine().getStatusCode() != 408 | ||
&& // request timeout | ||
(retryHTTP403 || response.getStatusLine().getStatusCode() != 403); | ||
(!retryHTTP403 || response.getStatusLine().getStatusCode() != 403); |
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.
This is the fix. Reviewers please carefully review whether this change is correct since it's error prone. Thanks!
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.
This makes sense!
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.
LGTM
1c1cabf
to
749c67e
Compare
@sfc-gh-wshangguan do we know why the tests are failing and that too only FIPS tests? |
SonarQube Quality Gate |
Not really, but it started to fail before this change. |
// TODO: temporarily disable the function to merge an urgent pr | ||
// @BeforeClass |
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.
Hi @mknister , since the tag is @BeforeClass
, only ignoring tests is not powerful enough. I have to temporarily comment out this tag to get the test pass. We can add this back after merging the code. You think this is acceptable?
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.
Sorry to have you make more changes, but could you revert all changes to this file and then rebase your other commits on top of the current master branch? JDBC4-master tests are now fixed (in a different way than adding @ignore)
// TODO: temporarily disable the function to merge an urgent pr | ||
// @AfterClass |
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.
Same here.
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.
Actual changes look good! Sorry for extra work- if you could take away ConnectionFipsIT changes + put your changes on top of current master, that would be great.
b908a3d
to
42ff717
Compare
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.
LGTM!
Fixed the bug for isNonRetryableHttpCode(403, true/false)
Overview
SNOW-577665
Bug fix. The bug was introduced in 6594bc4
The
isNonRetryableHttpCode
function returns wrong value for 403 http code. Please look at RestRequestTest.java for correct behavior on 403.External contributors - please answer these questions before submitting a pull request. Thanks!
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR adressing? Make sure that there is an accompanying issue to your PR.
Fixes #NNNN
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.
Pre-review checklist