Skip to content
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

[HOLD for payment 2024-10-08] [$75] Migrate withWritableReportOrNotFound from withOnyx to useOnyx #49110

Closed
roryabraham opened this issue Sep 12, 2024 · 28 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@roryabraham
Copy link
Contributor

roryabraham commented Sep 12, 2024

Coming from https://expensify.slack.com/archives/C01GTK53T8Q/p1725973460005309?thread_ts=1725905735.105989&cid=C01GTK53T8Q

Migrate src/pages/iou/request/step/withWritableReportOrNotFound.tsx to use useOnyx instead of withOnyx.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021834285173135937117
  • Upwork Job ID: 1834285173135937117
  • Last Price Increase: 2024-09-12
  • Automatic offers:
    • brunovjk | Reviewer | 103949076
Issue OwnerCurrent Issue Owner: @brunovjk
@roryabraham roryabraham added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2024
@roryabraham roryabraham self-assigned this Sep 12, 2024
@roryabraham roryabraham added the External Added to denote the issue can be worked on by a contributor label Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

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

Copy link

melvin-bot bot commented Sep 12, 2024

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

@melvin-bot melvin-bot bot changed the title Migrate withWritableReportOrNotFound from withOnyx to useOnyx [$250] Migrate withWritableReportOrNotFound from withOnyx to useOnyx Sep 12, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

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

@roryabraham roryabraham changed the title [$250] Migrate withWritableReportOrNotFound from withOnyx to useOnyx [$75] Migrate withWritableReportOrNotFound from withOnyx to useOnyx Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Upwork job price has been updated to $75

@abhinaybathina
Copy link
Contributor

Proposal

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

Migrate from withOnyx HOC to useOnyx hook

What is the root cause of that problem?

withOnyx HOC is deprecated

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

Whatever props are coming from withOnyx HOC in withWritableReportOrNotFound should be replaced with useOnyx hook

What alternative solutions did you explore? (Optional)

@Nodebrute
Copy link
Contributor

Nodebrute commented Sep 12, 2024

Edited by proposal-police: This proposal was edited at 2024-09-12 17:55:22 UTC.

Proposal

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

Migrate withWritableReportOrNotFound from withOnyx to useOnyx

What is the root cause of that problem?

Feature request

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

We can remove withOnyx from here
and use useOnyx

const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID || -1}`);
    const [isLoadingApp] = useOnyx(ONYXKEYS.IS_LOADING_APP);
    const [reportDraft] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_DRAFT}${reportID || -1}`);

Optional: we can also remove type props related to these.
Note: we might need to do some cleanup

What alternative solutions did you explore? (Optional)

We can remove withOnyx from here
and use useOnyx

const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID ?? -1}`);
    const [isLoadingApp] = useOnyx(ONYXKEYS.IS_LOADING_APP);
    const [reportDraft] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_DRAFT}${reportID ?? -1}`);

@brunovjk
Copy link
Contributor

Reviewing proposals today

@roryabraham
Copy link
Contributor Author

going to treat these migrations on a first-come-first-serve basis while avoiding assigning the same person to multiple

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 13, 2024
Copy link

melvin-bot bot commented Sep 13, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Sep 13, 2024

📣 @abhinaybathina You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@abhinaybathina
Copy link
Contributor

Hi team, thanks for assigning this to me. I've checked upwork but I didn't receive any job offer. Can you please look into it? @roryabraham . Thanks!

@abhinaybathina
Copy link
Contributor

Sorry never mind, I've applied to the Upwork job. Please expect the PR to be ready for review by today EOD. Thanks!

@miljakljajic miljakljajic removed their assignment Sep 20, 2024
@miljakljajic miljakljajic added the Bug Something is broken. Auto assigns a BugZero manager. label Sep 20, 2024
Copy link

melvin-bot bot commented Sep 20, 2024

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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 20, 2024
@miljakljajic
Copy link
Contributor

Heading out on parental leave - assigning to another BZ team member to take over.

Next steps: PR is being reviewed today or tomorrow as per #49200 (comment)

@abhinaybathina
Copy link
Contributor

Hi @roryabraham. Thanks for reviewing the PR and merging it. I've applied for this Upwork job but there is no update on Upwork. Can you please check?

Copy link

melvin-bot bot commented Sep 27, 2024

@garrettmknight, @abhinaybathina, @roryabraham, @brunovjk Whoops! This issue is 2 days overdue. Let's get this updated quick!

@roryabraham roryabraham removed the Reviewing Has a PR in review label Sep 29, 2024
@melvin-bot melvin-bot bot added the Overdue label Sep 29, 2024
@roryabraham
Copy link
Contributor Author

@abhinaybathina @garrettmknight will help handle the payment on Upwork. Thanks. As stated in our contributing guidelines, jobs are typically paid out after the code has been on production for a week without causing regressions.

This PR was deployed to staging yesterday.

@brunovjk
Copy link
Contributor

PR on staging

@melvin-bot melvin-bot bot removed the Overdue label Sep 30, 2024
@abhinaybathina
Copy link
Contributor

I have tested on staging, working fine

@garrettmknight garrettmknight added the Awaiting Payment Auto-added when associated PR is deployed to production label Oct 1, 2024
@garrettmknight garrettmknight changed the title [$75] Migrate withWritableReportOrNotFound from withOnyx to useOnyx [HOLD for payment 2024-10-08] [$75] Migrate withWritableReportOrNotFound from withOnyx to useOnyx Oct 1, 2024
@garrettmknight
Copy link
Contributor

Payment Summary:

@garrettmknight
Copy link
Contributor

@abhinaybathina please accept the offer.

@abhinaybathina
Copy link
Contributor

@garrettmknight Accepted

@brunovjk
Copy link
Contributor

brunovjk commented Oct 1, 2024

I will complete the BZ checklist before payday. Thanks.

Copy link

melvin-bot bot commented Oct 4, 2024

@garrettmknight, @abhinaybathina, @roryabraham, @brunovjk Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Oct 4, 2024
@brunovjk
Copy link
Contributor

brunovjk commented Oct 7, 2024

  • [@brunovjk] The PR that introduced the bug has been identified. Link to the PR: No PR introduce the issue, since is a migration from withOnyx to useOnyx.
  • [@brunovjk] 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:
  • [@brunovjk] A discussion in #expensify-bugs 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:
  • [@brunovjk] Determine if we should create a regression test for this bug: No
  • [@brunovjk] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

cc: @garrettmknight

@melvin-bot melvin-bot bot added Daily KSv2 and removed Overdue Daily KSv2 labels Oct 7, 2024
@garrettmknight
Copy link
Contributor

Paid out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Development

No branches or pull requests

6 participants