Skip to content

feat(Integration): Remove/Stop Integration #328

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

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

Conversation

junaid-shirur
Copy link
Contributor

Description

This PR includes:

  • Remove or stop an integration depending on its connection status.
  • Set up a background job to handle integration removal/stopping asynchronously.
  • Clean up all Vespa data upon integration removal/stopping.
  • Remove connectors associated with the integration.

Additionally, this also includes a fix for SyncJobs running when the integration is not connected or still in the process of connecting:

  • Ensures SyncJobs execute only when the integration is in a connected state.

Testing

Tested via oAuth integration

@@ -94,7 +94,11 @@ export const getRelativeTime = (oldTimestamp: number) => {
const MAX_RETRIES = 10

const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))

export const isAbortError = (error: any) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

We won't modify for now, but if the error is specific to a app and entity then we need to ensure that is documented somewhere.
In future we can do this in a mapper way for errors across apps.
No need to change much for now other than document the error app.

@zereraz
Copy link
Contributor

zereraz commented Feb 28, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces the functionality to remove or stop integrations, handle these operations asynchronously, clean up Vespa data, and remove associated connectors. It also fixes an issue where SyncJobs were running when the integration was not in a connected state. The changes include modifications to the frontend to add UI elements for stopping/disconnecting integrations, as well as backend changes to handle the removal/stopping logic and background jobs. Overall, the changes seem well-structured and address the described problem effectively.

Summary of Findings

Merge Readiness

The code appears to be well-structured and addresses the intended functionality. However, due to the complexity and scope of the changes, thorough testing is crucial. I am unable to approve this pull request, and recommend that others review and approve this code before merging.

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.

3 participants