Problem
As explained in this Slack thread, we ran into some problems when trying to implement the original plan from the design doc to compute customer report names optimistically based on the optimistic Onyx data that was about to be sent in a write request.
The problem was that we would go through each individual Onyx update and figure out if a report naming update was needed for it. But the context for computing those updates would come from Onyx and the current value saved there. So if there were multiple updates that affected each other, then stale values would be used when computing the report name and we would end up with the wrong final result. We encountered this problem while working on this issue
Solution
The solution that we landed on was to refactor the entire system to use onyx derived values so that the report name would be computed optimistically, although after the optimistic updates were applied, based on the formula and its dependencies. We'll use this issue to track the refactor from the current optimistic middleware solution to the solution using Onyx derived values.
We can consider the issue complete once some of the basic computation is working using derived values, and we are no longer using any type of middleware. We have other issues to track the overall implementation of the optimistic functionality.
Issue Owner
Current Issue Owner: @sosek108
Problem
As explained in this Slack thread, we ran into some problems when trying to implement the original plan from the design doc to compute customer report names optimistically based on the optimistic Onyx data that was about to be sent in a write request.
The problem was that we would go through each individual Onyx update and figure out if a report naming update was needed for it. But the context for computing those updates would come from Onyx and the current value saved there. So if there were multiple updates that affected each other, then stale values would be used when computing the report name and we would end up with the wrong final result. We encountered this problem while working on this issue
Solution
The solution that we landed on was to refactor the entire system to use onyx derived values so that the report name would be computed optimistically, although after the optimistic updates were applied, based on the formula and its dependencies. We'll use this issue to track the refactor from the current optimistic middleware solution to the solution using Onyx derived values.
We can consider the issue complete once some of the basic computation is working using derived values, and we are no longer using any type of middleware. We have other issues to track the overall implementation of the optimistic functionality.
Issue Owner
Current Issue Owner: @sosek108