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-runner): (Snapshot serializer to ignore certain fields) #31299

Open
1 of 2 tasks
webratz opened this issue Sep 3, 2024 · 2 comments
Open
1 of 2 tasks

(integ-runner): (Snapshot serializer to ignore certain fields) #31299

webratz opened this issue Sep 3, 2024 · 2 comments
Labels
@aws-cdk/integ-runner effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@webratz
Copy link
Contributor

webratz commented Sep 3, 2024

Describe the feature

The snapshots created by the integ-runner contain the full templates. There is certain fields that are changing (eg. tags, stack metadata, asset ids) that should not trigger a new test.
In normal snapshots tests we use for example https://github.com/hupe1980/jest-cdk-snapshot to avoid adding these volatile fields to the snapshot, but I have found no way to do the same for integration tests.

Use Case

This feature would help us to avoid unneccessary re-runs of integration stacks for unrelated changes.

Proposed Solution

There already seems to be some logic for the template. A way to hook into that, or extending it, to cover use cases like ignoring metadata, assets or tags.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.153

Environment details (OS name and version, etc.)

debian - unrelevant

@webratz webratz added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 3, 2024
@pahud pahud self-assigned this Sep 3, 2024
@pahud
Copy link
Contributor

pahud commented Sep 3, 2024

There is certain fields that are changing (eg. tags, stack metadata, asset ids) that should not trigger a new test.

Yes I basically agree with you on this point. Feel free to submit your PR and the team would take a look when it's ready. Thank you.

@pahud pahud removed their assignment Sep 3, 2024
@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Sep 3, 2024
@webratz
Copy link
Contributor Author

webratz commented Sep 4, 2024

Do you have any guidance on where would be a good place to implement this? Probably makes sense to briefly align on the basic structure before I have a closer look into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/integ-runner effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

2 participants