Skip to content
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(spec2cdk): get tag gives null result in Java CDK #29870

Merged
merged 4 commits into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tools/@aws-cdk/spec2cdk/lib/cdk/resource-decider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ export class ResourceDecider {
summary: 'Tag Manager which manages the tags for this resource',
},
},
initializer: (_: Expression) =>
initializer: (props: Expression) =>
new CDK_CORE.TagManager(
this.tagManagerVariant(variant),
expr.lit(this.resource.cloudFormationType),
expr.UNDEFINED,
$E(props)[originalName],
expr.object({ tagPropertyName: expr.lit(originalName) }),
),
cfnValueToRender: {
[originalName]: $this.tags.renderTags($this[rawTagsPropName]),
[originalName]: $this.tags.renderTags(),
Comment on lines +156 to +164
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting the changes I made in this PR #28989

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the HAS_25610 code? Do we not need to revert that?

[originalName]: $this.tags.renderTags(...(HAS_25610 ? [$this[rawTagsPropName]] : [])),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No HAS_25610 is always set to false before. So for legacy tagging, this PR changes it back to the original state. For modern tagging style, we want to keep it as is.

},
},
{
Expand Down
Loading