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 #67: Only rename debug.log with errors relating to WPR #181

Conversation

jeawhanlee
Copy link
Contributor

Description

Fixes #67
Only renames debug.log files that contain wp rocket related errors.

Type of change

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

Detailed scenario

Run tests on debug.log and if a debug.log file is generated during the test run, e2e will automatically rename this log file thereby associating it to the scenario that triggered the creation even if it does not contain errors related to WP Rocket.

Technical description

Documentation

With this new implementation, the file is being read from the server and matched against patterns that could found when a WP Rocket error is generated.

New dependencies

N/A

Risks

N/A

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

  • This is already a test, I did not implement built-in test.
  • There are no entry points

@jeawhanlee jeawhanlee added the enhancement New feature or request label Jan 7, 2025
@jeawhanlee jeawhanlee self-assigned this Jan 7, 2025
@jeawhanlee jeawhanlee requested a review from a team January 7, 2025 14:15
Khadreal
Khadreal previously approved these changes Jan 7, 2025
Copy link
Contributor

@Mai-Saad Mai-Saad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug file won't be renamed now unless it have WP_Rocket or /plugins/wp-rocket/
Screenshot from 2025-01-08 13-09-09
(attached smoke test results and before/after PR for log files)
Screenshot from 2025-01-08 13-19-47
Screenshot from 2025-01-08 13-10-09

@Mai-Saad Mai-Saad merged commit 1204467 into develop Jan 8, 2025
2 checks passed
@Mai-Saad Mai-Saad deleted the enhancement/67-only-rename-debug-log-with-errors-relating-to-wpr branch January 8, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only rename debug.log with errors relating to WPR
3 participants