[ty] Set INSTA_FORCE_PASS and INSTA_OUTPUT environment variables from mdtest.py
#21029
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.
Summary
Setting these environment variables makes it much less painful to iterate on an mdtest that has snapshots enabled.
Currently if any snapshots change, you can't see which mdtest assertions are failing until you accept the snapshots (which requires terminating mdtest.py). So you accept the snapshots, then start mdtest.py running again, then you find some mdtest assertions are failing, so then you update them... and now the snapshots are failing again.
By setting these environment variables,
.snap.newfiles will still be created for any snapshots that change, but mdtest.py will continue as normal anyway so that you can see which assertions are failing.Reviewing the snapshot changes still has to be done in a separate process to the mdtest.py script. I experimented with having mdtest.py auto-accept all snapshot changes, but invoking
cargo insta acceptevery time an mdtest failed made the script much slower.Test Plan
I manually tested it by making this change:
and then incrementally updated failing assertions that were presented to me by mdtest, observing that snapshot failures no longer blocked the script from continuing.