-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: import should write overrideTemplate to assembly.outdir #29509
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
Exemption Request Not sure if this should be an exemption or a clarification, but this only affects |
This isn't related to the issue linked but I'm also not quite understanding your issue here. Can you clarify what you mean by |
Also, we do have cdk import tests. Unit tests are in https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/test/import.test.ts and integ tests are in https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk-testing/cli-integ/tests/cli-integ-tests. |
@TheRealAmazonKendra Thank you very much for pointing the tests to me, I completely missed them. Let me try to explain the problem. When the template is synthesized, if it is larger than 50kb and cannot be inlined in the request, CLI writes it to filesystem to be uploaded to S3. Unlike regular deployments This code reproduces the issue:
Deploy the stack, uncomment the queue, and try to import. This error happens:
The file is created, it's just in the project root not in cdk.out:
Concerning tests, now that I know where they are I will attempt to adjust them. Please advise if adding another conditional resource creation in https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js#L122 similar to what is already there, that would create 70 queues and then attempt the import (i.e. same as my example code does) is acceptable. |
Same problem as #22530 |
Ohhhhhhh. I see. Thanks for the explanation! |
Well, this is fun. Turns out that cdk import test is broken and passing because it's not actually testing anything. Gimme a day (maybe two) to try and get that fixed and then I'll revisit your PR. With your explanation, I think your solution is likely correct but I have strong reservations about letting a change go through when the test is not testing. |
Do not merge label added because of issues with test, not with PR. |
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Figured I'd post this here, while it is being worked on. |
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing ✅ A exemption request has been requested. Please wait for a maintainer's review. |
Issue # (if applicable)
Addresses #22530
Reason for this change
During
cdk import
template file is written to the project root, not tocdk.out
which fails the following stack deployment.Description of changes
I've just added a path.join similar to how it is done in regular template generation.
Description of how you validated changes
I've tested this locally, imports stacks just fine.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license