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

URL validation CLI script contains logic that should be made available outside the CLI script #5307

Closed
johnwatkins0 opened this issue Sep 1, 2020 · 1 comment · Fixed by #5306
Assignees
Labels
Developer Tools Validation WS:UX Work stream for UX/Front-end
Milestone

Comments

@johnwatkins0
Copy link
Contributor

johnwatkins0 commented Sep 1, 2020

Feature description

The CLI script provides methods for getting different types of URLs to validate, and for iterating through these URLs. Instead of re-creating this logic for new plugin features, we can mostly extract it into separate classes for use elsewhere, e.g., in a REST endpoint or a WP Cron task.

Acceptance criteria

  • CLI script works exactly as before.

Implementation brief

Create new classes -- one for providing URLs and one for validating them -- that can be consumed by new features. Provide a locking mechanism to allow features to opt out of running if there is already a process validating URLs.

QA testing instructions

Run the CLI script (1) on small batches of URLs, (2) on large batch of URLs, and (3) with conditionals (e.g, is_single).

URLValidationProvider provides a locking mechanism that can be used to prevent two process from validating URLs at the same time. The CLI script uses this, so another test would be to attempt to run the script in two tabs and verify that the second one isn't allowed to run.

Changelog entry

  • Extract URL validation CLI script functionality into new classes for sharing with new plugin features.
@schlessera
Copy link
Collaborator

QA passed

Testing a default run on a site populated with the theme unit test data (255 URLs), a run filtered by templates and a run that was --forced.

The runs all completed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Tools Validation WS:UX Work stream for UX/Front-end
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants