-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(tests): Refactor snapshotter and simplify header #103243
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
Merged
lobsterkatie
merged 8 commits into
master
from
kmclb-refactor-snapshotter-and-simplify-header
Nov 12, 2025
Merged
ref(tests): Refactor snapshotter and simplify header #103243
lobsterkatie
merged 8 commits into
master
from
kmclb-refactor-snapshotter-and-simplify-header
Nov 12, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JoshFerge
approved these changes
Nov 12, 2025
lobsterkatie
added a commit
that referenced
this pull request
Nov 12, 2025
This is a follow-up to #103243, which simplified the header for new snapshots, applying the change to existing grouping snapshots. Doing this manually will both prevent future potential merge conflicts and reduce noise in future PRs as snapshots are changed.
andrewshie-sentry
pushed a commit
that referenced
this pull request
Nov 13, 2025
This is a small refactor to the snapshotter we use in tests, including the following changes: - Rename a few variables for clarity. - Stop capturing the header when reading a snapshot file, since we never use it. - Remove timestamp and creator from the header. The timestamp often causes merge conflicts (and the same information can be gleaned from the commit date), and the creator is hard-coded as 'sentry', which... yeah, okay, but is that news? - Add test name to `source` entry in header. Yes, by default the test name is included in the snapshot file's path, but that's configurable, so might not always be true. Putting it in the header guarantees the information is easily available. Note that this PR doesn't actually change the contents of any snapshots. Because snapshot files are only written when they change, and the header isn't actually anything we match on, we have the option to let the dates be removed organically, or to remove them in batches in separate PRs, but either way, this change won't make any current snapshot tests fail in the meantime.
andrewshie-sentry
pushed a commit
that referenced
this pull request
Nov 13, 2025
This is a follow-up to #103243, which simplified the header for new snapshots, applying the change to existing grouping snapshots. Doing this manually will both prevent future potential merge conflicts and reduce noise in future PRs as snapshots are changed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a small refactor to the snapshotter we use in tests, including the following changes:
sourceentry in header. Yes, by default the test name is included in the snapshot file's path, but that's configurable, so might not always be true. Putting it in the header guarantees the information is easily available.Note that this PR doesn't actually change the contents of any snapshots. Because snapshot files are only written when they change, and the header isn't actually anything we match on, we have the option to let the dates be removed organically, or to remove them in batches in separate PRs, but either way, this change won't make any current snapshot tests fail in the meantime.