-
Notifications
You must be signed in to change notification settings - Fork 4k
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(codepipeline): S3 source Action with trigger=Events fails for bucketKey a Token #9575
fix(codepipeline): S3 source Action with trigger=Events fails for bucketKey a Token #9575
Conversation
// however, if bucketKey is not a Token, | ||
// we want it to differentiate between multiple actions | ||
// observing the same Bucket with different keys | ||
(Token.isUnresolved(this.props.bucketKey) ? '' : this.props.bucketKey); |
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.
Using an empty string here is good enough for now, but I can already taste the next bug report coming in: "hey it doesn't work if I use 2 S3 source triggers based off of tokens"
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'd prefer you handle the case of multiple tokens as well but up to you.
ab30f96
to
f793244
Compare
@rix0rrr done! Let me know how you like it. |
…ketKey a Token We use bucketKey to differentiate between multiple source actions that observe the same bucket using trigger=Events. However, we can't do that if bucketKey is a lazy value, as Tokens can't be used as parts of identifier for the created Event. So, check for that case explicitly. Fixes aws#9554
f793244
to
50d8411
Compare
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
We use bucketKey to differentiate between multiple source actions
that observe the same bucket using trigger=Events.
However, we can't do that if bucketKey is a lazy value,
as Tokens can't be used as parts of identifier for the created Event.
So, check for that case explicitly.
Fixes #9554
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license