-
Notifications
You must be signed in to change notification settings - Fork 27
fix(toolkit-lib): message including tokens from annotations cannot output correctly #101
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
Conversation
Head branch was pushed to by a user without write access
|
||
expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ | ||
level: 'warn', | ||
message: expect.stringContaining('{"Fn::Join":["",["stackId: ",{"Ref":"AWS::StackId"}]]}'), |
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 don't think this is a particularly nice rendering.
How do these { Fn::Join }
objects get into the annotations in the first place? They only have meaning inside a CFN template, so if they are produced outside the context of a CFN template that is wrong.
Are they resolve()
d by any chance? Because they probably shouldn't be.
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.
How do these { Fn::Join } objects get into the annotations in the first place?
The issue mentioned about a situation where the user calls Annotations like the following:
(this
is Stack class and ${this.stackId}
is a token. So stackId: ${this.stackId}
will be a string with { Fn::Join }
after resolve.)
Annotations.of(this).addInfo(`stackId: ${this.stackId}`);
Are they resolve()d by any chance?
It seems that the Stack Synthesizer resolves the metadatas including them added by Annotations.
We can avoid resolving tokens added by Annotations by changing this code as follows.
if (node.node.metadata.length > 0) {
// Make the path absolute
output[Node.PATH_SEP + node.node.path] = node.node.metadata.map(md => {
if ([
cxschema.ArtifactMetadataEntryType.ERROR,
cxschema.ArtifactMetadataEntryType.WARN,
cxschema.ArtifactMetadataEntryType.INFO,
].includes(md.type as cxschema.ArtifactMetadataEntryType)) {
return md;
}
const resolved = stack.resolve(md);
return resolved as cxschema.MetadataEntry;
});
However, in that case, the metadatas would be written as the token format ("stackId: ${Token[AWS::StackId.1119]}"
) in manifest.json. I feel uncomfortable with this because I think the tokens are for CDK Apps and should be resolved in the synth phase, so I didn't decide it for now. (see the "Alternative Approach" in the description of this PR). But if this approach is fine, then I can adopt the approach.
Or what do you think of a way to make it an error if the user tries to put a token in Annotations?
(But in that case, the CDK application that the user including the issue author is currently running may not work, so a feature flag is needed...?)
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.
Or what do you think of a way to make it an error if the user tries to put a token in Annotations?
Yes this would have been ideal, but we can't do that anymore for the reason you already mentioned. People are already putting tokens into annotations (as useless as it is), otherwise you wouldn't have had to file this PR.
But yes, the change should be made inside the construct library. The data payload of an annotation should be a string, whatever the string is. So the library should make sure it's a string, and we don't have to deal with the situation where it's a non-string in the CLI.
I feel comfortable leaving the token unrendered for now; if people come to complain that they were parsing this data structure we will come up with a correct behavior then.
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 feel comfortable leaving the token unrendered for now; if people come to complain that they were parsing this data structure we will come up with a correct behavior then.
Yes, got it. I will submit the another PR to not resolve the tokens by annotations in aws-cdk-lib.
Thanks.
…rrectly (#33706) ### Issue # (if applicable) Closes #33707 ### Reason for this change If a stack with name 'some-stack' includes an info annotation ```ts Annotations.of(this).addInfo(`stackId: ${this.stackId}`); ``` then the following output results: ``` [Info at /some-stack] [object Object] ``` That's because data comes from Annotations and the data can be of object type containing 'Fn::Join' or 'Ref' when tokens are included in Annotations. The issue mentioned a proposal to output the data in the form of tokens like `[Info at /CdkSampleStack] ${Token[AWS::StackId.1116]}`. ### Description of changes **Approach 1** for now. (I am still wondering if approach 3 would be better...) See below: ### Approach 1 The PR makes messages with tokens by annotations unresolved. #### NOTE This change would also output a token format in `manifest.json`. **If users run integ tests with annotations including tokens, the manifest.json would change for every run.** (like `${Token[AWS::StackId.1119]}` -> `${Token[AWS::StackId.123]}` -> `${Token[AWS::StackId.521]}` -> ...) ```json { // ... "CdkSampleStack": { // ... "metadata": { "/CdkSampleStack": [ { "type": "aws:cdk:info", "data": "stackId: ${Token[AWS::StackId.1119]}", ``` ### Approach 2 Change the type for the `msg.entry.data` (`MetadataEntryData` for `MetadataEntry`) to a string type with `JSON.stringify` if the type is an objective type in cdk-cli. https://github.com/aws/aws-cdk-cli/blob/cdk%40v2.1003.0/packages/%40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts#L771 Then I had submitted the [PR](aws/aws-cdk-cli#101) in aws-cdk-cli. But talked with Rico that the change should be made inside cdk-lib and leave the token unrendered. aws/aws-cdk-cli#101 (comment) ### Approach 3 Change the data type to a string type after resolve if the data is by annotations with tokens. This approach doesn't make differences in manifest.json for every run and the original format (with 'Ref' or 'Fn::Join') is kept. However, the issue for this PR and comments in the PR submitted (aws-cdk-cli) has proposed the approach with unresolved tokens, I decided the approach 1 for now. 63fd78b ```ts if (node.node.metadata.length > 0) { // Make the path absolute output[Node.PATH_SEP + node.node.path] = node.node.metadata.map(md => { const resolved = stack.resolve(md) as cxschema.MetadataEntry; const isAnnotation = [ cxschema.ArtifactMetadataEntryType.ERROR, cxschema.ArtifactMetadataEntryType.WARN, cxschema.ArtifactMetadataEntryType.INFO, ].includes(md.type as cxschema.ArtifactMetadataEntryType); // Transform the data to a string for the case where Annotations include a token. // Otherwise, the message is resolved and output as `[object Object]` after synth // because the message will be object type using 'Ref' or 'Fn::Join'. const mdWithStringData: cxschema.MetadataEntry = { ...resolved, data: (isAnnotation && typeof resolved.data === 'object') ? JSON.stringify(resolved.data) : resolved.data, }; return mdWithStringData; }); } ``` This approach outputs the message as the following style: ``` {"Fn::Join":["",["Cannot add a resource policy to your dead letter queue associated with rule ",{"Ref":"Rule4C995B7F"}," because the queue is in a different account. You must add the resource policy manually to the dead letter queue in account 444455556666. [ack: @aws-cdk/aws-events-targets:manuallyAddDLQResourcePolicy]"]]} ``` ### Additional Information see: #33707 (comment) aws/aws-cdk-cli#101 (comment) ### Describe any new or updated permissions being added ### Description of how you validated changes Unit tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…rrectly (aws#33706) ### Issue # (if applicable) Closes aws#33707 ### Reason for this change If a stack with name 'some-stack' includes an info annotation ```ts Annotations.of(this).addInfo(`stackId: ${this.stackId}`); ``` then the following output results: ``` [Info at /some-stack] [object Object] ``` That's because data comes from Annotations and the data can be of object type containing 'Fn::Join' or 'Ref' when tokens are included in Annotations. The issue mentioned a proposal to output the data in the form of tokens like `[Info at /CdkSampleStack] ${Token[AWS::StackId.1116]}`. ### Description of changes **Approach 1** for now. (I am still wondering if approach 3 would be better...) See below: ### Approach 1 The PR makes messages with tokens by annotations unresolved. #### NOTE This change would also output a token format in `manifest.json`. **If users run integ tests with annotations including tokens, the manifest.json would change for every run.** (like `${Token[AWS::StackId.1119]}` -> `${Token[AWS::StackId.123]}` -> `${Token[AWS::StackId.521]}` -> ...) ```json { // ... "CdkSampleStack": { // ... "metadata": { "/CdkSampleStack": [ { "type": "aws:cdk:info", "data": "stackId: ${Token[AWS::StackId.1119]}", ``` ### Approach 2 Change the type for the `msg.entry.data` (`MetadataEntryData` for `MetadataEntry`) to a string type with `JSON.stringify` if the type is an objective type in cdk-cli. https://github.com/aws/aws-cdk-cli/blob/cdk%40v2.1003.0/packages/%40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts#L771 Then I had submitted the [PR](aws/aws-cdk-cli#101) in aws-cdk-cli. But talked with Rico that the change should be made inside cdk-lib and leave the token unrendered. aws/aws-cdk-cli#101 (comment) ### Approach 3 Change the data type to a string type after resolve if the data is by annotations with tokens. This approach doesn't make differences in manifest.json for every run and the original format (with 'Ref' or 'Fn::Join') is kept. However, the issue for this PR and comments in the PR submitted (aws-cdk-cli) has proposed the approach with unresolved tokens, I decided the approach 1 for now. aws@63fd78b ```ts if (node.node.metadata.length > 0) { // Make the path absolute output[Node.PATH_SEP + node.node.path] = node.node.metadata.map(md => { const resolved = stack.resolve(md) as cxschema.MetadataEntry; const isAnnotation = [ cxschema.ArtifactMetadataEntryType.ERROR, cxschema.ArtifactMetadataEntryType.WARN, cxschema.ArtifactMetadataEntryType.INFO, ].includes(md.type as cxschema.ArtifactMetadataEntryType); // Transform the data to a string for the case where Annotations include a token. // Otherwise, the message is resolved and output as `[object Object]` after synth // because the message will be object type using 'Ref' or 'Fn::Join'. const mdWithStringData: cxschema.MetadataEntry = { ...resolved, data: (isAnnotation && typeof resolved.data === 'object') ? JSON.stringify(resolved.data) : resolved.data, }; return mdWithStringData; }); } ``` This approach outputs the message as the following style: ``` {"Fn::Join":["",["Cannot add a resource policy to your dead letter queue associated with rule ",{"Ref":"Rule4C995B7F"}," because the queue is in a different account. You must add the resource policy manually to the dead letter queue in account 444455556666. [ack: @aws-cdk/aws-events-targets:manuallyAddDLQResourcePolicy]"]]} ``` ### Additional Information see: aws#33707 (comment) aws/aws-cdk-cli#101 (comment) ### Describe any new or updated permissions being added ### Description of how you validated changes Unit tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This PR contains the following updates: | Package | Type | Update | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---|---|---| | | | lockFileMaintenance | All locks refreshed | | | | | | [aws-cdk](https://redirect.github.com/aws/aws-cdk) ([source](https://redirect.github.com/aws/aws-cdk-cli/tree/HEAD/packages/aws-cdk)) | devDependencies | minor | [`2.1003.0` -> `2.1004.0`](https://renovatebot.com/diffs/npm/aws-cdk/2.1003.0/2.1004.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [aws-cdk-lib](https://redirect.github.com/aws/aws-cdk) ([source](https://redirect.github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib)) | dependencies | minor | [`2.182.0` -> `2.184.1`](https://renovatebot.com/diffs/npm/aws-cdk-lib/2.182.0/2.184.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [openid-client](https://redirect.github.com/panva/openid-client) | dependencies | patch | [`6.3.3` -> `6.3.4`](https://renovatebot.com/diffs/npm/openid-client/6.3.3/6.3.4) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [vite](https://vite.dev) ([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite)) | devDependencies | patch | [`6.2.1` -> `6.2.2`](https://renovatebot.com/diffs/npm/vite/6.2.1/6.2.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | 🔧 This Pull Request updates lock files to use the latest dependency versions. --- ### Release Notes <details> <summary>aws/aws-cdk-cli (aws-cdk)</summary> ### [`v2.1004.0`](https://redirect.github.com/aws/aws-cdk-cli/compare/[email protected]@v2.1004.0) [Compare Source](https://redirect.github.com/aws/aws-cdk-cli/compare/[email protected]@v2.1004.0) </details> <details> <summary>aws/aws-cdk (aws-cdk-lib)</summary> ### [`v2.184.1`](https://redirect.github.com/aws/aws-cdk/releases/tag/v2.184.1) [Compare Source](https://redirect.github.com/aws/aws-cdk/compare/v2.184.0...v2.184.1) ##### Reverts - **iam:** fix(iam): adding organization id pattern verification ([#​33773](https://redirect.github.com/aws/aws-cdk/pull/33773)) ([f7ed316](https://redirect.github.com/aws/aws-cdk/commit/f7ed3165056c385249735ebb17a53d0fedd69c54)), closes [aws/aws-cdk#33768](https://redirect.github.com/aws/aws-cdk/issues/33768) *** #### Alpha modules (2.184.1-alpha.0) ### [`v2.184.0`](https://redirect.github.com/aws/aws-cdk/releases/tag/v2.184.0) [Compare Source](https://redirect.github.com/aws/aws-cdk/compare/v2.183.0...v2.184.0) ##### Features - **ecr:** throw ValidationError instead of untyped Errors ([#​33750](https://redirect.github.com/aws/aws-cdk/issues/33750)) ([242690f](https://redirect.github.com/aws/aws-cdk/commit/242690f9aa897b11e1b1a73036a9927ed3473eb2)) - **lambda:** support s3 OFD for Kinesis/DynamoDB ([#​33739](https://redirect.github.com/aws/aws-cdk/issues/33739)) ([3f1fecf](https://redirect.github.com/aws/aws-cdk/commit/3f1fecfecb871d3912a74471a555b223a6dcaa20)) - **rds:** allow to specify availability zone for Aurora instances ([#​33515](https://redirect.github.com/aws/aws-cdk/issues/33515)) ([583d5f2](https://redirect.github.com/aws/aws-cdk/commit/583d5f24f03d3b2f8b072d0a41d41b75f8814f8c)), closes [#​33503](https://redirect.github.com/aws/aws-cdk/issues/33503) [#​30618](https://redirect.github.com/aws/aws-cdk/issues/30618) ##### Bug Fixes - **codepipeline:** replace account root principal with current pipeline role in the trust policy under ff: [@​aws-cdk/pipelines](https://redirect.github.com/aws-cdk/pipelines):reduceStageRoleTrustScope ([#​33742](https://redirect.github.com/aws/aws-cdk/issues/33742)) ([a64b01c](https://redirect.github.com/aws/aws-cdk/commit/a64b01cc2969822bb92d7bd72152ecb2ccf1c1cf)), closes [#​33709](https://redirect.github.com/aws/aws-cdk/issues/33709) - **core:** message including tokens from annotations cannot output correctly ([#​33706](https://redirect.github.com/aws/aws-cdk/issues/33706)) ([55a3c4c](https://redirect.github.com/aws/aws-cdk/commit/55a3c4caefdb283280d6c16d3719f3e311e31ec9)), closes [40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts#L771](https://redirect.github.com/40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts/issues/L771) [/github.com/aws/aws-cdk-cli/pull/101#discussion_r1977310824](https://redirect.github.com/aws//github.com/aws/aws-cdk-cli/pull/101/issues/discussion_r1977310824) [/github.com/aws/aws-cdk/issues/33707#issuecomment-2705936933](https://redirect.github.com/aws//github.com/aws/aws-cdk/issues/33707/issues/issuecomment-2705936933) [/github.com/aws/aws-cdk-cli/pull/101#discussion_r1969298218](https://redirect.github.com/aws//github.com/aws/aws-cdk-cli/pull/101/issues/discussion_r1969298218) - **events-targets:** add LogGroupTargetInput.fromObjectV2() method ([#​33720](https://redirect.github.com/aws/aws-cdk/issues/33720)) ([584a58c](https://redirect.github.com/aws/aws-cdk/commit/584a58c2dcd43d9ebd2533186a2f5f9a083bb478)) *** #### Alpha modules (2.184.0-alpha.0) ##### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES - **glue-alpha:** Updated casing of `workflow.addconditionalTrigger` to `workflow.addConditionalTrigger`. ##### Bug Fixes - **glue-alpha:** inconsistent workflow addconditionalTrigger casing ([#​33752](https://redirect.github.com/aws/aws-cdk/issues/33752)) ([4886a3e](https://redirect.github.com/aws/aws-cdk/commit/4886a3e503b22f3dfadca908501a2cb208c2ebee)), closes [#​33751](https://redirect.github.com/aws/aws-cdk/issues/33751) [#​33751](https://redirect.github.com/aws/aws-cdk/issues/33751) ### [`v2.183.0`](https://redirect.github.com/aws/aws-cdk/releases/tag/v2.183.0) [Compare Source](https://redirect.github.com/aws/aws-cdk/compare/v2.182.0...v2.183.0) ##### Features - **bedrock:** support DeepSeek R1 ([#​33727](https://redirect.github.com/aws/aws-cdk/issues/33727)) ([3de0818](https://redirect.github.com/aws/aws-cdk/commit/3de0818b92c7130ac31f647329a265a742d4bc04)) - **rds:** add MySQL enginge versions 5.7.44(patch), 8.0.41 and 8.4.4 ([#​33732](https://redirect.github.com/aws/aws-cdk/issues/33732)) ([d1a8cbe](https://redirect.github.com/aws/aws-cdk/commit/d1a8cbeaa8153296ecf2d797d95fa31fd6b79582)) - update L1 CloudFormation resource definitions ([#​33718](https://redirect.github.com/aws/aws-cdk/issues/33718)) ([c4fceb2](https://redirect.github.com/aws/aws-cdk/commit/c4fceb2f28b9582cd957040a2c9e983343b9eba9)) - **codebuild:** throw `ValidationError` instead of untyped Errors ([#​33700](https://redirect.github.com/aws/aws-cdk/issues/33700)) ([d12854a](https://redirect.github.com/aws/aws-cdk/commit/d12854a96cebb428feb78908a093743889ef52bf)), closes [#​32569](https://redirect.github.com/aws/aws-cdk/issues/32569) - **core:** `RemovalPolicies.of(scope)` ([#​32283](https://redirect.github.com/aws/aws-cdk/issues/32283)) ([34c547c](https://redirect.github.com/aws/aws-cdk/commit/34c547c83e9fa5f055b0c60be975087e4f836ebb)) - **logs:** add support for fieldIndexPolicies in log group L2 Construct ([#​33416](https://redirect.github.com/aws/aws-cdk/issues/33416)) ([6c882e0](https://redirect.github.com/aws/aws-cdk/commit/6c882e0acc36b632ff80286e72bac08734d70d72)), closes [#​33366](https://redirect.github.com/aws/aws-cdk/issues/33366) - **lambda** backfill missing enums for lambda ([#​33651](https://redirect.github.com/aws/aws-cdk/issues/33651)) ([4227747](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/42277471040c4c845d9a4f1b3649df9cb675ecfb)) - **rds** add new MariaDB engine versions 10.5.28, 10.6.21, 10.11.11, and 11.4.5 ([#​33665](https://redirect.github.com/aws/aws-cdk/issues/33665)) ([7f5bf4e](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/7f5bf4e311555bdf7aa0d7637d7b89dd0421c2f6)) - **ec2** add VPC interface endpoints for Location Service ([#​33667](https://redirect.github.com/aws/aws-cdk/issues/33667)) ([4bc151b](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/4bc151bafdd4398f632b06f7d801c2a550e2340a)) - **ec2** add VPC interface endpoints for WAFV2 ([#​33685](https://redirect.github.com/aws/aws-cdk/issues/33685)) ([5eb11d2](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/5eb11d26d00a5cccc18d9e4e6483dd613d4c4dbb)) - **ec2** add VPC interface endpoints for Emr Serverless ([#​33715](https://redirect.github.com/aws/aws-cdk/issues/33715)) ([25619a0](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/25619a01e78040c8b9442a9a7ed434b936e01491)) - **ec2** add VPC interface endpoints for Security Lake ([#​33728](https://redirect.github.com/aws/aws-cdk/issues/33728)) ([5fcbe2a](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/5fcbe2ac2e3c377e39b38c278434997dbed19ab6)) ##### Bug Fixes - **core:** pressing Ctrl-C when content is bundled leaves broken asset ([#​33692](https://redirect.github.com/aws/aws-cdk/issues/33692)) ([00ef50d](https://redirect.github.com/aws/aws-cdk/commit/00ef50d36d5b7322f71e38062f03017eff878705)), closes [#​33201](https://redirect.github.com/aws/aws-cdk/issues/33201) [#​32869](https://redirect.github.com/aws/aws-cdk/issues/32869) [#​14474](https://redirect.github.com/aws/aws-cdk/issues/14474) - **custom-resources:** fix circular dependency when a custom role provided to Provider ([#​33600](https://redirect.github.com/aws/aws-cdk/issues/33600)) ([77b6fa9](https://redirect.github.com/aws/aws-cdk/commit/77b6fa94c0446ec81e5ae8949d6d0eb571d89dea)), closes [#​20360](https://redirect.github.com/aws/aws-cdk/issues/20360) - **efs:** cannot run an integ test when `transitionToArchivePolicy` is specified and `throughputMode` is `undefined` ([#​33713](https://redirect.github.com/aws/aws-cdk/issues/33713)) ([842201c](https://redirect.github.com/aws/aws-cdk/commit/842201c344a6f76f8cfd74b65cd73f63259b777b)) - **eks:** cluster deployment issue when the authentication mode is not changing ([#​33680](https://redirect.github.com/aws/aws-cdk/issues/33680)) ([ba2dfd1](https://redirect.github.com/aws/aws-cdk/commit/ba2dfd10504504d78e55bc242a4747024a504389)) *** #### Alpha modules (2.183.0-alpha.0) ##### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES - **scheduler-targets-alpha:** The `InspectorStartAssessmentRun` target's constructor now accepts `IAssessmentTemplate` instead of `CfnAssessmentTemplate` as its parameter type. To migrate existing code, use the `AssessmentTemplate.fromCfnAssessmentTemplate()` method to convert your `CfnAssessmentTemplate` instances to `IAssessmentTemplate`. ##### Features - **kinesisanalytics-flink-alpha** backfill missing enums for kinesisanalytics-flink-alpha ([#​33632](https://redirect.github.com/aws/aws-cdk/pull/33632)) ([b55199a](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/b55199a782582348408fb75123c533977b38326d)) - **kinesisfirehose-destinations-alpha** backfill missing enums for kinesisfirehose-destinations-alpha ([#​33633](https://redirect.github.com/aws/aws-cdk/pull/33633)) ([6ed7a45](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/6ed7a452e261b0033b44d0b2b61b18466d6e6b48)) ##### Bug Fixes - **scheduler-alpha:** deprecate `Group` in favour of `ScheduleGroup` ([#​33678](https://redirect.github.com/aws/aws-cdk/issues/33678)) ([4d8eae9](https://redirect.github.com/aws/aws-cdk/commit/4d8eae9da577a94114602df261c98b65aa616956)) - **scheduler-targets-alpha:** update inspector target to use IAssessmentTemplate instead of CfnAssessmentTemplate ([#​33682](https://redirect.github.com/aws/aws-cdk/issues/33682)) ([50ba3ef](https://redirect.github.com/aws/aws-cdk/commit/50ba3efabca81a3c57ce34654f8ec1002deace6f)) </details> <details> <summary>panva/openid-client (openid-client)</summary> ### [`v6.3.4`](https://redirect.github.com/panva/openid-client/blob/HEAD/CHANGELOG.md#634-2025-03-12) [Compare Source](https://redirect.github.com/panva/openid-client/compare/v6.3.3...v6.3.4) ##### Documentation - bump typedoc ([36e8714](https://redirect.github.com/panva/openid-client/commit/36e8714cdec666afa865c2dd7b49d4a983ee3083)) ##### Refactor - use subpath export for JWE decryption dependency ([f8c39fc](https://redirect.github.com/panva/openid-client/commit/f8c39fc1bb517ccfdfc2445bce4cafac6807c676)) </details> <details> <summary>vitejs/vite (vite)</summary> ### [`v6.2.2`](https://redirect.github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small622-2025-03-14-small) [Compare Source](https://redirect.github.com/vitejs/vite/compare/v6.2.1...v6.2.2) - fix: await client buildStart on top level buildStart ([#​19624](https://redirect.github.com/vitejs/vite/issues/19624)) ([b31faab](https://redirect.github.com/vitejs/vite/commit/b31faab2a81b839e4b747baeb9c7a7cbb724f8d2)), closes [#​19624](https://redirect.github.com/vitejs/vite/issues/19624) - fix(css): inline css correctly for double quote use strict ([#​19590](https://redirect.github.com/vitejs/vite/issues/19590)) ([d0aa833](https://redirect.github.com/vitejs/vite/commit/d0aa833296668fc420a27a1ea88ecdbdeacdbce7)), closes [#​19590](https://redirect.github.com/vitejs/vite/issues/19590) - fix(deps): update all non-major dependencies ([#​19613](https://redirect.github.com/vitejs/vite/issues/19613)) ([363d691](https://redirect.github.com/vitejs/vite/commit/363d691b4995d72f26a14eb59ed88a9483b1f931)), closes [#​19613](https://redirect.github.com/vitejs/vite/issues/19613) - fix(indexHtml): ensure correct URL when querying module graph ([#​19601](https://redirect.github.com/vitejs/vite/issues/19601)) ([dc5395a](https://redirect.github.com/vitejs/vite/commit/dc5395a27e44066ef7725278c4057d9f1071a53f)), closes [#​19601](https://redirect.github.com/vitejs/vite/issues/19601) - fix(preview): use preview https config, not server ([#​19633](https://redirect.github.com/vitejs/vite/issues/19633)) ([98b3160](https://redirect.github.com/vitejs/vite/commit/98b3160fa5916189e756cd7c5aae87e0d8f1978e)), closes [#​19633](https://redirect.github.com/vitejs/vite/issues/19633) - fix(ssr): use optional chaining to prevent "undefined is not an object" happening in \`ssrRewriteStac ([4309755](https://redirect.github.com/vitejs/vite/commit/43097550a1aa8ff633c39fb197b5f9ac1222119b)), closes [#​19612](https://redirect.github.com/vitejs/vite/issues/19612) - feat: show friendly error for malformed `base` ([#​19616](https://redirect.github.com/vitejs/vite/issues/19616)) ([2476391](https://redirect.github.com/vitejs/vite/commit/2476391b2854aaa67d0ed317b6d0c462e68028f7)), closes [#​19616](https://redirect.github.com/vitejs/vite/issues/19616) - feat(worker): show asset filename conflict warning ([#​19591](https://redirect.github.com/vitejs/vite/issues/19591)) ([367d968](https://redirect.github.com/vitejs/vite/commit/367d968fbf584e9f0e17192b816e92e8045c6217)), closes [#​19591](https://redirect.github.com/vitejs/vite/issues/19591) - chore: extend commit hash correctly when ambigious with a non-commit object ([#​19600](https://redirect.github.com/vitejs/vite/issues/19600)) ([89a6287](https://redirect.github.com/vitejs/vite/commit/89a62873243805518b672212db7e317989c5c197)), closes [#​19600](https://redirect.github.com/vitejs/vite/issues/19600) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 12pm on saturday" in timezone Europe/Berlin, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/SvenKirschbaum/aws-utils).
This PR contains the following updates: | Package | Type | Update | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---|---|---| | | | lockFileMaintenance | All locks refreshed | | | | | | [aws-cdk](https://redirect.github.com/aws/aws-cdk) ([source](https://redirect.github.com/aws/aws-cdk-cli/tree/HEAD/packages/aws-cdk)) | devDependencies | minor | [`2.1003.0` -> `2.1004.0`](https://renovatebot.com/diffs/npm/aws-cdk/2.1003.0/2.1004.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [aws-cdk-lib](https://redirect.github.com/aws/aws-cdk) ([source](https://redirect.github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib)) | dependencies | minor | [`2.182.0` -> `2.184.1`](https://renovatebot.com/diffs/npm/aws-cdk-lib/2.182.0/2.184.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [@aws-sdk/client-dynamodb](https://redirect.github.com/aws/aws-sdk-js-v3/tree/main/clients/client-dynamodb) ([source](https://redirect.github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-dynamodb)) | dependencies | minor | [`3.758.0` -> `3.767.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-dynamodb/3.758.0/3.767.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [axios](https://axios-http.com) ([source](https://redirect.github.com/axios/axios)) | dependencies | patch | [`1.8.2` -> `1.8.3`](https://renovatebot.com/diffs/npm/axios/1.8.2/1.8.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [vite](https://vite.dev) ([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite)) | devDependencies | patch | [`6.2.1` -> `6.2.2`](https://renovatebot.com/diffs/npm/vite/6.2.1/6.2.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | 🔧 This Pull Request updates lock files to use the latest dependency versions. --- ### Release Notes <details> <summary>aws/aws-cdk-cli (aws-cdk)</summary> ### [`v2.1004.0`](https://redirect.github.com/aws/aws-cdk-cli/compare/[email protected]@v2.1004.0) [Compare Source](https://redirect.github.com/aws/aws-cdk-cli/compare/[email protected]@v2.1004.0) </details> <details> <summary>aws/aws-cdk (aws-cdk-lib)</summary> ### [`v2.184.1`](https://redirect.github.com/aws/aws-cdk/releases/tag/v2.184.1) [Compare Source](https://redirect.github.com/aws/aws-cdk/compare/v2.184.0...v2.184.1) ##### Reverts - **iam:** fix(iam): adding organization id pattern verification ([#​33773](https://redirect.github.com/aws/aws-cdk/pull/33773)) ([f7ed316](https://redirect.github.com/aws/aws-cdk/commit/f7ed3165056c385249735ebb17a53d0fedd69c54)), closes [aws/aws-cdk#33768](https://redirect.github.com/aws/aws-cdk/issues/33768) *** #### Alpha modules (2.184.1-alpha.0) ### [`v2.184.0`](https://redirect.github.com/aws/aws-cdk/releases/tag/v2.184.0) [Compare Source](https://redirect.github.com/aws/aws-cdk/compare/v2.183.0...v2.184.0) ##### Features - **ecr:** throw ValidationError instead of untyped Errors ([#​33750](https://redirect.github.com/aws/aws-cdk/issues/33750)) ([242690f](https://redirect.github.com/aws/aws-cdk/commit/242690f9aa897b11e1b1a73036a9927ed3473eb2)) - **lambda:** support s3 OFD for Kinesis/DynamoDB ([#​33739](https://redirect.github.com/aws/aws-cdk/issues/33739)) ([3f1fecf](https://redirect.github.com/aws/aws-cdk/commit/3f1fecfecb871d3912a74471a555b223a6dcaa20)) - **rds:** allow to specify availability zone for Aurora instances ([#​33515](https://redirect.github.com/aws/aws-cdk/issues/33515)) ([583d5f2](https://redirect.github.com/aws/aws-cdk/commit/583d5f24f03d3b2f8b072d0a41d41b75f8814f8c)), closes [#​33503](https://redirect.github.com/aws/aws-cdk/issues/33503) [#​30618](https://redirect.github.com/aws/aws-cdk/issues/30618) ##### Bug Fixes - **codepipeline:** replace account root principal with current pipeline role in the trust policy under ff: [@​aws-cdk/pipelines](https://redirect.github.com/aws-cdk/pipelines):reduceStageRoleTrustScope ([#​33742](https://redirect.github.com/aws/aws-cdk/issues/33742)) ([a64b01c](https://redirect.github.com/aws/aws-cdk/commit/a64b01cc2969822bb92d7bd72152ecb2ccf1c1cf)), closes [#​33709](https://redirect.github.com/aws/aws-cdk/issues/33709) - **core:** message including tokens from annotations cannot output correctly ([#​33706](https://redirect.github.com/aws/aws-cdk/issues/33706)) ([55a3c4c](https://redirect.github.com/aws/aws-cdk/commit/55a3c4caefdb283280d6c16d3719f3e311e31ec9)), closes [40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts#L771](https://redirect.github.com/40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts/issues/L771) [/github.com/aws/aws-cdk-cli/pull/101#discussion_r1977310824](https://redirect.github.com/aws//github.com/aws/aws-cdk-cli/pull/101/issues/discussion_r1977310824) [/github.com/aws/aws-cdk/issues/33707#issuecomment-2705936933](https://redirect.github.com/aws//github.com/aws/aws-cdk/issues/33707/issues/issuecomment-2705936933) [/github.com/aws/aws-cdk-cli/pull/101#discussion_r1969298218](https://redirect.github.com/aws//github.com/aws/aws-cdk-cli/pull/101/issues/discussion_r1969298218) - **events-targets:** add LogGroupTargetInput.fromObjectV2() method ([#​33720](https://redirect.github.com/aws/aws-cdk/issues/33720)) ([584a58c](https://redirect.github.com/aws/aws-cdk/commit/584a58c2dcd43d9ebd2533186a2f5f9a083bb478)) *** #### Alpha modules (2.184.0-alpha.0) ##### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES - **glue-alpha:** Updated casing of `workflow.addconditionalTrigger` to `workflow.addConditionalTrigger`. ##### Bug Fixes - **glue-alpha:** inconsistent workflow addconditionalTrigger casing ([#​33752](https://redirect.github.com/aws/aws-cdk/issues/33752)) ([4886a3e](https://redirect.github.com/aws/aws-cdk/commit/4886a3e503b22f3dfadca908501a2cb208c2ebee)), closes [#​33751](https://redirect.github.com/aws/aws-cdk/issues/33751) [#​33751](https://redirect.github.com/aws/aws-cdk/issues/33751) ### [`v2.183.0`](https://redirect.github.com/aws/aws-cdk/releases/tag/v2.183.0) [Compare Source](https://redirect.github.com/aws/aws-cdk/compare/v2.182.0...v2.183.0) ##### Features - **bedrock:** support DeepSeek R1 ([#​33727](https://redirect.github.com/aws/aws-cdk/issues/33727)) ([3de0818](https://redirect.github.com/aws/aws-cdk/commit/3de0818b92c7130ac31f647329a265a742d4bc04)) - **rds:** add MySQL enginge versions 5.7.44(patch), 8.0.41 and 8.4.4 ([#​33732](https://redirect.github.com/aws/aws-cdk/issues/33732)) ([d1a8cbe](https://redirect.github.com/aws/aws-cdk/commit/d1a8cbeaa8153296ecf2d797d95fa31fd6b79582)) - update L1 CloudFormation resource definitions ([#​33718](https://redirect.github.com/aws/aws-cdk/issues/33718)) ([c4fceb2](https://redirect.github.com/aws/aws-cdk/commit/c4fceb2f28b9582cd957040a2c9e983343b9eba9)) - **codebuild:** throw `ValidationError` instead of untyped Errors ([#​33700](https://redirect.github.com/aws/aws-cdk/issues/33700)) ([d12854a](https://redirect.github.com/aws/aws-cdk/commit/d12854a96cebb428feb78908a093743889ef52bf)), closes [#​32569](https://redirect.github.com/aws/aws-cdk/issues/32569) - **core:** `RemovalPolicies.of(scope)` ([#​32283](https://redirect.github.com/aws/aws-cdk/issues/32283)) ([34c547c](https://redirect.github.com/aws/aws-cdk/commit/34c547c83e9fa5f055b0c60be975087e4f836ebb)) - **logs:** add support for fieldIndexPolicies in log group L2 Construct ([#​33416](https://redirect.github.com/aws/aws-cdk/issues/33416)) ([6c882e0](https://redirect.github.com/aws/aws-cdk/commit/6c882e0acc36b632ff80286e72bac08734d70d72)), closes [#​33366](https://redirect.github.com/aws/aws-cdk/issues/33366) - **lambda** backfill missing enums for lambda ([#​33651](https://redirect.github.com/aws/aws-cdk/issues/33651)) ([4227747](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/42277471040c4c845d9a4f1b3649df9cb675ecfb)) - **rds** add new MariaDB engine versions 10.5.28, 10.6.21, 10.11.11, and 11.4.5 ([#​33665](https://redirect.github.com/aws/aws-cdk/issues/33665)) ([7f5bf4e](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/7f5bf4e311555bdf7aa0d7637d7b89dd0421c2f6)) - **ec2** add VPC interface endpoints for Location Service ([#​33667](https://redirect.github.com/aws/aws-cdk/issues/33667)) ([4bc151b](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/4bc151bafdd4398f632b06f7d801c2a550e2340a)) - **ec2** add VPC interface endpoints for WAFV2 ([#​33685](https://redirect.github.com/aws/aws-cdk/issues/33685)) ([5eb11d2](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/5eb11d26d00a5cccc18d9e4e6483dd613d4c4dbb)) - **ec2** add VPC interface endpoints for Emr Serverless ([#​33715](https://redirect.github.com/aws/aws-cdk/issues/33715)) ([25619a0](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/25619a01e78040c8b9442a9a7ed434b936e01491)) - **ec2** add VPC interface endpoints for Security Lake ([#​33728](https://redirect.github.com/aws/aws-cdk/issues/33728)) ([5fcbe2a](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/5fcbe2ac2e3c377e39b38c278434997dbed19ab6)) ##### Bug Fixes - **core:** pressing Ctrl-C when content is bundled leaves broken asset ([#​33692](https://redirect.github.com/aws/aws-cdk/issues/33692)) ([00ef50d](https://redirect.github.com/aws/aws-cdk/commit/00ef50d36d5b7322f71e38062f03017eff878705)), closes [#​33201](https://redirect.github.com/aws/aws-cdk/issues/33201) [#​32869](https://redirect.github.com/aws/aws-cdk/issues/32869) [#​14474](https://redirect.github.com/aws/aws-cdk/issues/14474) - **custom-resources:** fix circular dependency when a custom role provided to Provider ([#​33600](https://redirect.github.com/aws/aws-cdk/issues/33600)) ([77b6fa9](https://redirect.github.com/aws/aws-cdk/commit/77b6fa94c0446ec81e5ae8949d6d0eb571d89dea)), closes [#​20360](https://redirect.github.com/aws/aws-cdk/issues/20360) - **efs:** cannot run an integ test when `transitionToArchivePolicy` is specified and `throughputMode` is `undefined` ([#​33713](https://redirect.github.com/aws/aws-cdk/issues/33713)) ([842201c](https://redirect.github.com/aws/aws-cdk/commit/842201c344a6f76f8cfd74b65cd73f63259b777b)) - **eks:** cluster deployment issue when the authentication mode is not changing ([#​33680](https://redirect.github.com/aws/aws-cdk/issues/33680)) ([ba2dfd1](https://redirect.github.com/aws/aws-cdk/commit/ba2dfd10504504d78e55bc242a4747024a504389)) *** #### Alpha modules (2.183.0-alpha.0) ##### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES - **scheduler-targets-alpha:** The `InspectorStartAssessmentRun` target's constructor now accepts `IAssessmentTemplate` instead of `CfnAssessmentTemplate` as its parameter type. To migrate existing code, use the `AssessmentTemplate.fromCfnAssessmentTemplate()` method to convert your `CfnAssessmentTemplate` instances to `IAssessmentTemplate`. ##### Features - **kinesisanalytics-flink-alpha** backfill missing enums for kinesisanalytics-flink-alpha ([#​33632](https://redirect.github.com/aws/aws-cdk/pull/33632)) ([b55199a](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/b55199a782582348408fb75123c533977b38326d)) - **kinesisfirehose-destinations-alpha** backfill missing enums for kinesisfirehose-destinations-alpha ([#​33633](https://redirect.github.com/aws/aws-cdk/pull/33633)) ([6ed7a45](https://redirect.github.com/aws/aws-cdk/pull/33740/commits/6ed7a452e261b0033b44d0b2b61b18466d6e6b48)) ##### Bug Fixes - **scheduler-alpha:** deprecate `Group` in favour of `ScheduleGroup` ([#​33678](https://redirect.github.com/aws/aws-cdk/issues/33678)) ([4d8eae9](https://redirect.github.com/aws/aws-cdk/commit/4d8eae9da577a94114602df261c98b65aa616956)) - **scheduler-targets-alpha:** update inspector target to use IAssessmentTemplate instead of CfnAssessmentTemplate ([#​33682](https://redirect.github.com/aws/aws-cdk/issues/33682)) ([50ba3ef](https://redirect.github.com/aws/aws-cdk/commit/50ba3efabca81a3c57ce34654f8ec1002deace6f)) </details> <details> <summary>aws/aws-sdk-js-v3 (@​aws-sdk/client-dynamodb)</summary> ### [`v3.767.0`](https://redirect.github.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-dynamodb/CHANGELOG.md#37670-2025-03-13) [Compare Source](https://redirect.github.com/aws/aws-sdk-js-v3/compare/v3.758.0...v3.767.0) ##### Features - **client-dynamodb:** Generate account endpoints for DynamoDB requests using ARN-sourced account ID when available ([d2c9f5d](https://redirect.github.com/aws/aws-sdk-js-v3/commit/d2c9f5d8676971df8885de46d09a805e54952c1d)) </details> <details> <summary>axios/axios (axios)</summary> ### [`v1.8.3`](https://redirect.github.com/axios/axios/blob/HEAD/CHANGELOG.md#183-2025-03-10) [Compare Source](https://redirect.github.com/axios/axios/compare/v1.8.2...v1.8.3) ##### Bug Fixes - add missing type for allowAbsoluteUrls ([#​6818](https://redirect.github.com/axios/axios/issues/6818)) ([10fa70e](https://redirect.github.com/axios/axios/commit/10fa70ef14fe39558b15a179f0e82f5f5e5d11b2)) - **xhr/fetch:** pass `allowAbsoluteUrls` to `buildFullPath` in `xhr` and `fetch` adapters ([#​6814](https://redirect.github.com/axios/axios/issues/6814)) ([ec159e5](https://redirect.github.com/axios/axios/commit/ec159e507bdf08c04ba1a10fe7710094e9e50ec9)) ##### Contributors to this release - <img src="https://avatars.githubusercontent.com/u/3238291?v=4&s=18" alt="avatar" width="18"/> [Ashcon Partovi](https://redirect.github.com/Electroid "+6/-0 (#​6811 )") - <img src="https://avatars.githubusercontent.com/u/28559054?v=4&s=18" alt="avatar" width="18"/> [StefanBRas](https://redirect.github.com/StefanBRas "+4/-0 (#​6818 )") - <img src="https://avatars.githubusercontent.com/u/8029107?v=4&s=18" alt="avatar" width="18"/> [Marc Hassan](https://redirect.github.com/mhassan1 "+2/-2 (#​6814 )") </details> <details> <summary>vitejs/vite (vite)</summary> ### [`v6.2.2`](https://redirect.github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small622-2025-03-14-small) [Compare Source](https://redirect.github.com/vitejs/vite/compare/v6.2.1...v6.2.2) - fix: await client buildStart on top level buildStart ([#​19624](https://redirect.github.com/vitejs/vite/issues/19624)) ([b31faab](https://redirect.github.com/vitejs/vite/commit/b31faab2a81b839e4b747baeb9c7a7cbb724f8d2)), closes [#​19624](https://redirect.github.com/vitejs/vite/issues/19624) - fix(css): inline css correctly for double quote use strict ([#​19590](https://redirect.github.com/vitejs/vite/issues/19590)) ([d0aa833](https://redirect.github.com/vitejs/vite/commit/d0aa833296668fc420a27a1ea88ecdbdeacdbce7)), closes [#​19590](https://redirect.github.com/vitejs/vite/issues/19590) - fix(deps): update all non-major dependencies ([#​19613](https://redirect.github.com/vitejs/vite/issues/19613)) ([363d691](https://redirect.github.com/vitejs/vite/commit/363d691b4995d72f26a14eb59ed88a9483b1f931)), closes [#​19613](https://redirect.github.com/vitejs/vite/issues/19613) - fix(indexHtml): ensure correct URL when querying module graph ([#​19601](https://redirect.github.com/vitejs/vite/issues/19601)) ([dc5395a](https://redirect.github.com/vitejs/vite/commit/dc5395a27e44066ef7725278c4057d9f1071a53f)), closes [#​19601](https://redirect.github.com/vitejs/vite/issues/19601) - fix(preview): use preview https config, not server ([#​19633](https://redirect.github.com/vitejs/vite/issues/19633)) ([98b3160](https://redirect.github.com/vitejs/vite/commit/98b3160fa5916189e756cd7c5aae87e0d8f1978e)), closes [#​19633](https://redirect.github.com/vitejs/vite/issues/19633) - fix(ssr): use optional chaining to prevent "undefined is not an object" happening in \`ssrRewriteStac ([4309755](https://redirect.github.com/vitejs/vite/commit/43097550a1aa8ff633c39fb197b5f9ac1222119b)), closes [#​19612](https://redirect.github.com/vitejs/vite/issues/19612) - feat: show friendly error for malformed `base` ([#​19616](https://redirect.github.com/vitejs/vite/issues/19616)) ([2476391](https://redirect.github.com/vitejs/vite/commit/2476391b2854aaa67d0ed317b6d0c462e68028f7)), closes [#​19616](https://redirect.github.com/vitejs/vite/issues/19616) - feat(worker): show asset filename conflict warning ([#​19591](https://redirect.github.com/vitejs/vite/issues/19591)) ([367d968](https://redirect.github.com/vitejs/vite/commit/367d968fbf584e9f0e17192b816e92e8045c6217)), closes [#​19591](https://redirect.github.com/vitejs/vite/issues/19591) - chore: extend commit hash correctly when ambigious with a non-commit object ([#​19600](https://redirect.github.com/vitejs/vite/issues/19600)) ([89a6287](https://redirect.github.com/vitejs/vite/commit/89a62873243805518b672212db7e317989c5c197)), closes [#​19600](https://redirect.github.com/vitejs/vite/issues/19600) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 12pm on saturday" in timezone Europe/Berlin, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/SvenKirschbaum/share.kirschbaum.cloud).
…rrectly (#33706) ### Issue # (if applicable) Closes aws/aws-cdk#33707 ### Reason for this change If a stack with name 'some-stack' includes an info annotation ```ts Annotations.of(this).addInfo(`stackId: ${this.stackId}`); ``` then the following output results: ``` [Info at /some-stack] [object Object] ``` That's because data comes from Annotations and the data can be of object type containing 'Fn::Join' or 'Ref' when tokens are included in Annotations. The issue mentioned a proposal to output the data in the form of tokens like `[Info at /CdkSampleStack] ${Token[AWS::StackId.1116]}`. ### Description of changes **Approach 1** for now. (I am still wondering if approach 3 would be better...) See below: ### Approach 1 The PR makes messages with tokens by annotations unresolved. #### NOTE This change would also output a token format in `manifest.json`. **If users run integ tests with annotations including tokens, the manifest.json would change for every run.** (like `${Token[AWS::StackId.1119]}` -> `${Token[AWS::StackId.123]}` -> `${Token[AWS::StackId.521]}` -> ...) ```json { // ... "CdkSampleStack": { // ... "metadata": { "/CdkSampleStack": [ { "type": "aws:cdk:info", "data": "stackId: ${Token[AWS::StackId.1119]}", ``` ### Approach 2 Change the type for the `msg.entry.data` (`MetadataEntryData` for `MetadataEntry`) to a string type with `JSON.stringify` if the type is an objective type in cdk-cli. https://github.com/aws/aws-cdk-cli/blob/cdk%40v2.1003.0/packages/%40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts#L771 Then I had submitted the [PR](aws/aws-cdk-cli#101) in aws-cdk-cli. But talked with Rico that the change should be made inside cdk-lib and leave the token unrendered. aws/aws-cdk-cli#101 (comment) ### Approach 3 Change the data type to a string type after resolve if the data is by annotations with tokens. This approach doesn't make differences in manifest.json for every run and the original format (with 'Ref' or 'Fn::Join') is kept. However, the issue for this PR and comments in the PR submitted (aws-cdk-cli) has proposed the approach with unresolved tokens, I decided the approach 1 for now. aws/aws-cdk@63fd78b ```ts if (node.node.metadata.length > 0) { // Make the path absolute output[Node.PATH_SEP + node.node.path] = node.node.metadata.map(md => { const resolved = stack.resolve(md) as cxschema.MetadataEntry; const isAnnotation = [ cxschema.ArtifactMetadataEntryType.ERROR, cxschema.ArtifactMetadataEntryType.WARN, cxschema.ArtifactMetadataEntryType.INFO, ].includes(md.type as cxschema.ArtifactMetadataEntryType); // Transform the data to a string for the case where Annotations include a token. // Otherwise, the message is resolved and output as `[object Object]` after synth // because the message will be object type using 'Ref' or 'Fn::Join'. const mdWithStringData: cxschema.MetadataEntry = { ...resolved, data: (isAnnotation && typeof resolved.data === 'object') ? JSON.stringify(resolved.data) : resolved.data, }; return mdWithStringData; }); } ``` This approach outputs the message as the following style: ``` {"Fn::Join":["",["Cannot add a resource policy to your dead letter queue associated with rule ",{"Ref":"Rule4C995B7F"}," because the queue is in a different account. You must add the resource policy manually to the dead letter queue in account 444455556666. [ack: @aws-cdk/aws-events-targets:manuallyAddDLQResourcePolicy]"]]} ``` ### Additional Information see: aws/aws-cdk#33707 (comment) aws/aws-cdk-cli#101 (comment) ### Describe any new or updated permissions being added ### Description of how you validated changes Unit tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…rrectly (aws#33706) ### Issue # (if applicable) Closes aws#33707 ### Reason for this change If a stack with name 'some-stack' includes an info annotation ```ts Annotations.of(this).addInfo(`stackId: ${this.stackId}`); ``` then the following output results: ``` [Info at /some-stack] [object Object] ``` That's because data comes from Annotations and the data can be of object type containing 'Fn::Join' or 'Ref' when tokens are included in Annotations. The issue mentioned a proposal to output the data in the form of tokens like `[Info at /CdkSampleStack] ${Token[AWS::StackId.1116]}`. ### Description of changes **Approach 1** for now. (I am still wondering if approach 3 would be better...) See below: ### Approach 1 The PR makes messages with tokens by annotations unresolved. #### NOTE This change would also output a token format in `manifest.json`. **If users run integ tests with annotations including tokens, the manifest.json would change for every run.** (like `${Token[AWS::StackId.1119]}` -> `${Token[AWS::StackId.123]}` -> `${Token[AWS::StackId.521]}` -> ...) ```json { // ... "CdkSampleStack": { // ... "metadata": { "/CdkSampleStack": [ { "type": "aws:cdk:info", "data": "stackId: ${Token[AWS::StackId.1119]}", ``` ### Approach 2 Change the type for the `msg.entry.data` (`MetadataEntryData` for `MetadataEntry`) to a string type with `JSON.stringify` if the type is an objective type in cdk-cli. https://github.com/aws/aws-cdk-cli/blob/cdk%40v2.1003.0/packages/%40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts#L771 Then I had submitted the [PR](aws/aws-cdk-cli#101) in aws-cdk-cli. But talked with Rico that the change should be made inside cdk-lib and leave the token unrendered. aws/aws-cdk-cli#101 (comment) ### Approach 3 Change the data type to a string type after resolve if the data is by annotations with tokens. This approach doesn't make differences in manifest.json for every run and the original format (with 'Ref' or 'Fn::Join') is kept. However, the issue for this PR and comments in the PR submitted (aws-cdk-cli) has proposed the approach with unresolved tokens, I decided the approach 1 for now. aws@63fd78b ```ts if (node.node.metadata.length > 0) { // Make the path absolute output[Node.PATH_SEP + node.node.path] = node.node.metadata.map(md => { const resolved = stack.resolve(md) as cxschema.MetadataEntry; const isAnnotation = [ cxschema.ArtifactMetadataEntryType.ERROR, cxschema.ArtifactMetadataEntryType.WARN, cxschema.ArtifactMetadataEntryType.INFO, ].includes(md.type as cxschema.ArtifactMetadataEntryType); // Transform the data to a string for the case where Annotations include a token. // Otherwise, the message is resolved and output as `[object Object]` after synth // because the message will be object type using 'Ref' or 'Fn::Join'. const mdWithStringData: cxschema.MetadataEntry = { ...resolved, data: (isAnnotation && typeof resolved.data === 'object') ? JSON.stringify(resolved.data) : resolved.data, }; return mdWithStringData; }); } ``` This approach outputs the message as the following style: ``` {"Fn::Join":["",["Cannot add a resource policy to your dead letter queue associated with rule ",{"Ref":"Rule4C995B7F"}," because the queue is in a different account. You must add the resource policy manually to the dead letter queue in account 444455556666. [ack: @aws-cdk/aws-events-targets:manuallyAddDLQResourcePolicy]"]]} ``` ### Additional Information see: aws#33707 (comment) aws/aws-cdk-cli#101 (comment) ### Describe any new or updated permissions being added ### Description of how you validated changes Unit tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixes aws/aws-cdk#33707
Describe the bug
If a stack with name 'some-stack' includes an info annotation
then the following output results:
That's because data comes from Annotations and the data can be of object type containing 'Fn::Join' or 'Ref' when tokens are included in Annotations.
Approach
Change the type for the
msg.entry.data
(MetadataEntryData
forMetadataEntry
) to a string type withJSON.stringify
if the type is an objective type.https://github.com/aws/aws-cdk-cli/blob/main/packages/%40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts#L764
Actually, the type for
data
isany
in aws-cdk-lib (withconstructs
library).https://github.com/aws/constructs/blob/10.x/src/metadata.ts#L13
Alternative Approach
The issue mentioned a proposal to output the data in the form of tokens like
[Info at /CdkSampleStack] ${Token[AWS::StackId.1116]}
.The following changes to the code would make this possible.
https://github.com/aws/aws-cdk/blob/v2.178.0/packages/aws-cdk-lib/core/lib/stack-synthesizers/_shared.ts#L103
But that would also output a token format in
manifest.json
for cloud assembly.However Cloud assembly is for CFn or CDK CLI, and the tokens are for CDK Apps and should be resolved in the synth phase. Therefore,
manifest.json
should output the resolved value.In fact, the information in CFn format using
${AWS::AccountId}
etc. is already inmanifest.json
as shown below.So I decided the first approach in this PR.
Additional Information
When I reverted the code back to the original process and ran the unit test I created this time, the output was
[object Object]
as expected.When I ran the test with the code reflected, it was in the correct format, so this change is considered appropriate.
CLI Integ Tests
Added a new cli integ test.
see: aws/aws-cdk-cli-testing#43
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license