Skip to content

Conversation

SethFalco
Copy link
Member

We have a step to delete duplicate SVGs from inside the directory. The problem is that depending on the order that find returned files in, which one actually got deleted could vary.

When all tests pass, this doesn't matter. But when we have the file in one of our files lists (expect-mismatch, ignore, or skip), then it can be a problem if the in subsequent builds of the Test Suite a different duplicate was deleted.

Adds sort to increase the reproducibility of SVGO Test Suite.

I believe this was the cause of sometimes new files being "fixed" or "breaking" randomly, it's when one of the known files that break end up with a new name.

An alternative fix could've been to simply name all files after their MD5 hash, but these solutions seem to be enough. It's nice to be able to refer to files by name anyway, and is better to be able to attribute a file by name too.

@SethFalco SethFalco merged commit b35c750 into main Aug 17, 2025
1 check passed
@SethFalco SethFalco deleted the sort-before-deleting branch August 17, 2025 11:55
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.

1 participant