fix(tile): add a knob to have deterministic random in label and headline #12107
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.
Related Ticket(s)
Follow up to #12091
Description
Since merging #12091, we've been getting Percy complaining about differences in the tile stories. The reason is that those stories have a random selection of labels and headlines each time you visit the story anew.
This PR introduces a pre-generated sequence of index numbers for the list of labels and headlines, which you can "pre-seed" by chosing a starting sequence number. This ensures that given any stating sequence number the chosen labels and headlines will be the same always. That should allow us to run Percy consistently wthout having to approve changes on every commit.
Note: Percy will report the same annoying differences in the tile story on this PR too, but after its merged, should never bother us again over differences in the chosen labels and headlines.
Changelog
Changed