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

Provide a function for fetching schema from Schema Registry using group name, schema name and schema version. #25072

Closed
harshdeep78singh opened this issue Jul 5, 2022 · 6 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Schema Registry
Milestone

Comments

@harshdeep78singh
Copy link

Currently, I am fetching the schema from the Schema Registry using the following endpoint

/$schemaGroups/{groupName}/schemas/{schemaName}/versions/{version}

There is no function provided in the azure.schemaregistry.SchemaRegistryClient class for pulling the schema from Event Hub Schema Registry using group name, schema name, and version.

Can we have a function for the same?

Also, let me know if you are open to a PR?

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 5, 2022
@azure-sdk azure-sdk added Mgmt This issue is related to a management-plane library. needs-team-triage Workflow: This issue needs the team to triage. Schema Registry labels Jul 5, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 5, 2022
@mccoyp
Copy link
Member

mccoyp commented Jul 5, 2022

Hi @harshdeep78singh, thank you for opening an issue! I'll tag the appropriate folks so we can answer your question about the potential availability of this API.

As for opening a pull request, we're always happy to accept PRs 🙂 For something like adding a client method there will need to be some design discussion, but opening a PR could kickstart that conversation! I'd recommend waiting just a bit before doing any work so that someone who works with the service can provide some input in this case.

@mccoyp mccoyp added Client This issue points to a problem in the data-plane of the library. and removed Mgmt This issue is related to a management-plane library. needs-team-triage Workflow: This issue needs the team to triage. labels Jul 5, 2022
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jul 5, 2022
@swathipil
Copy link
Member

Hi @harshdeep78singh - Thanks for bringing this to our attention! I have discussed this with the team and we will be adding this functionality asap. I saw that you created a PR and took a look.

Unfortunately, we will not be able to merge this, because the changes you made were to our "generated" code. This code is automatically generated from our internal "swagger" file that describes operations that we allow. So, ultimately, the changes that you made will actually be added upon re-generation after we update our swagger file to match. Really appreciate your efforts here, however.

We are currently making changes to the swagger file and will be having API design discussions after that. I'll keep you updated as we continue to make progress. Thanks again!

@lmazuel lmazuel added this to the 2022-10 milestone Sep 6, 2022
ghost pushed a commit that referenced this issue Sep 14, 2022
Service already supports getting schema by version and this operation has been added to the swagger. This PR regenerates from that swagger and adds support for this feature. Specifically:
- Adding the `get_schema_by_version` methods on the sync and async clients.
- Adding `version` ivar to the `SchemaProperties` model.

TODO:
- [x] add tests
- [x] update README, samples README, and changelog

addressing: #25072
fixes: #26180
@swathipil
Copy link
Member

swathipil commented Sep 14, 2022

Hi @harshdeep78singh - Appreciate your patience here! I just merged the feature,(sample [here]), and it'll be out in our next release. I'll update this issue as soon as it's out.

In the meantime, if you're interested, you can manually build and install the wheel:

  1. azure-sdk-for-python/sdk/schemaregistry/azure-schemaregistry> python setup.py bdist_wheel -d [dest_folder]
  2. [dest_folder]> pip install azure_schemaregistry-1.2.0-py3-none-any.whl

Thanks!

@harshdeep78singh
Copy link
Author

@swathipil thank you for the update

mccoyp pushed a commit to mccoyp/azure-sdk-for-python that referenced this issue Sep 22, 2022
Service already supports getting schema by version and this operation has been added to the swagger. This PR regenerates from that swagger and adds support for this feature. Specifically:
- Adding the `get_schema_by_version` methods on the sync and async clients.
- Adding `version` ivar to the `SchemaProperties` model.

TODO:
- [x] add tests
- [x] update README, samples README, and changelog

addressing: Azure#25072
fixes: Azure#26180
ghost pushed a commit that referenced this issue Sep 28, 2022
OOB discussion with Johan:
* Remove `get_schema_by_version` method from sync and async SchemaRegistryClient
* Add `get_schema` overload, which takes `group_name`, `name`, and `version` as keyword args.

Addressing: #25072
Follow up from: #26055
@swathipil
Copy link
Member

swathipil commented Sep 29, 2022

Hey @harshdeep78singh! After a review from our architects, the API to get schema by version has been updated. Rather than a separate get_schema_by_version method, the get_schema method now takes group_name, name, and version as keyword arguments: get_schema(group_name=group_name, name=name, version=version). The updated sample is [here)].

As mentioned in a previous comment, you can build the wheel for this package manually. I will also update this issue after this feature has been released. Thanks!

@swathipil
Copy link
Member

azure-schemaregistry 1.2.0 has been released: https://pypi.org/project/azure-schemaregistry/1.2.0

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Schema Registry
Projects
None yet
Development

No branches or pull requests

5 participants