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

[pulsaradmin] Add GetAllSchemas command #1289

Merged
merged 5 commits into from
Sep 30, 2024

Conversation

calindima
Copy link
Contributor

@calindima calindima commented Sep 24, 2024

Didn't create an issue but I can if that's necessary, otherwise I'll write the details in this PR.

Motivation

Explain here the context, and why you're making that change. What is the problem you're trying to solve.

We actively use pulsarctl which has a dependency on this library. We have a use case where we want to interogate the SchemaRegistry to retrieve a history of schema versions and observe schema evolution for topics with higher retention (e.g. infinite retention, >6mo retention etc.).

Modifications

Describe the modifications you've done.

The PR only contains additions such as:

  • Added GetAllSchemas method to the Schema interface
  • Added the implementation for the GetAllSchemas method
  • Added a model for the Pulsar Admin API response
  • Added a utility method to convert from this model to a list of SchemaInfoWithVersion

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Added an integration test that uploads a schema on a topic and then asserts the length of all schemas is 1

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (yes)
  • The schema: (don't know)
  • The default values of configurations: (no)
  • The wire protocol: (no)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (doc comment)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

Just let me know if there's any documentation I should update - I only added a godoc comment to the new method

@calindima
Copy link
Contributor Author

Thanks for running the workflows @crossoverJie. I fixed the linter error but the failed integration test is not related to anything changed in this PR as far as I can tell.

@crossoverJie
Copy link
Member

Thanks for running the workflows @crossoverJie. I fixed the linter error but the failed integration test is not related to anything changed in this PR as far as I can tell.

Yes, I have approved it. Thank you for your contribution

@calindima
Copy link
Contributor Author

Thanks for the quick feedback. Any idea in which release will this be included?

@nodece nodece merged commit f0518c0 into apache:master Sep 30, 2024
7 checks passed
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.

3 participants