FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed incomplete deletion of all images that have passed tests before upload by ayshih · Pull Request #30188 · matplotlib/matplotlib · GitHub

Repository navigation

Fixed incomplete deletion of all images that have passed tests before upload - #30188

Merged
scottshambaugh merged 2 commits into
matplotlib:mainfrom
ayshih:image_cleanup
Jun 20, 2025
Merged

scottshambaugh merged 2 commits into
matplotlib:mainfrom
ayshih:image_cleanup

Conversation

ayshih commented Jun 19, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor

PR summary

This PR fixes a bug with #27882, which intended to delete all images that have passed tests before uploading the artifact. However, due to the specification of -type f in the find call, it inadvertently skips over images where the expected image is a symbolic link rather than an actual file. All of the baseline images in the repository are symbolically linked in the results folder (#10222), so #27882 actually deleted only those images where the expected image was dynamically generated.

This PR also extends the cleanup to GIF files (of which there is exactly one test).

I've tested this modification in a different PR, so I know that it successfully reduces the size of the uploaded artifact by ~50 MB. A few images (total of 370 kB) manage to still escape the cleanup, but I think that's small enough to put up with:

  • empty.eps and empty_eps.png from test_backend_ps.py, which seems to be because the comparison image is empty-expected.pdf (PDF, not EPS), so the cleanup isn't smart enough to clean them up
  • Many of the images from test_backend_pgf.py, which use a different approach for image comparisons

PR checklist

ayshih changed the title Fixed bug with deleting all images that have passed tests before upload Fixed incomplete deletion of all images that have passed tests before upload Jun 19, 2025

scottshambaugh commented Jun 20, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor

As mentioned in #27882, the real test here is that failed images still get uploaded. Have you checked that in your other PR?

ayshih commented Jun 20, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

Yup. I set the PR to have a single failing image comparison. The uploaded artifact archive was only ~400 kB instead of ~50 MB and had only the three images corresponding to the single failed test (plus the test_backend_ps and test_backend_pgf images that aren't as easily cleaned).

tacaswell added this to the v3.11.0 milestone Jun 20, 2025

Copy link
Copy Markdown
Member

The failed 3.13 test looked like something went wrong with compiling + freethreading which I'm very sure is unrelated to this change, but re-started the tests.

scottshambaugh merged commit 5539d12 into matplotlib:main Jun 20, 2025
ayshih deleted the image_cleanup branch June 20, 2025 16:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL