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

HIGH: [Tracking] Implement report NextSteps in Auth #42118

Open
8 of 19 tasks
mountiny opened this issue May 13, 2024 · 67 comments
Open
8 of 19 tasks

HIGH: [Tracking] Implement report NextSteps in Auth #42118

mountiny opened this issue May 13, 2024 · 67 comments
Assignees
Labels
Daily KSv2 Planning Changes still in the thought process Task

Comments

@mountiny
Copy link
Contributor

mountiny commented May 13, 2024

Whatsnext post here.

Design doc https://docs.google.com/document/d/1gUDVqDdDj0jVOIuFBqPr0D6-vnClB-iztl38PzsiBqE/edit

GH Project https://github.com/orgs/Expensify/projects/154/views/1
CAP issue https://github.com/Expensify/Expensify/issues/406189

Proposal
Migrate the report next steps from PHP to Auth

Problem
Report next steps are currently calculated on the fly in PHP and are not stored in a database. This means that any commands using report next steps cannot be implemented following the true 1:1:1 API philosophy at the moment. We cannot queue report next steps updates in Auth because we must wait for an Auth command response to trigger the calculation of updated next steps in PHP. Only then can the update be pushed to relevant clients.

Similar to the case of violations, this leads to multiple Auth calls being made during a single API request, breaking the 1:1:1 rule. Many commands are slowed down due to the report next steps computation triggering multiple Auth calls. For example, any action that changes the state or status of a report will trigger a new next step computation. These may be computed multiple times per report as each participant of the expense report might receive different next steps.

It's worth noting that in order to support optimistic and offline calculation of some report next steps, we've implemented the core collect workspace next steps logic in the front-end code of NewDot.

While this project should only focus on migrating what we have from PHP to Auth, it is important to note that this migration is likely to be critical for ensuring that important upcoming projects are 1:1:1-compliant, such as the Search page, where we need to compute the next action for a report efficiently.

Solution
At a high level, the solution is to move report next steps to Auth; however, the details need to be fleshed out through predesign and a design document.

At minimum, we should discuss:

  • The exact scope of this project.
  • The deadline and priority of this project among others.
  • How we are going to execute this migration from PHP to Auth to avoid any regressions in OldDot.
  • Whether we should keep the report next steps in their own Onyx reportNextSteps key or add them as a key inside the report object.
  • How we are going to coordinate with the violations migration that is related to this project (we need to be able to compute report violations to determine report next steps).
  • How the timelines for the report next steps audit and this project will align.

cc @JmillsExpensify @cead22


Tasks

  • Post Proposal (full Problem/Solution statement) in #whatsnext
  • Wait at least one full business day, and until the post has a majority (2/3) of positive reactions (👍)
  • Paste Proposal in the space above with a link to the Slack thread
  • Email strategy@expensify.com and paste in the Proposal
  • Host a pre-design meeting (example) in an appropriate slack channel to discuss any necessary details in public before filling out the High-level of proposed solution section.
  • Fill out the High-level overview of the problem, Timeline, Terminology, and High-level of proposed solution sections of the Design Doc
  • Email strategy@expensify.com (continue the same email chain as before - your last message should be the WN Proposal) with the link to your Design Doc containing your high-level problem and solution
  • Add the DesignDocReview label to get the High-level overview of the problem and High-level of proposed solution section reviewed
  • Respond to any questions or concerns and bring up blockers in Slack to get a consensus if necessary
  • Confirm that the doc has the minimum necessary number of reviews before proceeding
  • Host another pre-design meeting in the appropriate slack channel to ask for engineering feedback on the technical solution.
  • Fill out the Detailed implementation of the solution and related sections.
  • Re-add the DesignDocReview label to this issue
  • Respond to any questions or concerns and bring up blockers in Slack to get consensus if necessary
  • Confirm that the doc has the minimum necessary number of reviews before proceeding
  • Email strategy@expensify.com one last time to let them know the Design Doc is moving into the implementation phase
  • Implement the changes
  • Add regression tests so that QA can test your feature with every deploy (instructions)
  • Send out a follow up email to strategy@expensify.com once everything has been implemented and do a Project Wrap-Up retrospective that provides:
    • Summary of what we accomplished with this project
    • What went well?
    • What could we have done better?
    • What did we learn?
Issue OwnerCurrent Issue Owner: @dangrous
@mountiny mountiny added Daily KSv2 Planning Changes still in the thought process Task labels May 13, 2024
@mountiny mountiny self-assigned this May 13, 2024
@mountiny
Copy link
Contributor Author

@mountiny mountiny changed the title [Tracking] Implement report NextSteps in Auth [HIGH] [Tracking] Implement report NextSteps in Auth May 13, 2024
@muttmuure
Copy link
Contributor

Moving this to critical to include it in the daily updates

@muttmuure muttmuure changed the title [HIGH] [Tracking] Implement report NextSteps in Auth [CRITICAL] [Tracking] Implement report NextSteps in Auth May 14, 2024
@muttmuure muttmuure changed the title [CRITICAL] [Tracking] Implement report NextSteps in Auth CRITICAL: [Tracking] Implement report NextSteps in Auth May 14, 2024
@mountiny
Copy link
Contributor Author

The proposal got enough support so we can move ahead. I will plan to make a short predesign for this project, but my week is broken up with moving stuff from Scotland to Czechia and short planned holiday. I expect to make more progress next week, but I will attempt to have the predesign out by EOW, early next week the latest.

@muttmuure muttmuure changed the title CRITICAL: [Tracking] Implement report NextSteps in Auth HIGH: [Tracking] Implement report NextSteps in Auth May 15, 2024
@melvin-bot melvin-bot bot added the Overdue label May 16, 2024
Copy link

melvin-bot bot commented May 17, 2024

@mountiny Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@mountiny
Copy link
Contributor Author

Gonna pick this back up this week once the performance is in better place

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 19, 2024
@mountiny
Copy link
Contributor Author

Looking into a predesign for tomorrow

@melvin-bot melvin-bot bot removed the Overdue label May 21, 2024
@mountiny
Copy link
Contributor Author

Deployer duties took over, still on my list

@melvin-bot melvin-bot bot added the Overdue label May 27, 2024
@mountiny
Copy link
Contributor Author

The predesign was posted on Friday, going to sum it up to the doc this week

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 27, 2024
@mountiny
Copy link
Contributor Author

Aiming for EOW still

@melvin-bot melvin-bot bot removed the Overdue label May 29, 2024
@mountiny
Copy link
Contributor Author

Violations doc is out, I havent made much progress yet on this, but will ship this on Monday

@melvin-bot melvin-bot bot added the Overdue label Jun 3, 2024
Copy link

melvin-bot bot commented Jun 3, 2024

@mountiny Whoops! This issue is 2 days overdue. Let's get this updated quick!

@mountiny
Copy link
Contributor Author

mountiny commented Jun 4, 2024

Working on the high level still, aiming to have it mostly ready today

@melvin-bot melvin-bot bot removed the Overdue label Jun 4, 2024
@dangrous
Copy link
Contributor

I... have not had time. Next week for sure! I think this will be a bit slow even once I get started since there's a lot of moving pieces

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 23, 2024
@dangrous
Copy link
Contributor

okay! starting to look into this again. I need to remember how far I got before and then go from there

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 26, 2024
@dangrous
Copy link
Contributor

this is proceeding, discussing what we want to do about translations (which may change our approach) in this issue

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 28, 2024
@mountiny
Copy link
Contributor Author

mountiny commented Sep 2, 2024

@dangrous is working through the detailed section and the increased scope with translations

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 2, 2024
@dangrous
Copy link
Contributor

dangrous commented Sep 4, 2024

still prioritizing copilot, that will be launched on mon and can focus more on this then, if not before

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 4, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

@dangrous, @mountiny Eep! 4 days overdue now. Issues have feelings too...

@mountiny mountiny removed their assignment Sep 10, 2024
@melvin-bot melvin-bot bot removed the Overdue label Sep 10, 2024
@dangrous
Copy link
Contributor

predesign for a couple pieces of this will be going out tomorrow, then can continue work

@dangrous
Copy link
Contributor

@melvin-bot melvin-bot bot added the Overdue label Sep 16, 2024
Copy link

melvin-bot bot commented Sep 16, 2024

@dangrous Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@dangrous
Copy link
Contributor

WIll start updating design doc based on predesign shortly!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 17, 2024
@dangrous
Copy link
Contributor

Got some good further discussion on the predesign, I'll be restructuring the design doc and should be out by EOnextW - that's the plan anyway

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 20, 2024
@dangrous
Copy link
Contributor

Okay chill melvin, will have time to start mapping this out again this afternoon!

@melvin-bot melvin-bot bot removed the Overdue label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Planning Changes still in the thought process Task
Projects
None yet
Development

No branches or pull requests