Closes #3: Ignore random errors in certain cases#4
Conversation
| * @var array | ||
| */ | ||
| private $debug_log_exclusion_patterns = [ | ||
| 'wp-rocket/inc/Dependencies/Database', |
There was a problem hiding this comment.
Instead of this we can exclude the error-mentioned table already exist like
[01-Apr-2026 12:55:49 UTC] WordPress database error Table 'wp_wpr_lazy_render_content' already exists for query CREATE TABLE wp_wpr_lazy_render_content ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, url varchar(2000) NOT NULL default '', is_mobile tinyint(1) NOT NULL default 0, below_the_fold longtext default '', error_message longtext default '', status varchar(255) NOT NULL default '', modified timestamp NOT NULL default '0000-00-00 00:00:00', last_accessed timestamp NOT NULL default '0000-00-00 00:00:00', created_at timestamp NULL, PRIMARY KEY (id), KEY url (url(150), is_mobile), KEY modified (modified), KEY last_accessed (last_accessed), INDEX status_index (status(191)) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Rocket\Dependencies\BerlinDB\Database\Table->maybe_upgrade, WP_Rocket\Dependencies\BerlinDB\Database\Table->install, WP_Rocket\Dependencies\BerlinDB\Database\Table->create
but we still need to capture table doesn't exist like the one here https://group-onecom.slack.com/archives/C08F4M3BBJL/p1759931109493459
Description
Fixes #3
Introduces exclusions of known WP Rocket related errors in debug.log
Type of change
Detailed scenario
Errors Identified here will be flagged in e2e with develop branch
Technical description
Documentation
Added an exclusion for known wpr related errors, gather all wpr related errors and filter based on matches, also new patterns can be added using filters.
Patterns used:
New dependencies
N/A
Risks
New type of errors with patterns not already covered could surface, that's the reason the option for a filter is available to still work till new pattern is implemented.
Mandatory Checklist
Code validation
Code style
Unticked items justification