-
Notifications
You must be signed in to change notification settings - Fork 384
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
Refactor cron event to validate individual URLs #6520
Merged
westonruter
merged 49 commits into
develop
from
dev-tool/5750-refactor-url-validation-cron
Oct 21, 2021
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
6feb425
Update URL validation cron jobs
dhaval-parekh 2ce519a
Add unit test cases
dhaval-parekh 0e8fa73
Validate single URL on URL validation cron, Update test cases
dhaval-parekh a7aeb61
Hard core the site option key that need to delete
dhaval-parekh d7f1659
Merge branch 'develop' into dev-tool/5750-refactor-url-validation-cron
dhaval-parekh 9dcb139
Update comments
dhaval-parekh dc72b8a
Remove unused references
dhaval-parekh a67cadd
Merge branch 'develop' of github.com:ampproject/amp-wp into dev-tool/…
westonruter 4f1630e
Remove return of empty array
westonruter c085388
Replace extraneous URLValidationProvider with direct AMP_Validation_M…
westonruter 2a05e8f
Update tests to use DependencyInjectedTestCase
westonruter f41681f
Simplify URL validation scheduling by putting the queue in URLValidat…
westonruter 422d0f2
Re-schedule with new recurrence when schedule changes
westonruter bf25b0c
Unschedule event with wrong recurrence instead of rescheduling it
westonruter e7f51ea
Fix unit test case
dhaval-parekh 5f56cc1
Revert "Fix unit test case"
dhaval-parekh 3f803b0
Ensure that AMP-enabled posts are scanned
westonruter fc2c727
Remove obsolete force argument for amp validation CLI command
westonruter 72ffb2d
Provide wp_get_scheduled_event() implementation for WP<5.1 and add tests
westonruter b5afb54
Try not using past time for scheduling event
westonruter 7371fd4
Use daily schedule to test since available in older WP versions
westonruter dab728c
Merge branch 'develop' of github.com:ampproject/amp-wp into dev-tool/…
westonruter afcbcce
Fix covers phpdoc tags
westonruter ca7b70d
Use assertLessThanOrEqual rather than assertGreaterThanOrEqual
westonruter d1ccdaf
Fix covers phpdoc tag for wrap_block_callbacks
westonruter 2e2f363
Account for wp_schedule_event() returning bool as of WP 5.1
westonruter 4144830
Remove obsolete arg from URLScanningContext constructor
westonruter 79d678f
Remove unused amp_url_validation_limit_per_type filter
westonruter da77a0d
Allow options to be overridden when calling get_supportable_templates
westonruter 5bbadea
Refactor ScannableURLProvider and URLValidationProvider into services
westonruter ab2bff1
Include more AMP settings in validated environment
westonruter f0c7b3b
Fix tests after 5bbadea
westonruter 55c0ea7
Clear out cron validation queue whenever validated environment changes
westonruter 042a74c
Remove obsolete test for amp_should_use_new_onboarding
westonruter 4e0dda5
Fix test assertions by using polyfilled TestCase
westonruter 42a2c35
Remove unused DEFAULT_INTERVAL_WEEKLY and fix test_process_and_dequeu…
westonruter acf93dd
Use get_year_link() to obtain the year archive link and ensure it has…
westonruter 2e94ba4
Ensure author links are not 404
westonruter 6d25e3c
Improve test coverage
westonruter 1b1b7b1
Fix test for get_author_page_urls
westonruter 27b18de
Fix get_date_page test in WP<=5.1
westonruter 5820ce8
Merge branch 'develop' of github.com:ampproject/amp-wp into dev-tool/…
westonruter 5f5fe35
Merge branch 'develop' of github.com:ampproject/amp-wp into dev-tool/…
westonruter fce116d
Create a post before going to the onboarding wizard so there is somet…
westonruter 8f2985a
Create test post and page using REST API
delawski 43899d3
Do not show site preview if there are no preview URLs
delawski 331955f
Clean up site preview E2E test
delawski 8376583
Fix AMP Settings Review panel E2E test
delawski 284e489
Harden check for post being set
westonruter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be addressed in another PR, but even when in Standard mode we shouldn't assume that the
HOME_URL
has AMP enabled for it. The user could turn off the homepage template.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the way we get the preview permalink changes in #6610 quite a bit. I guess this will likely need to be changed in context of your comment.
amp-wp/assets/src/components/site-scan-context-provider/index.js
Lines 255 to 259 in 13fd827
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, since
scannableUrls
that we're now getting are context-aware, I think we won't have to guess which page to use for a preview. We could just grab the first one from the list, correct?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right!