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

CDK CLI: Tag not resolved for AsyncFunction value #32160

Closed
scarytom opened this issue Nov 16, 2024 · 4 comments · Fixed by #32165
Closed

CDK CLI: Tag not resolved for AsyncFunction value #32160

scarytom opened this issue Nov 16, 2024 · 4 comments · Fixed by #32165
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. needs-reproduction This issue needs reproduction. p0 sdk-v3-upgrade Tag issues that are associated to SDK V3 upgrade. Not limited to CR usage of SDK only.

Comments

@scarytom
Copy link
Contributor

scarytom commented Nov 16, 2024

Describe the bug

Running cdk diff in version 2.167.1 is producing an error when trying to generate a change set, and is falling back to using a diff on template differences. This worked fin in 2.160.0.

Regression Issue

Confirmed Regression

Last Known Working CDK Version

2.166.0

Expected Behavior

change sets to be created and used for the cdk diff

Current Behavior

Retrieved account ID xxxxxxxxxxxx from disk cache
Error: Tag not resolved for AsyncFunction value
    at getTagObject (/usr/local/lib/node_modules/aws-cdk/lib/index.js:579:21602)
    at stringify5 (/usr/local/lib/node_modules/aws-cdk/lib/index.js:579:22499)
    at _Pair.toString (/usr/local/lib/node_modules/aws-cdk/lib/index.js:566:452)
    at stringify5 (/usr/local/lib/node_modules/aws-cdk/lib/index.js:579:22445)
    at /usr/local/lib/node_modules/aws-cdk/lib/index.js:561:3712
    at Array.reduce (<anonymous>)
    at YAMLMap2.toString (/usr/local/lib/node_modules/aws-cdk/lib/index.js:561:3202)
    at YAMLMap2.toString (/usr/local/lib/node_modules/aws-cdk/lib/index.js:568:3602)
    at stringify5 (/usr/local/lib/node_modules/aws-cdk/lib/index.js:579:22842)
    at _Pair.toString (/usr/local/lib/node_modules/aws-cdk/lib/index.js:566:452)
Could not create a change set, will base the diff on template differences (run again with -v to see the reason)

Reproduction Steps

I'm just running cdk --strict --verbose --no-version-reporting diff

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.167.1

Framework Version

No response

Node.js Version

22.11.0

OS

ubuntu

Language

Java

Language Version

Java (17)

Other information

No response

@scarytom scarytom added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 16, 2024
@github-actions github-actions bot added package/tools Related to AWS CDK Tools or CLI potential-regression Marking this issue as a potential regression to be checked by team member labels Nov 16, 2024
@iliapolo
Copy link
Contributor

iliapolo commented Nov 17, 2024

@scarytom could you please also provide the following information? (whatever you can):

  • Authentication method (i.e credentials file? config file? env variables? profile? something else?)
  • Output of cdk diff with -vvv? (account numbers redacted).

Thanks!

@scarytom
Copy link
Contributor Author

Authentication is via AWS environment variables

The output above is already from cdk diff -vvv. I'm not sure the full output adds much, but I can attach that tomorrow if that helps at all.

@mrgrain mrgrain added sdk-v3-upgrade Tag issues that are associated to SDK V3 upgrade. Not limited to CR usage of SDK only. p1 needs-reproduction This issue needs reproduction. @aws-cdk/core Related to core CDK functionality and removed needs-triage This issue or PR still needs to be triaged. package/tools Related to AWS CDK Tools or CLI labels Nov 17, 2024
@Stazz-Sphinx
Copy link

Confirm that, I have the same issue.

@mrgrain mrgrain added p0 and removed p1 labels Nov 17, 2024
@github-actions github-actions bot removed the potential-regression Marking this issue as a potential regression to be checked by team member label Nov 17, 2024
mrgrain pushed a commit that referenced this issue Nov 17, 2024
Closes #32160

### Reason for this change

<!--What is the bug or use case behind this change?-->

When running `cdk deploy`, it is supposed to (by default) create a
read-only change set and incorporate it within the diff.
However, it currently fails creating the change-set and always falls
back to template only diffs.

### Description of changes

<!--What code changes did you make? Have you made any important design
decisions?-->

There was a wrong invocation of the `makeBodyParameter` parameter after
the [migration to sdk v3](#31702).

### Description of how you validated changes

Added missing integration tests. Unit test for this code are tricky
because they require too many mocks.

### 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*
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2024
iliapolo added a commit that referenced this issue Nov 18, 2024
Closes #32160

### Reason for this change

<!--What is the bug or use case behind this change?-->

When running `cdk deploy`, it is supposed to (by default) create a
read-only change set and incorporate it within the diff.
However, it currently fails creating the change-set and always falls
back to template only diffs.

### Description of changes

<!--What code changes did you make? Have you made any important design
decisions?-->

There was a wrong invocation of the `makeBodyParameter` parameter after
the [migration to sdk v3](#31702).

### Description of how you validated changes

Added missing integration tests. Unit test for this code are tricky
because they require too many mocks.

### 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*
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. needs-reproduction This issue needs reproduction. p0 sdk-v3-upgrade Tag issues that are associated to SDK V3 upgrade. Not limited to CR usage of SDK only.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants