-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix: role_arn support in AWSCloudWatch and AWSEmf exporters #42541
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
fix: role_arn support in AWSCloudWatch and AWSEmf exporters #42541
Conversation
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
axw
left a comment
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.
I'm afraid I don't have enough expertise in the AWS SDK to know if this is right. A few things that may help:
- documenting how you have tested this
- adding unit tests
- linking the old code related to assume role, that was working with aws-sdk-go
|
@axw , addressing your comments:
|
Thanks @yaten2302. Based on that, assuming it works for Kinesis, I suppose the code change is fine. If nothing else, a little bit of manual testing would be good. |
|
@axw , I was trying to refactor the |
|
@yaten2302 in my opinion, a manual test is the minimum requirement. Adding a unit test would be great too, but given the simplicity and precedent for this code I personally wouldn't block on it. Put another way: I'd like to see evidence of manual testing. Your choice on whether you add a unit test, unless someone else feels strongly. |
|
@axw , if I've understood this correctly, then, manual testing is a must for this PR, so that it doesn't breaks in future, right? WDYT? |
Manual testing is just to make sure the change does what you intended. That code can unintentionally removed or broken, so it doesn't prevent future breakage. Automated tests will help prevent future breakage. Ideally you should have some functional tests that would fail if the
Maybe @pavolloffay?
I don't see why not. If it's not possible, or not practical, you could also run the collector in an EC2 instance. |
|
If anyone wants to test this I have built a docker image |
|
Hi @pavolloffay , for this comment, I'm refactoring the Have I got your point correctly? |
|
Also, thanks for the docker img. For manually testing this, can I deploy this on localstack and test it out if it's working or not? |
|
Our QE test the cloudwatch logs exporter with this fix and it works. Thanks for putting this together! |
andrzej-stencel
left a comment
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 @yaten2302 for the contribution, much appreciated. Also thank you everyone involved in testing this manually.
We should have a unit test for this if possible.
Other than that, can we get the eyes of some AWS subject matter experts on this before merging? @mxiamxia @Aneurysm9 can you take a look as codeowners?
|
Hi @andrzej-stencel @pavolloffay , thanks for the reviews, I'll push the unit tests for this change soon 👍 |
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
|
It seems they pass here as well no? |
|
In CI, it's failing. But on locally it's working fine. |
Signed-off-by: Yaten <yaten598@gmail.com>
Signed-off-by: Yaten <yaten598@gmail.com>
|
Could someone merge this PR? |

Description
This PR attempts to fix re-add the support of
role_arnin AWSCloudWatch and AWSEmf exporters.The support was present in aws-go-sdk-v1, but broke while moving to v2.
Link to tracking issue
Fixes #42115