Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.27k stars 2.71k forks source link

[HOLD for payment 2024-07-24] Verify Podfile action is flaky #45220

Closed mountiny closed 1 month ago

mountiny commented 1 month ago

Problem

On some PRs, we have noticed a Verify Podfile action failing with illegitimate reasons. For example this one. This is causing a slowdown in development.

The error is:

script: tcgetattr/ioctl: Operation not supported on socket

Solution

Solve this flakiness and fix the actions.

Issue OwnerCurrent Issue Owner: @mountiny
melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @garrettmknight (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.

mountiny commented 1 month ago

@fabioh8010 has got a fix for this hopefully

mountiny commented 1 month ago

@fabioh8010 while we try to merge your fix fast, do you think you could (or someone from your team) still explore how to fix this while maintaining the colouring of the output? I assume that is a nice-to-have thing to improve DX

kabeer95 commented 1 month ago

Proposal: Fix Flaky Podfile Action

Problem Statement: The Podfile action is flaky, resulting in inconsistent behavior and errors.

Root Cause: The root cause of the problem is that the loginList data in ContactMethodsPage contains unnecessary login data with partnerName: "chat-expensify-com", which is not needed in this page.

Changes to Solve the Problem: To solve the problem, I propose the following changes:

Create a Login List Selector Create a login list selector that removes the unnecessary login data with partnerName: "chat-expensify-com" and use it in ContactMethodsPage.

Code Changes:

// Create a login list selector const loginListSelector = (data) => { return Object.fromEntries( Object.entries(data).filter(([key, value]) => value.partnerName !== 'chat-expensify-com') ); };

// Use the selector in ContactMethodsPage loginList: { key: ONYXKEYS.LOGIN_LIST, selector: loginListSelector, }, Alternative Solutions Explored:

Use Partner ID to Filter: Instead of using partnerName !== 'chat-expensify-com' to filter the login data, we can use partnerID if this property is available. This approach may be more robust and flexible. By implementing this solution, we should be able to fix the flaky Podfile action and ensure consistent behavior in ContactMethodsPage

fabioh8010 commented 1 month ago

@fabioh8010 while we try to merge your fix fast, do you think you could (or someone from your team) still explore how to fix this while maintaining the colouring of the output? I assume that is a nice-to-have thing to improve DX

Sure, I will continue investigations on this 🫡

One question: Do you think we need this colouring of the patch-package result on the CI too?

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.7-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-24. :confetti_ball:

melvin-bot[bot] commented 1 month ago

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

fabioh8010 commented 1 month ago

@mountiny PR is up -> https://github.com/Expensify/App/pull/45615

melvin-bot[bot] commented 1 month ago

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

garrettmknight commented 1 month ago

@mountiny we good to close this yeah?

mountiny commented 1 month ago

all good now