-
Notifications
You must be signed in to change notification settings - Fork 133
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
init: fix S3 ARN parsing #617 #619
Conversation
init/fluent_bit_init_process.go
Outdated
bucketAndFile := strings.SplitN(arnBucketFile, "/", 2) | ||
s3ARN, err := arn.Parse(userInput) | ||
if err != nil { | ||
logrus.Fatalf("[FluentBit Init Process] Unrecognizable arn: %s\n", userInput) |
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 it indicate that this is the s3 arn, similar to the task arn failure?
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'll print the arn tho, so the user will see its the S3 arn they passed in?
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 think I'll change "unrecognizable" to "failure to parse" or something like that
I need to test this with the init integ test before we can merge and release it. |
Signed-off-by: Wesley Pettit <[email protected]>
7a0873a
to
87093f2
Compare
Have tested it on my previously broken deployment in GovCloud and can confirm this is working as expected now 👍 |
So I am struggling to test this myself due issues that I don't fully understand with working in gov cloud. I ran the integ test we have with an S3 bucket in the main partition, it worked, so no regression. I then tried running the init with gov cloud credentials and I'm getting:
It got my bucket name and key correct so the parsing definitely does work. |
I noticed that a lot of the tests have the region hardcoded to
I also noticed that the tests are using legacy Other than that, I was having trouble with it expecting various values which I haven't seen documented, like S3_BUCKET_NAME, KINESIS_STREAM, and probably something around S3 actions (causing errors of: That said; i'm actively using this in GovCloud right now, so i'm happy that the changes are working anyway :D |
Issue #, if available:
Fixes #617
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.