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

fix: fail validation on create connector if connector already exists #9014

Merged
merged 1 commit into from Apr 12, 2022

Conversation

vcrfxia
Copy link
Contributor

@vcrfxia vcrfxia commented Apr 11, 2022

Description

Quick follow-up to #8999 (specifically, this discussion): for CREATE CONNECTOR statements that do not include IF NOT EXISTS in the statement, these statements will fail if a connector with the same name already exists. Currently, this failure happens during ksql's execute phase. Ideally, the failure would occur during ksql's validation phase, in order to fail fast so that no statements (in a multi-statement request) are executed. This PR adds a check for this case during validation accordingly.

A consequence of this PR is that users are now required to have permissions to list existing connectors in order to issue CREATE CONNECTOR statements (even for statements that do not include IF NOT EXISTS). We believe this is inline with the desired security model for ksql, and are OK with this consequence.

Testing done

Unit + integration.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@vcrfxia vcrfxia requested a review from a team as a code owner April 11, 2022 20:33
Copy link
Contributor

@Gerrrr Gerrrr left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this issue!

@vcrfxia vcrfxia merged commit 94a74fa into confluentinc:master Apr 12, 2022
@vcrfxia vcrfxia deleted the create-connector-validation branch April 12, 2022 15:40
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.

None yet

2 participants