(integ-tests-alpha,custom-resources): snapshots are always outdated
kornicameister opened this issue · comments
Describe the bug
![image](https://private-user-images.githubusercontent.com/1029674/340982676-8f936236-f067-46fa-97d7-abdf175f4c00.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA2MDg2ODksIm5iZiI6MTcyMDYwODM4OSwicGF0aCI6Ii8xMDI5Njc0LzM0MDk4MjY3Ni04ZjkzNjIzNi1mMDY3LTQ2ZmEtOTdkNy1hYmRmMTc1ZjRjMDAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTBUMTA0NjI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2I0YzVlYTU3ODI5NjA4N2IzNDIyZGI1M2E2OTIxZGNhMzc1NmE2MjAwY2M3ZmI4MzVjMWI0Njc3NmUxNDMxOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.VthQLaVNGJTvEW5i7dXs003jpT9oDHZZZMErzoL0P4o)
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](https://private-user-images.githubusercontent.com/1029674/340982676-8f936236-f067-46fa-97d7-abdf175f4c00.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA2MDg2ODksIm5iZiI6MTcyMDYwODM4OSwicGF0aCI6Ii8xMDI5Njc0LzM0MDk4MjY3Ni04ZjkzNjIzNi1mMDY3LTQ2ZmEtOTdkNy1hYmRmMTc1ZjRjMDAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTBUMTA0NjI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2I0YzVlYTU3ODI5NjA4N2IzNDIyZGI1M2E2OTIxZGNhMzc1NmE2MjAwY2M3ZmI4MzVjMWI0Njc3NmUxNDMxOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.VthQLaVNGJTvEW5i7dXs003jpT9oDHZZZMErzoL0P4o)
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
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.
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 but they are always updating and never actually doing that.
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.