Skip to content

[Due for payment 2025-11-12] [$125] Fix flakey test for timezone #74065

Closed

Description

@github-actions

🚨 Failure Summary 🚨:

  • 📋 Job Name: test / test (job 4)
  • 🔧 Failure in Workflow: Process new code merged to main
  • 🔗 Triggered by PR: PR Link
  • 👤 PR Author: @daledah
  • 🤝 Merged by: @lakchote
  • 🐛 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 4).
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!

Issue OwnerCurrent Issue Owner: @twisterdotcom

Activity

  1. nkdengineer commented on Nov 3, 2025

    @nkdengineer
    Contributor

    Proposal

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

    What is the root cause of that problem?

    isSameDay will convert the date to the local system timezone or UTC timezone before comparing. With GH action, the timezone is UTC

    expect(DateUtils.isToday(todayInTimezone, timezone)).toBe(true);

    return isSameDay(date, currentDateInTimeZone);

    While our test timezone is America/Los_Angeles. Then the test is flaky if date and currentDateInTimeZone are not the same day in the UTC timezone.

    const timezone = 'America/Los_Angeles';

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

    Change the test timezone to any UTC timezone Atlantic/Reykjavik

    const timezone = 'America/Los_Angeles';

    What alternative solutions did you explore? (Optional)

    Install @date-fns/tz. Ref: https://github.com/date-fns/tz?tab=readme-ov-file#tz

    Add in option as the timezone parameter. Fix the same for isYesterday/isTomorrow function

    import { tz } from "@date-fns/tz";
    return isSameDay(date, currentDateInTimeZone, {in: tz(timezone)}); 
    

    return isSameDay(date, currentDateInTimeZone);

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  2. changed the title [-]Investigate workflow job failing on main: test / test (job 4)[/-] [+][$125] Fix flakey test for timezone[/+] on Nov 3, 2025
  3. melvin-bot commented on Nov 3, 2025

    @melvin-bot

    ⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

  4. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 3, 2025
  5. melvin-bot commented on Nov 3, 2025

    @melvin-bot

    Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  6. lakchote commented on Nov 3, 2025

    @lakchote
    Contributor

    Test is flakey and passed on the 2nd try.

    Assigning you @nkdengineer, your proposal LGTM.

  7. nkdengineer commented on Nov 3, 2025

    @nkdengineer
    Contributor

    @lakchote What solution do you like?

  8. 8 remaining items

  9. changed the title [-][$125] Fix flakey test for timezone[/-] [+][Due for payment 2025-11-12] [$125] Fix flakey test for timezone[/+] on Nov 5, 2025
  10. melvin-bot commented on Nov 5, 2025

    @melvin-bot

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

  11. melvin-bot commented on Nov 5, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.44-5 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 2025-11-12. 🎊

    For reference, here are some details about the assignees on this issue:

    • @jjcoffee requires payment through NewDot Manual Requests
    • @nkdengineer requires payment (Needs manual offer from BZ)
  12. melvin-bot commented on Nov 5, 2025

    @melvin-bot

    @jjcoffee @twisterdotcom The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  13. jjcoffee commented on Nov 11, 2025

    @jjcoffee
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: https://github.com/Expensify/App/pull/27838/files#r2513273058

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. N/A since it's a test itself!

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  14. twisterdotcom commented on Nov 12, 2025

    @twisterdotcom
    Contributor

    Payment Summary:

  15. trjExpensify commented on Nov 13, 2025

    @trjExpensify
    Contributor

    approved $125 for @jjcoffee.

  16. nkdengineer commented on Dec 29, 2025

    @nkdengineer
    Contributor

    @twisterdotcom I get paid via NewDot now, please update the payment summary. Thanks!

  17. twisterdotcom commented on Jan 12, 2026

    @twisterdotcom
    Contributor

    @nkdengineer has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-0e8c-a716-81c2-1a44418fc794
  18. trjExpensify commented on Jan 19, 2026

    @trjExpensify
    Contributor

    Confirming payment summary here is correct.

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions