-
Notifications
You must be signed in to change notification settings - Fork 40
fix(cli-integ): add retry for iam eventual consistency issue and migration tests for java #788
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
89fd917
add retry for `cdk migrate java` & `fetchDockerLoginCredential`
abidhasan-aws 2b6c048
remove retry from docker-credential-asset
abidhasan-aws 897b548
add retry for async block based on error
abidhasan-aws a14cb43
nit
abidhasan-aws d6755cd
chore: self mutation
invalid-email-address 092f4c9
Merge branch 'main' into fix-flaky-cli-integ-tests
abidhasan-aws 0e436e7
Merge branch 'main' into fix-flaky-cli-integ-tests
abidhasan-aws 653d9a2
Merge branch 'main' into fix-flaky-cli-integ-tests
abidhasan-aws 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 hidden or 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 hidden or 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
6 changes: 3 additions & 3 deletions
6
...li-integ/tests/cli-integ-tests/migrate/cdk-migrate-deploys-successfully-java.integtest.ts
This file contains hidden or 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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { deploysSuccessfully } from './testcase'; | ||
import { integTest, withCDKMigrateFixture } from '../../../lib'; | ||
import { integTest, withCDKMigrateFixture, withRetry } from '../../../lib'; | ||
|
||
const language = 'java'; | ||
|
||
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime | ||
|
||
integTest( | ||
`cdk migrate ${language} deploys successfully`, | ||
withCDKMigrateFixture(language, async (fixture) => { | ||
withRetry(withCDKMigrateFixture(language, async (fixture) => { | ||
await deploysSuccessfully(fixture, language); | ||
}), | ||
})), | ||
); |
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.
Should this be
retry
orwaitForAssumeRole
or evenretryOnMatchingErrors
?Uh oh!
There was an error while loading. Please reload this page.
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.
It should not be
waitForAssumeRole
.We are retrying this because in this call, there is a credential fetching that needs a wait period for IAM eventual consistency. We could use
retryOnMatchingErrors
, but there is no clean way to catch error and retry based on that. The package just returnsexited with code 1
in case of errors.So we are retrying anyway and not based on errors, thus the generic
retry
.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.
Final thought should we add a sleep time to retry function ? Is that something that can be used like the wait and retry we do in
retryOnMatchingErrors
? Would that add any value ?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.
It already has a sleep time of 5 seconds.