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

feat: Enable Retries For Auth Requests #1791

Merged
merged 5 commits into from
Apr 12, 2024
Merged

feat: Enable Retries For Auth Requests #1791

merged 5 commits into from
Apr 12, 2024

Conversation

@danielbankhead danielbankhead requested review from a team as code owners April 10, 2024 00:10
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Apr 10, 2024
Copy link

@ddelgrosso1 ddelgrosso1 left a comment

Choose a reason for hiding this comment

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

LGTM, only thing I see is a linter warning (not sure if this was pre-existing).

src/auth/identitypoolclient.ts Outdated Show resolved Hide resolved
*/
protected async refreshToken(
refreshToken?: string | null
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically, yes, however since its introduction a few years ago I think this would cause more confusion for customers rather than cleaning it up:

I included this change in the current PR as it was causing a lint issue.

@@ -401,12 +401,12 @@ describe('AwsClient', () => {
// Simulate error during region retrieval.
const scope = nock(metadataBaseUrl)
.get('/latest/meta-data/placement/availability-zone')
.reply(500);
.reply(400);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why were the status codes here all changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically 500s are retryable and tests would fail with an unexpected error. As the tests want a error on the first call, I changed it to 400.

@danielbankhead danielbankhead merged commit 9b69a31 into main Apr 12, 2024
18 checks passed
@danielbankhead danielbankhead deleted the enable-retries branch April 12, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
4 participants