Skip to content

Add flag for subject version permanent delete #1555

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

Conversation

rsolovev
Copy link

The SchemaRegistryClient delete_version() function does not have ?permanent=true functionality mentioned in Schema Registry API reference - https://docs.confluent.io/platform/current/schema-registry/develop/api.html#delete--subjects-(string-%20subject)-versions-(versionId-%20version)

def delete_version(self, subject_name, version):
"""
Deletes a specific version registered to ``subject_name``.
Args:
subject_name (str) Subject name
version (int): Version number
Returns:
int: Version number which was deleted
Raises:
SchemaRegistryError: if the subject or version cannot be found.
See Also:
`Delete Subject Version API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#delete--subjects-(string-%20subject)-versions-(versionId-%20version)>`_
""" # noqa: E501
response = self._rest_client.delete('subjects/{}/versions/{}'.
format(_urlencode(subject_name),
version))
return response

Added flag support similar to delete_subject() implementation and taking into the account this documentation lines:

The default is false. If the flag is not included, a soft delete is performed. You must perform a soft delete first, then the hard delete.

@rsolovev rsolovev requested a review from a team as a code owner April 18, 2023 21:00
@cla-assistant
Copy link

cla-assistant bot commented Aug 15, 2023

CLA assistant check
All committers have signed the CLA.

@rayokota rayokota added the component:schema-registry Any schema registry related isues rather than kafka isolated ones label Jul 13, 2024
@rayokota
Copy link
Member

Subsumed by #1867

@rayokota rayokota closed this Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:schema-registry Any schema registry related isues rather than kafka isolated ones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants