allow matcher graph to cope with suppressed images (take 2) #2539
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.
What does this change?
The current incarnation of the matcher graph script cannot cope with graphs containing suppressed images. This fixes that problem.
The problem has two causes:
I noticed this whilst trying to diagnose #2536
How to test
Run the matcher graph generator on a graph that contains a suppressed image, e.g.
yarn getMatcherGraph szjj6gqy
Before this change, you would have seen an error complaining about a surprise
(
After this change, you will see this:
szjj6gqy.pdf
How can we measure success?
We'll be able to more reliably generate matcher graphs to help diagnose potential merge problems.
Have we considered potential risks?
This is an internal tool used by developers to help diagnose problems. It does not interfere with the running of anything. The only risk I can imagine is if we genuinely have an image in the collection that looks like the placeholder image, and someone gets confused. I think that highly unlikely.