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

Serve cache on transient errors #34

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Serve cache on transient errors #34

merged 7 commits into from
Oct 25, 2024

Conversation

benjaminkz
Copy link
Contributor

STSGetCallerIdentity, DescribeSecret and GetSecretValue requests may fail because of common network errors like Sdkerror::Timeout and server-side errors like Sdkerror::ServiceError<Box, HttpResponse>. This cr adds a new configurable parameter ignore_transient_errors. With that enabled, the agent will return the cached secret when running into common transient errors like the above.

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

@benjaminkz benjaminkz requested a review from a team as a code owner October 22, 2024 21:15
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 84.10256% with 31 lines in your changes missing coverage. Please review.

Project coverage is 70.59%. Comparing base (c604b4b) to head (db3e1af).

Files with missing lines Patch % Lines
aws_secretsmanager_caching/src/lib.rs 84.39% 27 Missing ⚠️
aws_secretsmanager_agent/src/config.rs 80.00% 2 Missing ⚠️
aws_secretsmanager_caching/src/error.rs 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
+ Coverage   68.80%   70.59%   +1.79%     
==========================================
  Files          14       15       +1     
  Lines        2885     2850      -35     
  Branches       10        9       -1     
==========================================
+ Hits         1985     2012      +27     
+ Misses        900      838      -62     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

simonmarty
simonmarty previously approved these changes Oct 24, 2024
@simonmarty simonmarty enabled auto-merge (squash) October 24, 2024 17:41
README.md Outdated Show resolved Hide resolved
@simonmarty simonmarty merged commit d753a25 into aws:main Oct 25, 2024
3 checks passed
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.

5 participants