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

Closes #5549 Clear cache table on domain change #6696

Merged
merged 12 commits into from
Jun 20, 2024

Conversation

Tabrisrp
Copy link
Contributor

@Tabrisrp Tabrisrp commented Jun 4, 2024

Description

Fixes #5549

Documentation

User documentation

  • Clear the cache table on domain change
  • Trigger the OCI warmup on domain change
  • Trigger the sitemap preload on domain change

Technical documentation

  • Added a new method to truncate the cache table
  • Added a new method to truncate the cache table and start the sitemap preload
  • Added a new method callback to trigger the OCI warmup on domain change

Type of change

  • Enhancement (non-breaking change which improves an existing functionality).

Checklists

Feature validation

  • I validated all the Acceptance Criteria. If possible, provide sreenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote self-explanatory code about what it does.
  • I wrote comments to explain why it does it.
  • I named variables and functions explicitely.
  • I protected entry points against unexpected inputs.
  • I did not introduce unecessary complexity.

Copy link

codacy-production bot commented Jun 4, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 6fc1a471 57.89% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6fc1a47) Report Missing Report Missing Report Missing
Head commit (abe9942) 37282 14473 38.82%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6696) 19 11 57.89%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences


🚀 Don’t miss a bit, follow what’s new on Codacy.

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@Tabrisrp Tabrisrp self-assigned this Jun 4, 2024
@Tabrisrp Tabrisrp added this to the 3.16.2 milestone Jun 5, 2024
@Tabrisrp Tabrisrp added module: preload type: enhancement Improvements that slightly enhance existing functionality and are fast to implement labels Jun 5, 2024
@Tabrisrp Tabrisrp marked this pull request as ready for review June 5, 2024 19:21
@Tabrisrp Tabrisrp requested a review from a team June 5, 2024 19:21
inc/Engine/Preload/Admin/Settings.php Outdated Show resolved Hide resolved
inc/Engine/Preload/Database/Tables/Cache.php Show resolved Hide resolved
@Tabrisrp Tabrisrp requested a review from jeawhanlee June 10, 2024 13:56
@jeawhanlee
Copy link
Contributor

Aside the comment above, On develop, I can see that we clear the cache table during domain change but it's not truncated, with this PR we truncate the cache table.

I also proactively ran smoke tests on e2e and it passes. @MathieuLamiot do we wait for a test plan from @wp-media/qa-team on this one.

@MathieuLamiot
Copy link
Contributor

@jeawhanlee @Tabrisrp Unless you see something risky in the changes, let's not wait for a specific test plan. Instead we should:

  • Perform the "How to reproduce" steps from the original GH issue and ensure the expected behavior is now happening, that there are no errors/warnings and that the preload feature seems to work appropriately on basic use-cases.
  • QA team would then be able to perform overall preload Non-regression tests on develop once they are back.

@MathieuLamiot
Copy link
Contributor

Following @jeawhanlee comments on the review, I am moving this back to In Progress so that you can discuss them.

@Tabrisrp Tabrisrp requested a review from jeawhanlee June 18, 2024 13:28
@jeawhanlee
Copy link
Contributor

Working as expected according to AC here

@jeawhanlee jeawhanlee added this pull request to the merge queue Jun 20, 2024
Merged via the queue into develop with commit bc4f606 Jun 20, 2024
13 checks passed
@jeawhanlee jeawhanlee deleted the enhancement/5549-domain-change branch June 20, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: preload type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty the wpr_rocket_cache table after a domain migration
4 participants