You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-04-03] [Report Fields] [Onyx] Move policyReportFields_ key back into the policy_ key #36170
This makes code more complex than it needs to be (lots of existing data massaging for really no gain)
As such, we should kill and fix this unnecessarily complex code that was recently introduced. This means, at a minimum (I might be missing things):
Moving this data back into the policy_ key
Removing any data massaging from the backend
Have the frontend accept the same data as what's in the database
Where we should not display disabled fields, then let's use the disabled property to hide them. We will need to display them to admins soon enough
No need to worry about sending updates to policy members when the policy changes, that will be done as part of https://github.com/Expensify/Auth/pull/9773, which includes doing this for all current and future policy attributes
I am not aware of any documented problem with storing everything related to a policy in the policy_ key.
Some hypothetical problems to watch out for could be:
Large policy JSON is inefficient to modify in Onyx because we do a deep merge (maybe some copying still happens in some places as well).
Optimizations exist to deep compare to see if we should update subscribers. Larger the JSON the slower these comparisons would be.
Subscribing to a subset of data should result in faster updates than subscribing to a large JSON object. Even with the use of a selector. I think it would still be faster.
That's all I have to say on it though. I have not instrumented any of that and it's all just theoretical. This proposal looks fine.
How large? Tags is the most bloating data and it's already in its own key (and for now we'll leave it there)
I haven't instrumented anything so I can't answer that question.
Can you expand on "we do a deep merge"? Where and why?
There is a memory cache layer. Before we save things to the Onyx dbs we merge them into the existing objects in the cache. The smaller those objects are the faster they would be to merge (hypothetically). I am not aware that we've hit any kind of limit there yet - but I do know that it was slow enough in the past that we optimized it to make it faster. We could have someone instrument to see at what point the merges get slow - maybe it's a lot or not.
changed the title [-][Report Fields] [Onyx] Move `policyReportFields_` key back into the `policy_` key[/-][+][HOLD for payment 2024-04-03] [Report Fields] [Onyx] Move `policyReportFields_` key back into the `policy_` key[/+]on Mar 27, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.56-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
melvin-bot commentedon Feb 8, 2024
Job added to Upwork: https://www.upwork.com/jobs/~010e62ab2c798627fa
melvin-bot commentedon Feb 8, 2024
Triggered auto assignment to Contributor Plus for review of internal employee PR - @mollfpr (
Internal)thienlnam commentedon Feb 8, 2024
Sibtain will be handling the FE changes and I will take the BE changes
marcaaron commentedon Feb 8, 2024
I am not aware of any documented problem with storing everything related to a policy in the
policy_key.Some hypothetical problems to watch out for could be:
That's all I have to say on it though. I have not instrumented any of that and it's all just theoretical. This proposal looks fine.
flodnv commentedon Feb 9, 2024
How large? Tags is the most bloating data and it's already in its own key (and for now we'll leave it there)
Can you expand on "we do a deep merge"? Where and why?
Thanks for having a look and commenting 🙇
marcaaron commentedon Feb 10, 2024
I haven't instrumented anything so I can't answer that question.
There is a memory cache layer. Before we save things to the Onyx dbs we merge them into the existing objects in the cache. The smaller those objects are the faster they would be to merge (hypothetically). I am not aware that we've hit any kind of limit there yet - but I do know that it was slow enough in the past that we optimized it to make it faster. We could have someone instrument to see at what point the merges get slow - maybe it's a lot or not.
47 remaining items
[-][Report Fields] [Onyx] Move `policyReportFields_` key back into the `policy_` key[/-][+][HOLD for payment 2024-04-03] [Report Fields] [Onyx] Move `policyReportFields_` key back into the `policy_` key[/+]melvin-bot commentedon Mar 27, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 27, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.56-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-04-03. 🎊
For reference, here are some details about the assignees on this issue:
JmillsExpensify commentedon Apr 3, 2024
Payment summary:
@jjcoffee Do we need any regression tests for this issue?
JmillsExpensify commentedon Apr 3, 2024
Upwork offer sent to C+
jjcoffee commentedon Apr 3, 2024
@JmillsExpensify Accepted, thanks! There should already be regression tests that cover the report fields functionality, so I think we're good here.
JmillsExpensify commentedon Apr 3, 2024
Awesome! Contract paid, so closing this issue.
laurenreidexpensify commentedon May 3, 2024
Payment summary:
JmillsExpensify commentedon May 3, 2024
$500 approved for @allroundexperts