Skip to content

[Due for payment 2026-01-21] Investigate workflow job failing on main: test / test (job 2) #79215

Closed

Description

@github-actions

🚨 Failure Summary 🚨:

  • 📋 Job Name: test / test (job 2)
  • 🔧 Failure in Workflow: Process new code merged to main
  • 🔗 Triggered by PR: PR Link
  • 👤 PR Author: @jmusial
  • 🤝 Merged by: @mountiny
  • 🐛 Error Message:
    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 2).
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. linhvovan29546 commented on Jan 10, 2026

    @linhvovan29546
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    What is the root cause of that problem?

    A test in IOUTest is flaky

    App/tests/actions/IOUTest.ts

    Lines 11784 to 11806 in 073940f

    it('should return timestamp from CREATED action when it exists', async () => {
    const createdTimestamp = '2024-01-15 12:00:00.000';
    const report = createRandomReport(1, undefined);
    const reportAction1 = createRandomReportAction(1);
    const reportAction2 = {
    ...createRandomReportAction(2),
    actionName: CONST.REPORT.ACTIONS.TYPE.CREATED,
    created: createdTimestamp,
    };
    const reportAction3 = createRandomReportAction(3);
    await Onyx.multiSet({
    [`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,
    [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`]: {
    [reportAction1.reportActionID]: reportAction1,
    [reportAction2.reportActionID]: reportAction2,
    [reportAction3.reportActionID]: reportAction3,
    },
    } as unknown as OnyxMultiSetInput);
    await waitForBatchedUpdates();
    const result = getReportOriginalCreationTimestamp(report);
    expect(result).toBe(createdTimestamp);

    The helper createRandomReportAction random returns an action whose actionName is CREATED. Because getReportOriginalCreationTimestamp use Array.find to looks for the action with type CREATED (
    const createdAction = Object.values(expenseReportActions ?? {}).find((action) => isCreatedAction(action));
    ), And the first report action type is random CREATED make the test fail.

    What changes do you think we should make in order to solve the problem?

    We can swap reportAction1 and reportAction2 so that reportAction1's actionName is always CREATED, rather than reportAction2's

    const reportAction1 = createRandomReportAction(1);

    const reportAction1={
                  ...createRandomReportAction(1),
                  actionName: CONST.REPORT.ACTIONS.TYPE.CREATED,
                  created: createdTimestamp,
              };
              const reportAction2 = createRandomReportAction(2)
              const reportAction3 = createRandomReportAction(3);
    

    Alternative we can override the generated action’s actionName with a deterministic, non-CREATED

       const reportAction1={
                    ...createRandomReportAction(1),
                    actionName: CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT,
                };
    

    What alternative solutions did you explore? (Optional)

    We can apply both of the solutions above

  2. situchan commented on Jan 11, 2026

    @situchan
    Contributor

    Commented in offending PR

  3. added a commit that references this issue on Jan 12, 2026
    99a5883
  4. hoangzinh commented on Jan 12, 2026

    @hoangzinh
    Contributor

    Commented in offending PR

    Thanks for the ping @situchan and thanks for investigation @linhvovan29546. I created a PR to fix this flaky test here

    #79330

  5. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jan 14, 2026
  6. changed the title [-]Investigate workflow job failing on main: test / test (job 2)[/-] [+][Due for payment 2026-01-21] Investigate workflow job failing on main: test / test (job 2)[/+] on Jan 14, 2026
  7. melvin-bot commented on Jan 14, 2026

    @melvin-bot

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

  8. melvin-bot commented on Jan 14, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.0-8 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-01-21. 🎊

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions