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

Arc 1192 update backfilling status #2482

Open
wants to merge 63 commits into
base: main
Choose a base branch
from

Conversation

kamaksheeAtl
Copy link
Contributor

@kamaksheeAtl kamaksheeAtl commented Oct 5, 2023

What's in this PR?
refresh the GH config page to see updated backfilling status:
attempt to resolve https://softwareteams.atlassian.net/browse/ARC-1192
solution to show the progress of backfill status on current backfill status page.

Handled following scenarios:

  1. connecting org to GH4J in cloud and enterprise scenario
  2. requesting backfill from a specific date
  3. showing "PERMISSIONS_ERROR" or "CONNECTION_ERROR" sync warning and modals

Demo has been divided into 2 videos:

  1. org repo backfill without sync error for env ddev
    https://www.loom.com/share/49595fe5e9554e3499e5849215fdc677
  2. org repo backfill with sync error for local env
    https://www.loom.com/share/daf6b28b32ad460cb62b3058d1aa63ca

Why
To make the better UX for the backfill status page

Added feature flags
enable-backfilling-status-polling

Affected issues
(https://softwareteams.atlassian.net/browse/ARC-1192)

How has this been tested?
Tested this locally and on ddev for cloud and enterprise scenarios
added unit test cases to cover more than 90% for the api route
made it FF dependent and checked it with FF on and off

@kamaksheeAtl kamaksheeAtl requested a review from a team as a code owner October 5, 2023 01:00
(backFill: SubscriptionBackfillState): boolean => backFill?.isSyncComplete
);

const getBackfillStatus = async (subscriptionsById): Promise<BackFillType> => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created a new PR as i made loads of changes in this file to keep this backfill status polling insync with the way we are providing data to jira-configuration-table.hbs via getInstallation

);

if (!subscriptions || subscriptions.length === 0) {
req.log.error("Missing Subscription");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have an enum set up for this in error.ts. Just import MISSING_SUBSCRIPTION

} catch (error) {
req.log.error(
{ error },
"Failed to poll repo backfill status for provided subscription ID"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: pull this out into a const instead of repeating the same string.

Copy link
Contributor

@gxueatlassian gxueatlassian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, code looks good. Just quite a bit of complexity in the .js file, and this is not cover in our unit test / e2e test. Also I'd like to push towards using spa/react for the backfill page, then the update of status will be just a useEffect, should be much easier.

Let me know if you object this, happy to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants