Skip to content

[$125] Investigate workflow job failing on main: test / test (job 1) #62169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
github-actions bot opened this issue May 16, 2025 · 11 comments
Open

[$125] Investigate workflow job failing on main: test / test (job 1) #62169

github-actions bot opened this issue May 16, 2025 · 11 comments
Assignees
Labels
Daily KSv2 External Added to denote the issue can be worked on by a contributor Workflow Failure

Comments

@github-actions
Copy link
Contributor

github-actions bot commented May 16, 2025

🚨 Failure Summary 🚨:

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

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021923284688403931634
  • Upwork Job ID: 1923284688403931634
  • Last Price Increase: 2025-05-16
  • Automatic offers:
    • nkdengineer | Contributor | 107338624
Issue OwnerCurrent Issue Owner: @
@mountiny mountiny added External Added to denote the issue can be worked on by a contributor Daily KSv2 and removed Hourly KSv2 labels May 16, 2025
Copy link

melvin-bot bot commented May 16, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021923284688403931634

@melvin-bot melvin-bot bot changed the title Investigate workflow job failing on main: test / test (job 1) [$250] Investigate workflow job failing on main: test / test (job 1) May 16, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 16, 2025
Copy link

melvin-bot bot commented May 16, 2025

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External)

@mountiny
Copy link
Contributor

This rest seems flaky, looking for proposals to fix it

@mountiny mountiny changed the title [$250] Investigate workflow job failing on main: test / test (job 1) [$125] Investigate workflow job failing on main: test / test (job 1) May 16, 2025
Copy link

melvin-bot bot commented May 16, 2025

Upwork job price has been updated to $125

@nkdengineer
Copy link
Contributor

nkdengineer commented May 16, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-05-16 08:49:31 UTC.

Proposal

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

test flaky

What is the root cause of that problem?

We use createRandomReport function in this test

it('should exclude hidden participants', () => {
const report: Report = {
...createRandomReport(1),
participants: {
1: {notificationPreference: 'hidden'},
2: {notificationPreference: 'always'},
},
};

this will result in the value of shouldExcludeHiddenParticipants being flaky

App/src/libs/ReportUtils.ts

Lines 2794 to 2796 in 9e0ae4f

const isReportGroupChat = isGroupChat(report);
const shouldExcludeHiddenParticipants = !isReportGroupChat && !isMoneyRequestReport(report) && !isMoneyRequest(report);
const chatParticipants = getParticipantsAccountIDsForDisplay(report, isRoomMembersList || shouldExcludeHiddenParticipants, false, false, reportMetadata);

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

We should add type and chatType for this report

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

NA

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.

Copy link
Contributor Author

⚠️ @nkdengineer Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

@ishpaul777
Copy link
Contributor

test was added in #61818, i remember test passing can you help me understand what changed since then @nkdengineer

@nkdengineer
Copy link
Contributor

@ishpaul777, as you can see in createRandomReport, we randomly chatType in here

export default function createRandomReport(index: number): Report {
return {
reportID: index.toString(),
chatType: rand(Object.values(CONST.REPORT.CHAT_TYPE)),
currency: randCurrencyCode(),
ownerAccountID: index,
isPinned: randBoolean(),
isOwnPolicyExpenseChat: randBoolean(),
isWaitingOnBankAccount: randBoolean(),
policyID: index.toString(),
reportName: randWord(),
};
}

And in this condition, when chatType is GROUP type => shouldExcludeHiddenParticipants will be false => We fail this test

App/src/libs/ReportUtils.ts

Lines 2794 to 2796 in 9e0ae4f

const isReportGroupChat = isGroupChat(report);
const shouldExcludeHiddenParticipants = !isReportGroupChat && !isMoneyRequestReport(report) && !isMoneyRequest(report);
const chatParticipants = getParticipantsAccountIDsForDisplay(report, isRoomMembersList || shouldExcludeHiddenParticipants, false, false, reportMetadata);

@ishpaul777
Copy link
Contributor

@nkdengineer thx, it makes sense

proposal seems good 👍

🎀 👀 🎀

Copy link

melvin-bot bot commented May 16, 2025

Current assignee @mountiny is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 16, 2025
Copy link

melvin-bot bot commented May 16, 2025

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 External Added to denote the issue can be worked on by a contributor Workflow Failure
Projects
None yet
Development

No branches or pull requests

3 participants