Skip to content

Add bool for permanent delete #1029

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

Merged

Conversation

slominskir
Copy link
Contributor

The SchemaRegistryClient delete subject function doesn't currently allow the boolean permanent flag:

def delete_subject(self, subject_name):
"""
Deletes the specified subject and its associated compatibility level if
registered. It is recommended to use this API only when a topic needs
to be recycled or in development environments.
Args:
subject_name (str): subject name
Returns:
list(int): Versions deleted under this subject
Raises:
SchemaRegistryError: if the request was unsuccessful.
See Also:
`DELETE Subject API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#delete--subjects-(string-%20subject)>`_
""" # noqa: E501
return self._rest_client.delete('subjects/{}'
.format(_urlencode(subject_name)))

Soft vs Hard delete is included in the API docs though:
DELETE REST API docs

@ghost
Copy link

ghost commented Feb 8, 2021

@confluentinc It looks like @slominskir just signed our Contributor License Agreement. 👍

Always at your service,

clabot

@edenhill edenhill added the serdes Avro, JSON, Protobof, Schema-registry label Mar 9, 2021
Copy link
Contributor

@mhowlett mhowlett left a comment

Choose a reason for hiding this comment

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

thanks @slominskir - LGTM

@mhowlett
Copy link
Contributor

mhowlett commented Mar 9, 2021

oh, flake8 is complaining about line 450, a blank line with spaces on it - can you fix that and check the travis logs for any additional issues related to this PR? sorry about that and thanks

@slominskir
Copy link
Contributor Author

slominskir commented Mar 9, 2021

I removed the white space flake8 had flagged, but now flake8 is logging a failure in a file that I never touched:

$ flake8
./src/confluent_kafka/avro/load.py:18:1: F401 'sys' imported but unused
The command "flake8" exited with 1.

Looks like issue is due to this commit merged before I created a patch branch: 67b0052#diff-118623b097e0145cb52700e9c99901e9cf79616a8936a562f42763aa9ad4f4ec

@mhowlett
Copy link
Contributor

mhowlett commented Mar 9, 2021

ok, that was my fault :-), sorry about that. thanks for the additional PR :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
serdes Avro, JSON, Protobof, Schema-registry wait info
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants