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

Periodically delete amp_validation_error terms which no longer appear on the site #1415

Closed
westonruter opened this issue Sep 9, 2018 · 5 comments

Comments

@westonruter
Copy link
Member

westonruter commented Sep 9, 2018

We need to add a cronjob to delete amp_validation_error terms that have zero URLs associated with them.

See #1413

@westonruter
Copy link
Member Author

This is obsolete as of #1429 since there is now a Clear Empty ability.

@westonruter
Copy link
Member Author

Actually, this isn't really obsolete. For trashed posts, they can be deleted with a button or they will be removed after a month via WP Cron. Something similar should be done for amp_validation_error taxonomy terms.

There is still a code comment that references this:

* list table. A cron job could periodically delete terms that have no counts.

@swissspidy
Copy link
Collaborator

Makes sense to implement 👍 It's annoying to manually clear empty results every so often.

@amedina
Copy link
Member

amedina commented May 16, 2019

Can this be achieved at the time the counter reaches 0? I mean, at the very moment when the 0 value is computed, the orphan error is removed.

@westonruter
Copy link
Member Author

That's possible but I think we'd lose out on something important: keeping track of validation errors that contain attributes with variable attributes. For example, if there is a script that contains a random string, this will generate a different validation error every time the page is checked and as soon as it is re-checked then the previous errors would have 0 found URLs. Being able to see a list of many such validation errors is important for debugging as it indicates the need for an amp_validation_error to normalize the variable bits.

@westonruter westonruter changed the title Periodically delete amp_validation_error terms which no longer appear on the site Periodically delete reviewed amp_validation_error terms which no longer appear on the site Jun 10, 2020
@westonruter westonruter changed the title Periodically delete reviewed amp_validation_error terms which no longer appear on the site Periodically delete amp_validation_error terms which no longer appear on the site Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants