Skip to content

chore: fix transient random test failures#10122

Merged
paulbalandan merged 1 commit intocodeigniter4:developfrom
paulbalandan:transient-random-test-fails
Apr 20, 2026
Merged

chore: fix transient random test failures#10122
paulbalandan merged 1 commit intocodeigniter4:developfrom
paulbalandan:transient-random-test-fails

Conversation

@paulbalandan
Copy link
Copy Markdown
Member

Description
Random tests still fails at some points. Trying to probe the likely culprit.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@github-actions github-actions bot added the github_actions Pull requests that update Github_actions code label Apr 18, 2026
@paulbalandan paulbalandan force-pushed the transient-random-test-fails branch from 0973042 to e7823b1 Compare April 18, 2026 18:37
@paulbalandan
Copy link
Copy Markdown
Member Author

paulbalandan commented Apr 18, 2026

The fix here is to acknowledge the fact that the transient failures may be caused by race issues within GitHub Actions. Thus, the script will retry for another round with a fresh random seed. Given that the failures all revolve around CodeIgniter\CodeIgniter not found or failed to autoload, I disabled opcache in CLI as a primary defense and the retry as fallback.

The retry mechanism absorbed the flaky test fails in Language and Log in the SQLSRV matrix.

@michalsn
Copy link
Copy Markdown
Member

I've tried various things myself, but since the problem only occurs on GitHub Actions, it's hard to debug.

The retry mechanism seems to work, but maybe we should stop running these tests in parallel?

@paulbalandan
Copy link
Copy Markdown
Member Author

That could work as well. However, running the tests sequentially could take much more time as we incrementally add components, and the default repeat in GitHub Actions is 10.

Will that trade off be ok with you?

Copy link
Copy Markdown
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

Okay, let's check how this will work for us now.

@paulbalandan paulbalandan merged commit e6f3c35 into codeigniter4:develop Apr 20, 2026
14 checks passed
@paulbalandan paulbalandan deleted the transient-random-test-fails branch April 20, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants