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

Connector validation #4016

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Connector validation #4016

merged 1 commit into from
Feb 19, 2025

Conversation

pablonyx
Copy link
Contributor

@pablonyx pablonyx commented Feb 16, 2025

Description

Adds connector validation for ccpair creation / credential swapping.

New enum for ccpair status: invalid- marks ccpairs which have an invalid configuaiton

Screen.Recording.2025-02-16.at.5.58.02.PM.mov

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Copy link

vercel bot commented Feb 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 6:49pm

error_msg = str(e)
queue.put(error_msg) # Send the exception to the parent process

sys.exit(256) # use 256 to indicate a connector validation error
Copy link
Contributor

Choose a reason for hiding this comment

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

this ties the job client to connectors ... is there a way to separate this? Also the 256 is an issue as mentioned earlier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to be more in line with what we'd expect here!

@@ -283,6 +287,7 @@ function Main({ ccPairId }: { ccPairId: number }) {
status={ccPair.last_index_attempt_status || "not_started"}
disabled={ccPair.status === ConnectorCredentialPairStatus.PAUSED}
isDeleting={isDeleting}
isInvalid={ccPair.status === ConnectorCredentialPairStatus.INVALID}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should isDeleting and isInvalid be part of a single enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Think this is fair generally- lots of re-use across the board

: isDisabled
? "Connector must be re-enabled before indexing"
: undefined
isInvalid
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we like this pattern? I find it hard to read.

@pablonyx pablonyx force-pushed the connector_validation branch from 907a0d3 to 8ea54e1 Compare February 19, 2025 18:44
@pablonyx pablonyx self-assigned this Feb 19, 2025
@pablonyx pablonyx disabled auto-merge February 19, 2025 18:45
@pablonyx pablonyx merged commit 31524a3 into main Feb 19, 2025
7 of 10 checks passed
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.

2 participants