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

(integ-tests-alpha,custom-resources): snapshots are always outdated #30583

Open
kornicameister opened this issue Jun 19, 2024 · 7 comments
Open
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources bug This issue is a bug. effort/medium Medium work item – several days of effort p1

Comments

@kornicameister
Copy link
Contributor

kornicameister commented Jun 19, 2024

Describe the bug

image

After upgrading to 2.146.0 from 2.145.0 where #30418 was introduced I am observing that running integration tests via integ-runner always fails. Snapshot is being reported as outdated, like on screenshot above. Although I can successfully rebuild/rerun tests and I can observe a change in snapshots next time I run tests I once again observe situation from screenshot

Once I had downgraded to 2.145.0 on both aws-cdk-lib, @aws-cdk/integ-runner and @aws-cdk/integ-tests-alpha to 2.145.0 tests are passing without a problem.

Behavior suggests a regression of sort around: #30418
Also the problem occurs, I believe, around custom resources I am using.

Expected Behavior

Screenshot are deterministically stored and next checks aren't failing.

Current Behavior

image

Reproduction Steps

N/A

Possible Solution

N/A

Additional Information/Context

N/A

CDK CLI Version

2.146.0

Framework Version

No response

Node.js Version

18.16.0

OS

MacOS sierra

Language

TypeScript

Language Version

5.4.5

Other information

No response

@kornicameister kornicameister added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 19, 2024
@kornicameister
Copy link
Contributor Author

Hmm.. I thought I had fixed by downgrading to 2.145.0 but now I am running a test that has changed custom resource and it fails with same reason. This time going down to 2.144.0 fixes the problem consistently.

@pahud
Copy link
Contributor

pahud commented Jun 25, 2024

Yes I think #30418 would make your snapshot need to update as it makes logApiResponseData: true to logApiResponseData: undefined. This is a bug fix and existing snapshots would need to update.

@pahud pahud added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p3 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 Jun 25, 2024
@kornicameister
Copy link
Contributor Author

@pahud but they are always updating and never actually doing that.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 26, 2024
@TheRealAmazonKendra
Copy link
Contributor

I'm updating a massive amount of our integration tests and experiencing this same thing. It looks like this is being injected at the time the test runs instead of at the build time. It's resulting in a good portion of our tests only working with the --dry-run flag being added, which we absolutely do not want. We want people running the the tests. I'm changing this to a p1.

@TheRealAmazonKendra TheRealAmazonKendra added p1 effort/medium Medium work item – several days of effort @aws-cdk/custom-resources Related to AWS CDK Custom Resources and removed p3 effort/small Small work item – less than a day of effort @aws-cdk/integ-runner labels Jul 5, 2024
@mrlikl
Copy link
Contributor

mrlikl commented Jul 15, 2024

I am experiencing this issue while running the test aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js. The test need to be run once again due to a change that I did. But during the update there is another change "logApiResponseData":true being set for the AwsCustomResource. Resulting in the lambda being invoked however, the AwsCustomResource only has onCreate thus the lambda is sending back empty data {}.

And the stack is failing with the error

CustomResource attribute error: Vendor response doesn't contain virtualCluster.containerProvider.id attribute in object arn:aws:cloudformation:us-east-1:xxxxxxxxxx:stack/aws-stepfunctions-tasks-emr-containers-start-job-run/7937d670-4289-11ef-98fb-0e5f2c0b2977|StartaJobRunGetEksClusterInfoD0E31373|eea731e7-2a04-4fe5-9947-d42d710d4e4f

Are there any work-arounds to not set the property logApiResponseData ? I have tried setting LOG_API_RESPONSE_DATA_PROPERTY_TRUE_DEFAULT to false in the test, however there has been no effect.

mrlikl added a commit to mrlikl/aws-cdk that referenced this issue Jul 15, 2024
@kornicameister
Copy link
Contributor Author

@TheRealAmazonKendra any news here?

@TheRealAmazonKendra
Copy link
Contributor

I thiiiiiiiiiink I actually have figured out a piece of this. Unfortunately, my capacity has been extremely limited of late so I haven't had a chance to properly dig in. I'm hoping to do so a bit more next week because this is a huge pain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources bug This issue is a bug. effort/medium Medium work item – several days of effort p1
Projects
None yet
Development

No branches or pull requests

4 participants