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: block DROP...DELETE TOPIC for read-only sources #8063

Merged
merged 2 commits into from
Aug 30, 2021
Merged

Conversation

jzaralim
Copy link
Contributor

Description

Throws an error if a user tries to DROP...DELETE TOPIC for read-only sources.

Testing done

Unit + QTT test

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

@jzaralim jzaralim requested a review from a team as a code owner August 26, 2021 21:15
@jzaralim jzaralim requested review from spena and mjsax August 26, 2021 21:15
@@ -55,6 +55,17 @@
"type": "io.confluent.ksql.util.KsqlException",
"message": "Cannot insert into read-only stream: INPUT"
}
},
{
"name": "rejects DROP ... DELETE TOPIC statements for source streams",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This QTT catches the error, so #7994 is not needed.

@Test
public void shouldFailDeleteTopicForSourceStream() {
// Given:
final DropStream dropStream = new DropStream(SOME_NAME, false, true);
Copy link
Member

Choose a reason for hiding this comment

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

Could you add another one for DropTable?

@jzaralim jzaralim merged commit 88c6192 into master Aug 30, 2021
@jzaralim jzaralim deleted the drop-source branch August 30, 2021 16:27
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