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

QBO - RBR appears next to Accounting when app is syncing with QBO #47380

Closed
6 tasks done
IuliiaHerets opened this issue Aug 14, 2024 · 10 comments
Closed
6 tasks done

QBO - RBR appears next to Accounting when app is syncing with QBO #47380

IuliiaHerets opened this issue Aug 14, 2024 · 10 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@IuliiaHerets
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.0.20-0
Reproducible in staging?: Y
Reproducible in production?: N
Issue was found when executing this PR: #46671
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Accounting.
  3. Connect to QBO.

Expected Result:

RBR will not appear next to Accounting when app is syncing with QBO.
It should only appear when there is connection error.

Actual Result:

RBR appears next to Accounting when app is syncing with QBO.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6571570_1723598486802.20240814_091907.mp4

View all open jobs on GitHub

@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

Triggered auto assignment to @cristipaval (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Aug 14, 2024

Triggered auto assignment to @stephanieelliott (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 the Daily KSv2 label Aug 14, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Aug 14, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@daledah
Copy link
Contributor

daledah commented Aug 14, 2024

Edited by proposal-police: This proposal was edited at 2024-08-14 08:17:47 UTC.

Proposal

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

RBR appears next to Accounting when app is syncing with QBO.

What is the root cause of that problem?

We're using PolicyUtils.hasSyncError to show RBR. However, we're assuming that isSyncInProgress is always false when calling to getSynchronizationErrorMessage:

return (Object.keys(policy?.connections ?? {}) as ConnectionName[]).some((connection) => !!getSynchronizationErrorMessage(policy, connection, false));

Later cause this check to fail:

const connection = policy?.connections?.[connectionName];
if (isSyncInProgress || connection?.lastSync?.isSuccessful) {
return;
}
return `${syncError} ("${connection?.lastSync?.errorMessage}")`;

Basically, if the sync is in progress, we would skip any error check.

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

Check isSyncInProgress appropriately following:

const isSyncInProgress =
!!connectionSyncProgress?.stageInProgress &&
(connectionSyncProgress.stageInProgress !== CONST.POLICY.CONNECTIONS.SYNC_STAGE_NAME.JOB_DONE || !policy.connections?.[connectionSyncProgress.connectionName]) &&
isValid(lastSyncProgressDate) &&
differenceInMinutes(new Date(), lastSyncProgressDate) < CONST.POLICY.CONNECTIONS.SYNC_STAGE_TIMEOUT_MINUTES;

@cristipaval
Copy link
Contributor

Discussing it here

@hungvu193 and @war-in as the authors of the offending PR will fix it soon.

@cristipaval
Copy link
Contributor

If this won't be fixed before the production deploy, it could be demoted IMO 🤔

@hungvu193
Copy link
Contributor

It's getting late here. I'll raise a PR to fix this one tomorrow morning 😄

@Beamanator Beamanator added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Aug 14, 2024
@Beamanator
Copy link
Contributor

Love it 👍 demoting 👍

@arosiclair
Copy link
Contributor

This also has the same root cause as #44148. Closing this out in favor of that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

7 participants