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

Remove fonts data collection transient with uninstall #7212

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

wordpressfan
Copy link
Contributor

@wordpressfan wordpressfan commented Jan 2, 2025

Description

Fixes #7209

We need to remove the transient rocket_fonts_data_collection when we remove the plugin not to track wrong data.

Type of change

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

Detailed scenario

Install v3.18-alpha3 and deactivate then remove completely, u will notice that we leave the mentioned transient without removal.

Technical description

Documentation

Nothing more than removing the transient with plugin removal/deactivation.

New dependencies

No

Risks

No

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots 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 a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

Unticked items justification

All should be good with this small change.

Additional Checks

  • In the case of complex code, I wrote comments to explain it.
  • When possible, I prepared ways to observe the implemented system (logs, data, etc.).
  • I added error handling logic when using functions that could throw errors (HTTP/API request, filesystem, etc.)

Sorry, something went wrong.

@wordpressfan wordpressfan self-assigned this Jan 2, 2025
@wordpressfan wordpressfan marked this pull request as ready for review January 2, 2025 22:41
Copy link

codacy-production bot commented Jan 2, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -0.10%) 33.33% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (fd1a88d) 38758 17139 44.22%
Head commit (1e4ab02) 38760 (+2) 17139 (+0) 44.22% (+0.00%)

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 (#7212) 3 1 33.33%

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

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

@Mai-Saad
Copy link
Contributor

Mai-Saad commented Jan 3, 2025

@wordpressfan Thanks for the PR. Transient is deleted now with deactivation.
Note: (already on 3.18alpha3)

  • if fonts folder wasn't created while activating local fonts/analytics => the transient won't be generated even if we run the related action manually

@wordpressfan
Copy link
Contributor Author

I guarded against not existing fonts directory, so we are fine here.

@wordpressfan wordpressfan merged commit 2b77a58 into feature/3.18 Jan 3, 2025
12 of 13 checks passed
@wordpressfan wordpressfan deleted the fix/7209-remove-transient-with-uninstall branch January 3, 2025 15:40
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.

'rocket_fonts_data_collection' transient shall be deleted when uninstall WPR
3 participants