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 #6781: 3.17 - Refactor Cron #6797

Merged

Conversation

Khadreal
Copy link
Contributor

Description

Fixes #6781

Documentation

User documentation

Nothing changed on user side.

Explain how this code impacts users.

Technical documentation

Move cron controller and subscriber from ATF to PerformanceHints.

Type of change

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

New dependencies

List any new dependencies that are required for this change.

Risks

List possible performance & security issues or risks, and explain how they have been mitigated.

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.

Documentation

  • I prepared the user documentation for the feature/enhancement and shared it in the PR or the GitHub issue.
  • The user documentation covers new/changed entry points (endpoints, WP hooks, configuration files, ...).
  • I prepared the technical documentation if needed, and shared it in the PR or the GitHub issue.

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.
  • I listed the introduced external dependencies explicitely on the PR.
  • I validated the repo-specific guidelines from CONTRIBUTING.md.

Observability

  • I handled errors when needed.
  •  I wrote user-facing messages that are understandable and provide actionable feedbacks.
  • I prepared ways to observe the implemented system (logs, data, etc.).

Risks

  •  I explicitely mentioned performance risks in the PR.
  • I explicitely mentioned security risks in the PR.

@Khadreal Khadreal requested a review from a team July 18, 2024 08:28
@Khadreal Khadreal changed the base branch from 3.17-atf-refactor to develop July 18, 2024 08:47
@Khadreal Khadreal changed the base branch from develop to 3.17-atf-refactor July 18, 2024 08:49
@Khadreal Khadreal self-assigned this Jul 18, 2024
@Khadreal Khadreal added the type: enhancement Improvements that slightly enhance existing functionality and are fast to implement label Jul 18, 2024
@Khadreal Khadreal linked an issue Jul 18, 2024 that may be closed by this pull request
@Khadreal Khadreal force-pushed the subtask/6781-3.17-refactor-cron branch from 086ca01 to ed8371b Compare July 23, 2024 13:08
@jeawhanlee
Copy link
Contributor

Moving this back to in progress.
Cron tests were not refactored..

@Khadreal
Copy link
Contributor Author

Moving this back to in progress. Cron tests were not refactored..

Will add test for it, don't think we have one before now

inc/Engine/Common/PerformanceHints/Cron/CronProcessor.php Outdated Show resolved Hide resolved
inc/Engine/Common/PerformanceHints/Cron/CronProcessor.php Outdated Show resolved Hide resolved
inc/Engine/Common/PerformanceHints/Cron/CronProcessor.php Outdated Show resolved Hide resolved
inc/Engine/Common/PerformanceHints/Cron/CronProcessor.php Outdated Show resolved Hide resolved
inc/Engine/Common/PerformanceHints/Cron/CronProcessor.php Outdated Show resolved Hide resolved
inc/Engine/Common/PerformanceHints/ServiceProvider.php Outdated Show resolved Hide resolved
inc/Engine/Common/PerformanceHints/ServiceProvider.php Outdated Show resolved Hide resolved
inc/Engine/Common/PerformanceHints/ServiceProvider.php Outdated Show resolved Hide resolved
@jeawhanlee
Copy link
Contributor

Moving this back to in progress. Cron tests were not refactored..

Will add test for it, don't think we have one before now

I can see one here: https://github.com/wp-media/wp-rocket/tree/subtask/6781-3.17-refactor-cron/tests/Integration/inc/Engine/Media/AboveTheFold/Cron/Subscriber

@jeawhanlee jeawhanlee changed the base branch from 3.17-atf-refactor to develop July 25, 2024 09:25
@jeawhanlee
Copy link
Contributor

I have temporarily changed the base branch to develop so git actions and automated tests can be triggered when you push.

Copy link

codacy-production bot commented Jul 25, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.01% (target: -0.10%) 23.08% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (b87f0fb) 37492 14610 38.97%
Head commit (3d2ff0c) 37500 (+8) 14610 (+0) 38.96% (-0.01%)

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 (#6797) 26 6 23.08%

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

@Khadreal Khadreal requested a review from jeawhanlee July 25, 2024 13:59
@jeawhanlee jeawhanlee changed the base branch from develop to 3.17-atf-refactor July 25, 2024 14:05
@jeawhanlee jeawhanlee changed the base branch from 3.17-atf-refactor to develop July 25, 2024 14:30
@Khadreal Khadreal requested a review from jeawhanlee July 25, 2024 16:30
@jeawhanlee jeawhanlee changed the base branch from develop to 3.17-atf-refactor July 25, 2024 16:32
@jeawhanlee
Copy link
Contributor

jeawhanlee commented Jul 25, 2024

Merge 3.17-atf-refactor branch and fix the conflicts

@jeawhanlee jeawhanlee changed the base branch from 3.17-atf-refactor to develop July 25, 2024 16:40
@jeawhanlee jeawhanlee changed the base branch from develop to 3.17-atf-refactor July 26, 2024 12:40
@jeawhanlee jeawhanlee changed the base branch from 3.17-atf-refactor to enhancement/6779-atf-db-refactor July 26, 2024 12:47
@jeawhanlee jeawhanlee merged commit 6efc8cc into enhancement/6779-atf-db-refactor Jul 26, 2024
12 of 13 checks passed
@jeawhanlee jeawhanlee deleted the subtask/6781-3.17-refactor-cron branch July 26, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3.17 - Refactor Cron
3 participants