Closed yuwenmemon closed 3 months ago
Triggered auto assignment to @twisterdotcom (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.
I think this is New Feature
, not Bug
right?
Current assignee @twisterdotcom is eligible for the NewFeature assigner, not assigning anyone new.
Yeah that seems like a fair characterization as well.
Job added to Upwork: https://www.upwork.com/jobs/~01c42a63242268a2f0
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External
)
Spinner hasn't stopped even though the sync has finished
This is a new feature
QuickBooksOnline
, create a function like syncConnectionAfterTimeout
that will update stageInProgress
to jobDone
function syncConnectionAfterTimeout(policyID: string) {
Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY_CONNECTION_SYNC_PROGRESS}${policyID}`, {
stageInProgress: CONST.POLICY.CONNECTIONS.SYNC_STAGE_NAME.JOB_DONE,
connectionName: CONST.POLICY.CONNECTIONS.NAME.QBO,
})
}
PolicyAccountingPage
, we will create a useEffect
that will be triggered when connectionSyncProgress?.stageInProgress
is changed and in this we will have a setTimeout 20 minutes to update connectionSyncProgress?.stageInProgress
to jobDone
so if a sync is started and no jobDone
sync update is receiveduseEffect(() => {
if (!connectionSyncProgress?.stageInProgress || connectionSyncProgress?.stageInProgress === CONST.POLICY.CONNECTIONS.SYNC_STAGE_NAME.JOB_DONE) {
return;
}
spinnerTimeoutRef.current = setTimeout(() => {
syncConnectionAfterTimeout(policy.id);
}, 20*60*1000);
return () => {
if (!spinnerTimeoutRef.current) {
return;
}
clearTimeout(spinnerTimeoutRef.current)
}
}, [connectionSyncProgress?.stageInProgress])
We can create a state to control whenever we should show spinner and then update it in the setTimeout
of point 2
@yuwenmemon for this, instead of adding a setTimeout
in the front end, I think it can be more reliably implemented like:
What do you think?
Does that solve the issue with missing the final notification though? Let's say you close your laptop while a sync is running, and so you never effectively receive the jobDone
notification. When you get back online, you still have the wrong stageInProgress
right?
When you get back online, you still have the wrong stageInProgress right?
yes, it would be still in Onyx, but ignored because it is older than 20 minutes
@aldo-expensify Yeah good idea, that should make things a lot simpler and reliable. In this case we'll need to take this internal.
Current assignee @ahmedGaber93 is eligible for the Internal assigner, not assigning anyone new.
Ah ok I originally misunderstood your comment, I thought you wanted to ignore new progress data received from IS if the previous one was older than 20 minutes. Makes more sense now 👍
Removed the /app job and automation hopefully.
Ah crap, wait I see @ahmedGaber93 reviewed https://github.com/Expensify/App/pull/42498. Damn, thought that was an internal PR. Okay, will pay that out when it's due.
Upwork job price has been updated to $250
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.81-11 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-06-18. :confetti_ball:
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.82-4 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-06-20. :confetti_ball:
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Payment Summary:
NewFeature, not sure we need a regression test right?
@twisterdotcom offer accepted, please please complete the payment when you are available. Thanks!
Part of the #Wave-Control NetSuite project
Main issue: https://github.com/Expensify/Expensify/issues/377671 Doc section: https://docs.google.com/document/d/1WubNv_VAv78IxG4FKsi9aS0pWESfWvUYbqBAAy5b4bc/edit#heading=h.tb9yro1dmj3r Project: https://github.com/orgs/Expensify/projects/130
Feature Description
One issue with the Pusher ProgressManager updates for syncs that come from the IS to NewDot is that they are sometimes unreliable. If the
jobDone
sync update is not received by the client, then the sync spinner will hang forever, even though the sync has finished:https://github.com/Expensify/App/assets/4741899/1360d0e9-cab0-49b6-a302-24a88f477e03
To fix this, let's have the spinner timeout to stop 20 min after a sync is started and no
jobDone
sync update is received. We landed one 20 minutes because, in recent measurements, our longest NetSuite jobs take around 14 minutes.Manual Test Steps
Automated Tests
N/A
cc @aldo-expensify @francoisl @lakchote @marcaaron @tgolen
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @twisterdotcom