Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2025 at 04:00 UTC
Updated:
23 Sep 2025 at 15:34 UTC
Jump to comment: Most recent
PHPUnit Build and Nightwatch jobs are failing very often. Almost every MR I push to fails at least once from one of these jobs. We have previously tried to fix the PHPUnit Build random fails in #3497701: [random test failure] PackageUpdateTest::testPackageUpdate but they still happen very often.
Add retry: 1 to these jobs.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
acbramley commentedComment #4
cmlaraLinking a related, and still open, issue that also discusses retrying known flakey tests. No decision is in this issue, and the issue predates GitLabCI.
Comment #5
mondrakeI think this makes sense for now. It’s a small change, if it does not work it can be easily reverted.
In PHPUnit upstream, this is being proposed in #[Retry] attribute to support retrying flaky test #6182. That will allow working on a test class instead of the entire CI job, but surely will only happen in PHPUnit 12 or 13.
Comment #6
catchLinking related issues. I think a single retry is worth doing for these two jobs since we know they're very flaky. Adding related issues that are potentially why they're flaky. We're most likely to fix nightwatch but removing it entirely, and in that case the job will go. For build tests we should try to make the tests less flaky and remove the retry option again.
Comment #7
quietone commentedI support this change. It will simply do what I do manually to get those tests to pass.
Comment #10
catchYep let's do it - we can always revert if we think we've made them generally more reliable, or use
#[Retry]when it's available.