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

feat: add DROP CONNECTOR functionality #3245

Merged
merged 1 commit into from
Aug 21, 2019

Conversation

agavra
Copy link
Contributor

@agavra agavra commented Aug 21, 2019

Description

Pretty straightforward, DROP CONNECTOR will now delete a connector.

Testing done

  • Unit Tests
  • Local Testing
ksql> CREATE SOURCE CONNECTOR `jdbc-connector2` WITH("connector.class"='io.confluent.connect.jdbc.JdbcSourceConnector',"connection.url"='jdbc:postgresql://localhost:5432/almog.gavra',"mode"='bulk',"topic.prefix"='jdbc2-', "key"='username');

 Message
-----------------------------------
 Created connector jdbc-connector2
-----------------------------------
ksql> DROP CONNECTOR "jdbc-connector2";

 Message
-------------------------------------
 Dropped connector "jdbc-connector2"
-------------------------------------

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 #")

@agavra agavra requested a review from a team as a code owner August 21, 2019 17:17
Copy link
Contributor

@hjafarpour hjafarpour left a comment

Choose a reason for hiding this comment

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

LGTM.
Why do we have different headers for the result of create and drop? For create it's Message and for drop it is Success.

@@ -63,6 +63,7 @@ statement
| INSERT INTO qualifiedName (columns)? VALUES values #insertValues
| DROP STREAM (IF EXISTS)? qualifiedName (DELETE TOPIC)? #dropStream
| DROP TABLE (IF EXISTS)? qualifiedName (DELETE TOPIC)? #dropTable
| DROP CONNECTOR identifier #dropConnector
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also have (IF EXISTS) here?

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 don't feel strongly about this, but using an IF EXISTS will require an extra call to connect. If it doesn't exist you just get a 404 in the response, which is probably okay.

@hjafarpour hjafarpour requested a review from a team August 21, 2019 21:26
@agavra
Copy link
Contributor Author

agavra commented Aug 21, 2019

Why do we have different headers for the result of create and drop? For create it's Message and for drop it is Success.

huh I thought I changed this! Must've not updated the PR. My intention was to have Message

EDIT: I changed this in the code but not in my testing done example 😂

@agavra agavra merged commit 103c958 into confluentinc:master Aug 21, 2019
@agavra agavra deleted the connect_drop branch August 21, 2019 22:52
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