You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate workflow job failing on main: test / test (job 7) #85142
🐛 Error Message:
warning: Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@8ade135, SimenB/github-actions-cpu-cores@31e91de. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
failure: Process completed with exit code 1.
⚠️Action Required⚠️:
🛠️ A recent merge appears to have caused a failure in the job named test / test (job 7).
🔍 This issue has been automatically created and labeled with Workflow Failure for investigation.
Please re-state the problem that we are trying to solve in this issue.
The test / test (job 7) workflow on main is failing consistently across multiple unrelated PRs (this issue, plus #85136, #85128, #85060). The confirmPassingBuild step reports both lint: failure and test: failure. These are two independent, pre-existing problems — neither was introduced by PR #85009.
What is the root cause of that problem?
There are two separate root causes:
1. Test failure — broken react-native-permissions mock
The test IOURequestStepConfirmationPageTest → "should route unreported distance expense to requestMoney and skip createDistanceRequest" crashes with:
TypeError: Cannot read properties of undefined (reading 'GRANTED')
at __mocks__/react-native-permissions.ts:11
The mock file imports RESULTS from the wrong module path:
The permissions sub-module only exports PERMISSIONS. RESULTS is defined in a separate module at react-native-permissions/dist/commonjs/results. So RESULTS is always undefined in the mock.
When the mocked check() or request() functions are called (they return RESULTS.GRANTED), they crash. The test is flaky because this code path only triggers when LocationPermissionModal mounts with startPermissionFlow=true, which depends on gpsRequired being truthy — a condition sensitive to timing of Onyx state updates and React effect batching.
2. Lint failure — --max-warnings budget exceeded
eslint-config-expensify v2.0.105 brought in eslint-plugin-react-hooks v7.0.1, which added 14 new React Compiler lint rules (including react-hooks/refs) at warn severity. The lint script uses --max-warnings=334. The cumulative "Cannot access refs during render" and other compiler warnings now exceed the 334 budget, causing ESLint to exit non-zero.
What changes do you think we should make in order to solve the problem?
For the test failure, fix the import in __mocks__/react-native-permissions.ts (line 1) to import RESULTS from the correct module:
For the lint failure, increase the --max-warnings threshold in package.json to accommodate the new React Compiler warnings (or alternatively, suppress the new compiler rules in the compat processor until the codebase is cleaned up).
What alternative solutions did you explore? (Optional)
For the mock fix, an alternative is to define RESULTS inline in the mock rather than importing it, which avoids any future dependency on internal module paths:
This same test failure is tracked in multiple Workflow Failure issues: #85060, #85128, #85136, #85142. The lint failure is tracked separately in #85137. All can be closed by fixing these two root causes.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Investigate workflow job failing on main: test / test (job 7)[/-][+][Due for payment 2026-03-24] Investigate workflow job failing on main: test / test (job 7)[/+]on Mar 17, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.38-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
changed the title [-][Due for payment 2026-03-24] Investigate workflow job failing on main: test / test (job 7)[/-][+]Investigate workflow job failing on main: test / test (job 7)[/+]on Mar 24, 2026
Activity
marcaaron commentedon Mar 12, 2026
@MelvinBot any idea why this happened? Is anyone looking into it yet? Search for open issues. If not, propose a fix?
MelvinBot commentedon Mar 12, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The
test / test (job 7)workflow on main is failing consistently across multiple unrelated PRs (this issue, plus #85136, #85128, #85060). TheconfirmPassingBuildstep reports both lint: failure and test: failure. These are two independent, pre-existing problems — neither was introduced by PR #85009.What is the root cause of that problem?
There are two separate root causes:
1. Test failure — broken
react-native-permissionsmockThe test
IOURequestStepConfirmationPageTest→ "should route unreported distance expense to requestMoney and skip createDistanceRequest" crashes with:The mock file imports
RESULTSfrom the wrong module path:The
permissionssub-module only exportsPERMISSIONS.RESULTSis defined in a separate module atreact-native-permissions/dist/commonjs/results. SoRESULTSis alwaysundefinedin the mock.When the mocked
check()orrequest()functions are called (they returnRESULTS.GRANTED), they crash. The test is flaky because this code path only triggers whenLocationPermissionModalmounts withstartPermissionFlow=true, which depends ongpsRequiredbeing truthy — a condition sensitive to timing of Onyx state updates and React effect batching.2. Lint failure —
--max-warningsbudget exceededeslint-config-expensifyv2.0.105 brought ineslint-plugin-react-hooksv7.0.1, which added 14 new React Compiler lint rules (includingreact-hooks/refs) atwarnseverity. The lint script uses--max-warnings=334. The cumulative "Cannot access refs during render" and other compiler warnings now exceed the 334 budget, causing ESLint to exit non-zero.What changes do you think we should make in order to solve the problem?
For the test failure, fix the import in
__mocks__/react-native-permissions.ts(line 1) to importRESULTSfrom the correct module:For the lint failure, increase the
--max-warningsthreshold inpackage.jsonto accommodate the new React Compiler warnings (or alternatively, suppress the new compiler rules in the compat processor until the codebase is cleaned up).What alternative solutions did you explore? (Optional)
For the mock fix, an alternative is to define
RESULTSinline in the mock rather than importing it, which avoids any future dependency on internal module paths:Related issues
This same test failure is tracked in multiple Workflow Failure issues: #85060, #85128, #85136, #85142. The lint failure is tracked separately in #85137. All can be closed by fixing these two root causes.
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.marcaaron commentedon Mar 12, 2026
@MelvinBot Can you fix this?
MelvinBot commentedon Mar 12, 2026
🤖 Draft PR created: #85147
Please mark it as "Ready for review" when it is ready for review.
[-]Investigate workflow job failing on main: test / test (job 7)[/-][+][Due for payment 2026-03-24] Investigate workflow job failing on main: test / test (job 7)[/+]melvin-bot commentedon Mar 17, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 17, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.38-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-03-24. 🎊
2 remaining items
[-][Due for payment 2026-03-24] Investigate workflow job failing on main: test / test (job 7)[/-][+]Investigate workflow job failing on main: test / test (job 7)[/+]mallenexpensify commentedon Mar 24, 2026
No contributors assigned, removing payment deets
melvin-bot commentedon Mar 27, 2026
@marcaaron Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Mar 27, 2026
@marcaaron Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Mar 31, 2026
@marcaaron 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Mar 31, 2026
@marcaaron 6 days overdue. This is scarier than being forced to listen to Vogon poetry!