Skip to content

Investigate workflow job failing on main: test / test (job 7) #85142

Closed

Description

@github-actions

🚨 Failure Summary 🚨:

⚠️ 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 look into the following:

  1. Why the PR caused the job to fail?
  2. Address any underlying issues.

🐛 We appreciate your help in squashing this bug!

Activity

  1. marcaaron commented on Mar 12, 2026

    @marcaaron
    Contributor

    @MelvinBot any idea why this happened? Is anyone looking into it yet? Search for open issues. If not, propose a fix?

  2. MelvinBot commented on Mar 12, 2026

    @MelvinBot
    Contributor

    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). 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:

    import {PERMISSIONS, RESULTS} from 'react-native-permissions/dist/commonjs/permissions';

    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:

    import {PERMISSIONS} from 'react-native-permissions/dist/commonjs/permissions';
    import {RESULTS} from 'react-native-permissions/dist/commonjs/results';

    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:

    const RESULTS = { UNAVAILABLE: 'unavailable', BLOCKED: 'blocked', DENIED: 'denied', GRANTED: 'granted', LIMITED: 'limited' };

    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 this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  3. marcaaron commented on Mar 12, 2026

    @marcaaron
    Contributor

    @MelvinBot Can you fix this?

  4. MelvinBot commented on Mar 12, 2026

    @MelvinBot
    Contributor

    🤖 Draft PR created: #85147
    Please mark it as "Ready for review" when it is ready for review.

  5. added
    ReviewingHas a PR in review
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Mar 13, 2026
  6. 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
  7. melvin-bot commented on Mar 17, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  8. melvin-bot commented on Mar 17, 2026

    @melvin-bot

    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. 🎊

  9. 2 remaining items

  10. 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
  11. removed their assignment
    on Mar 24, 2026
  12. mallenexpensify commented on Mar 24, 2026

    @mallenexpensify
    Contributor

    No contributors assigned, removing payment deets

  13. melvin-bot commented on Mar 27, 2026

    @melvin-bot

    @marcaaron Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  14. melvin-bot commented on Mar 27, 2026

    @melvin-bot

    @marcaaron Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  15. melvin-bot commented on Mar 31, 2026

    @melvin-bot

    @marcaaron 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  16. melvin-bot commented on Mar 31, 2026

    @melvin-bot

    @marcaaron 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions