-
Notifications
You must be signed in to change notification settings - Fork 21
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
Prevent AWS credentials refresh from stopping on exception #142
Prevent AWS credentials refresh from stopping on exception #142
Conversation
b399096
to
c55c335
Compare
This will fix #129 It looks like there is no test case for |
@aYukiSekiguchi san, I really appreciate the PR. Could you please check and fix the failing test cases? I kind of waiting for this to be merged. |
I'm not very familiar with GitHub Actions, so I might be mistaken. Ruby 3.2 Unit Testing on ubuntu-latest
Coverage/Coveralls
|
Sorry for our less activity in this plugin. |
Thank you for retrying. It looks like there is a bug in |
Hi, I merged you fixing Linux workflow PR. Could you rebase off master? |
If `aws_credentials()` fails due to an unstable network or other issues, it throws an exception. This stops `timer_execute()` from repeating its block, preventing `OpenSearchOutput` from updating `@_aws_credentials`. As a result, `@_aws_credentials` will expire. This commit catches the exception and prevents it from propagating to `timer_execute()`, ensuring continuous credential updates. Signed-off-by: Yuki Sekiguchi <[email protected]>
c55c335
to
a8e1639
Compare
Thank you. I have rebased this PR. The error with Ruby 3.2 on Ubuntu has been fixed. Only the coverage/coveralls issue remains. |
Sorry to rush, but is there any ETA on merging/releasing this change? |
Sorry for any confusion. I'm waiting for the committer to decide whether the Coveralls failure, which decreased coverage, is acceptable. Some recent commits to the main branch also failed Coveralls, so I think this is sometimes acceptable. |
It seems that PR itself is reasonable but it might be better to add test case for it in assured. |
MEMO: it is enough that mock aws_credentials and raise RuntimeError in second call, then assert existence of error log message. |
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.
Thanks!
Signed-off-by: Kentaro Hayashi <[email protected]>
9a5d2e9
to
b877206
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.
If
aws_credentials()
fails due to an unstable network or other issues, it throws an exception. This stopstimer_execute()
from repeating its block, preventingOpenSearchOutput
from updating@_aws_credentials
. As a result,@_aws_credentials
will expire.This commit catches the exception and prevents it from propagating to
timer_execute()
, ensuring continuous credential updates.