-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(aws-events): EventBus no longer generates a name if needed #18070
Labels
@aws-cdk/aws-events
Related to CloudWatch Events
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p1
Comments
ChrisSargent
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 17, 2021
rix0rrr
added a commit
that referenced
this issue
Dec 23, 2021
Since the `EventBus` resource requires a name, CDK will generate one for you. However, because of the way the logic was written, it would only generate one for you if you did NOT pass a props object. In effect, these two statements would have a different effect: ```ts new EventBus(this, 'Bus'); new EventBus(this, 'Bus', {}); ``` Fix that issue. Fixes #18070.
rix0rrr
added
effort/small
Small work item – less than a day of effort
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 23, 2021
mergify bot
pushed a commit
that referenced
this issue
Jan 3, 2022
Since the `EventBus` resource requires a name, CDK will generate one for you. However, because of the way the logic was written, it would only generate one for you if you did NOT pass a props object. In effect, these two statements would have a different effect: ```ts new EventBus(this, 'Bus'); new EventBus(this, 'Bus', {}); ``` Fix that issue. Fixes #18070. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
TikiTDO
pushed a commit
to TikiTDO/aws-cdk
that referenced
this issue
Feb 21, 2022
) Since the `EventBus` resource requires a name, CDK will generate one for you. However, because of the way the logic was written, it would only generate one for you if you did NOT pass a props object. In effect, these two statements would have a different effect: ```ts new EventBus(this, 'Bus'); new EventBus(this, 'Bus', {}); ``` Fix that issue. Fixes aws#18070. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-events
Related to CloudWatch Events
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p1
What is the problem?
Before v1.29.0, when creating an EventBus without giving a specified name, cdk would generate one automatically (or if using
cdk.physicalName.GENERATE_IF_NEEDED
A change made in v1.29.0 here, changed that behaviour: 707fa00#diff-e578aba9e8d0d3ee80700fb06d4ab56133d869f88887efd65941d6e2e90bec98
The 'offending' line seems to be line 280 where the addition
return
was added.Reproduction Steps
I have create a minimal reproduction here:
Working version: https://github.com/ChrisSargent/cdk-issues/tree/cdkv1-working
Failing version: https://github.com/ChrisSargent/cdk-issues/tree/cdkv1-failing
Diff showing only package versions changed:ChrisSargent/cdk-issues@cdkv1-working...cdkv1-failing
FYI commenting lines 279 - 281 'fixes' this particular issue but I'm not sure if that is the right long-term fix.
What did you expect to happen?
The physical name to be generated
What actually happened?
Synth Errors:
CDK CLI Version
1.129.0
Framework Version
No response
Node.js Version
14
OS
MacOs
Language
Typescript
Language Version
No response
Other information
Original PR: #17008
The text was updated successfully, but these errors were encountered: