8000 improve reporting suggestion for snapshot skips by bentsku · Pull Request #14 · localstack/localstack-snapshot · GitHub
[go: up one dir, main page]

Skip to content

improve reporting suggestion for snapshot skips #14

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bentsku
Copy link
Contributor
@bentsku bentsku commented Jun 20, 2025

@pinzon recently shared a trick regarding snapshot skips path that would contain special characters.
It made me remember a fix I had done before this was even its own library with localstack/localstack#6802, allowing us to use single quote in snapshot skip paths for those special characters.

This PR adds better suggestion by detecting and wrapping part elements that would contain such characters so that users could directly copy paste the snapshot skip path and it would work out of the box, instead of having weird issues.
Luckily there were already tests for the helper function, thanks @dominikschubert 🙏

For example, for this kind of error which would fail if you copy pasted it to skip that path before, this would be the new message:

	Ignore list (please keep in mind list indices might not work and should be replaced):
-	["$..cognito:user_status"]
+	["$..'cognito:user_status'"]

@bentsku bentsku self-assigned this Jun 20, 2025
@bentsku bentsku force-pushed the improve-skip-suggestion branch from 437919e to e02fe08 Compare June 20, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0