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

Handle specific exception codes on RCI call. #4457

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Conversation

BinSquare
Copy link

@BinSquare BinSquare commented Dec 16, 2024

Summary

  1. This adds a terminalError wrapper around 2 exception codes that are known to not be recoverable by retrying (this can help avoid retry storm). This data was verified from internal investigation.
  2. Separately, it also checks that throttlingError does return exitcode 1 i.e. it will be retried.
  3. Refactored from isTransient to isTerminal because the terminal cases are what we want to specifically handle while the default is to delegate to existing retry mechanism for other cases.

Implementation details

Changes are implemented on agent calling RCi.

Testing

Added 2 new tests, one to verify throttlingError returns exitcode 1 + one to verify ClientException will result in exit code 5 i.e. the terminal state for agent.

New tests cover the changes:

Description for the changelog

Terminally exit on unrecoverable RCI exception errors.

Additional Information

Does this PR include breaking model changes? If so, Have you added transformation functions?

No

Does this PR include the addition of new environment variables in the README?

No

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@BinSquare BinSquare requested a review from a team as a code owner December 16, 2024 18:05
@BinSquare BinSquare changed the base branch from master to dev December 20, 2024 22:35
@BinSquare BinSquare force-pushed the master branch 5 times, most recently from 49c48be to 7a5da69 Compare December 23, 2024 17:48
@BinSquare BinSquare changed the title Data model changes to consume ThrottlingExceptions. Handle specific exception codes on RCI call. Dec 23, 2024
@BinSquare BinSquare force-pushed the master branch 4 times, most recently from 48fc82a to 7591552 Compare December 27, 2024 18:15
agent/app/errors.go Show resolved Hide resolved
agent/app/agent.go Outdated Show resolved Hide resolved
timj-hh
timj-hh previously approved these changes Dec 27, 2024
xxx0624
xxx0624 previously approved these changes Dec 27, 2024
agent/app/agent_test.go Outdated Show resolved Hide resolved
agent/app/agent.go Show resolved Hide resolved
@BinSquare BinSquare dismissed stale reviews from xxx0624 and timj-hh via 2029165 December 31, 2024 19:47
@BinSquare BinSquare force-pushed the master branch 11 times, most recently from 9d38a72 to 683ded4 Compare December 31, 2024 21:52
@BinSquare BinSquare force-pushed the master branch 10 times, most recently from 3569039 to a3e49ad Compare January 1, 2025 01:24
@BinSquare
Copy link
Author

@amogh09 has a separate PR which will address the static check failure due to the copyright date change from 2024 -> 2025 here: #4461

singholt
singholt previously approved these changes Jan 2, 2025
agent/app/agent_test.go Outdated Show resolved Hide resolved
agent/app/agent_test.go Outdated Show resolved Hide resolved
@singholt singholt merged commit 6533f88 into aws:dev Jan 2, 2025
40 checks passed
@prateekchaudhry prateekchaudhry mentioned this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants