Skip to content

Conversation

@kormide
Copy link
Member

@kormide kormide commented Dec 30, 2025

An example for working with insta snapshot tests. Similar to a write_source_files flow, but tailored to insta and uses insta's review tool to accept snapshots.

See included README for more details.

This has some relation to bazel-contrib/bazel-lib#1067 in that it produces snapshot differentials as a build action so that a tool can review the changes.


Changes are visible to end-users: no

Test plan

  • Covered by existing test cases
  • New test cases added
  • Manual testing; please provide instructions so we can reproduce:
  • Updates snapshots when they don't exist
  • Creates snapshots folder when it doesn't exist
  • Updates snapshots when they exist

@aspect-workflows
Copy link
Contributor

aspect-workflows bot commented Dec 30, 2025

Test

All tests were cache hits

26 tests (100.0%) were fully cached saving 42s.


Buildifier      Format      Gazelle      Lint [.]

@kormide kormide force-pushed the rust-insta-example branch 6 times, most recently from 78443db to 7436709 Compare December 30, 2025 05:55
@kormide kormide marked this pull request as ready for review December 30, 2025 05:55
@kormide kormide requested review from alexeagle and arrdem December 30, 2025 05:55
@kormide kormide force-pushed the rust-insta-example branch 3 times, most recently from 6526ec0 to d5d5968 Compare December 30, 2025 06:07
@kormide
Copy link
Member Author

kormide commented Dec 31, 2025

Cool, one of the maintainers of insta is willing to help this work better under Bazel: mitsuhiko/insta#621 (comment)

@kormide kormide marked this pull request as draft January 3, 2026 20:00
@kormide
Copy link
Member Author

kormide commented Jan 3, 2026

Moving back to draft while I work through changes with the insta maintainer.

@kormide kormide force-pushed the rust-insta-example branch 7 times, most recently from 0fd9500 to 2815294 Compare January 4, 2026 02:31
@kormide kormide marked this pull request as ready for review January 4, 2026 02:32
@kormide
Copy link
Member Author

kormide commented Jan 4, 2026

The upstream changes to insta were released in https://github.com/mitsuhiko/insta/releases/tag/1.46.0. This is ready for review again.

@kormide kormide requested a review from thesayyn January 4, 2026 08:11
@kormide kormide force-pushed the rust-insta-example branch from 2815294 to 0e3db7f Compare January 4, 2026 08:12
@kormide kormide force-pushed the rust-insta-example branch from 0e3db7f to 23f62ad Compare January 4, 2026 08:14
@kormide
Copy link
Member Author

kormide commented Jan 6, 2026

Oops. Thanks for adding CI @alexeagle .

@alexeagle alexeagle merged commit a902a68 into main Jan 7, 2026
4 checks passed
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.

3 participants