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

Validate connection id before sync #20107

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

terencecho
Copy link
Contributor

@terencecho terencecho commented Dec 5, 2022

What

Validate the connection id before attempting to start a sync in temporal. An invalid connection id may be submitted if the api is hit directly.

Testing

Hit the config api on a locally running instance of airbyte with an invalid connection id and got the expected 404 Not Found error.

{
    "message": "Could not find configuration for STANDARD_SYNC: 7639d785-c571-4dc8-b6be-5cac5af56c49.",
    "exceptionClassName": "io.airbyte.server.errors.IdNotFoundKnownException",
    "exceptionStack": [
        "io.airbyte.server.errors.IdNotFoundKnownException: Could not find configuration for STANDARD_SYNC: 7639d785-c571-4dc8-b6be-5cac5af56c49.",
 ...

When trying to an invalid uuid we get a 422 Unprocessable Entity error.

{
    "message": "Invalid json input. Cannot deserialize value of type `java.util.UUID` from String \"7639d785-c571-4dc8-b6be-5cac5af56c\": UUID has to be represented by standard 36-char representation\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 2, column: 21] (through reference chain: io.airbyte.api.model.generated.ConnectionIdRequestBody[\"connectionId\"]) Cannot deserialize value of type `java.util.UUID` from String \"7639d785-c571-4dc8-b6be-5cac5af56c\": UUID has to be represented by standard 36-char representation",
    "exceptionClassName": "com.fasterxml.jackson.databind.exc.InvalidFormatException",
    "exceptionStack": [
        "com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.UUID` from String \"7639d785-c571-4dc8-b6be-5cac5af56c\": UUID has to be represented by standard 36-char representation",
...

@octavia-squidington-iv octavia-squidington-iv added area/platform issues related to the platform area/server labels Dec 5, 2022
@terencecho terencecho temporarily deployed to more-secrets December 5, 2022 23:28 Inactive
@terencecho terencecho temporarily deployed to more-secrets December 5, 2022 23:28 Inactive
@terencecho terencecho marked this pull request as ready for review December 6, 2022 00:03
@terencecho terencecho temporarily deployed to more-secrets December 6, 2022 01:31 Inactive
@terencecho terencecho temporarily deployed to more-secrets December 6, 2022 01:31 Inactive
@terencecho terencecho merged commit 0e62836 into master Dec 6, 2022
@terencecho terencecho deleted the tcho/check-connection-id-before-sync branch December 6, 2022 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants