Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding cleanRecordPaparazzi... task to help tidy up orphaned snapshots #1316

Merged
merged 6 commits into from
Mar 1, 2024

Conversation

nak5ive
Copy link
Member

@nak5ive nak5ive commented Mar 1, 2024

This adds a global task deletePaparazziSnapshots and variant-specific tasks cleanRecordPaparazzi[Debug]

A clean-record task helps identify and tidy-up orphaned snapshots after test coverage/naming changes.

@nak5ive nak5ive changed the title Adding clean/cleanRecord tasks to help eliminate orphaned snapshots Adding cleanRecordPaparazzi... task to help tidy up orphaned snapshots Mar 1, 2024
@nak5ive nak5ive changed the title Adding cleanRecordPaparazzi... task to help tidy up orphaned snapshots [WIP] Adding cleanRecordPaparazzi... task to help tidy up orphaned snapshots Mar 1, 2024
Copy link
Collaborator

@jrodbx jrodbx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this will close #529.

@jamesmosley55 explored this in the past and we had preferred an more incremental approach via https://docs.gradle.org/current/userguide/custom_tasks.html#incremental_tasks vs a delete-all-then-record approach. Imagine changing the name of test method in FormBlocker, and deleting 1000+ images and rewriting 998? Maybe I'm prematurely optimizing?

What James was exploring was creating an index of image paths when recording and checking that on rerun to do an in-memory diff, eliminating the paths that are no longer present.

Also, can we add tests as part of this PR?

@nak5ive
Copy link
Member Author

nak5ive commented Mar 1, 2024

Imagine changing the name of test method in FormBlocker, and deleting 1000+ images and rewriting 998? Maybe I'm prematurely optimizing?

i feel like if you're calling cleanRecordPD there's an expectation that it does this.

Also, can we add tests as part of this PR?

yep! working on that

@nak5ive nak5ive changed the title [WIP] Adding cleanRecordPaparazzi... task to help tidy up orphaned snapshots Adding cleanRecordPaparazzi... task to help tidy up orphaned snapshots Mar 1, 2024
@jrodbx jrodbx merged commit 79bdd21 into master Mar 1, 2024
14 checks passed
@jrodbx jrodbx deleted the akent/clean-record branch March 1, 2024 23:28
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.

5 participants