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

Azure schema registry SDK does not have a way to check if a new schema is compatible #15154

Closed
dhoepelman opened this issue May 6, 2021 · 3 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. feature-request This issue requires a new behavior in the product in order be resolved. Schema Registry

Comments

@dhoepelman
Copy link

dhoepelman commented May 6, 2021

Is your feature request related to a problem? Please describe.

We want to signal in our build pipeline at PR time if a new schema introduced is incompatible with the existing one, according to the rules set in the schema registry.

We encountered 2 limitations: there doesn't seem to be an API method to check if a schema is compatible without actually registering it (this would require additional server support)).

Furthermore, when actually registering the schema the error message is not very clear. Just as with #15130 I'd consider trying to register an incompatible schema a functional user error that warrants it's own handling.

Describe the solution you'd like

A dedicated method like would be ideal for our use-case

isSchemaCompatible(schema: SchemaDescription): Promise<{ compatible: true} | { compatible: false; detail: string }>

For registerSchema, the problem is that there's not straightforward way to check this error condition. A rejected promise with a custom exception feels best to me

export declare class SchemaIncompatibleError extends Error {
    Detail: string // Rest "Detail" field
    // This would ideally be the incompatible schema, but cannot (easily) be gotten from the HTTP request currently
    incompatible: SchemaID  
}

Describe alternatives you've considered

  1. If a isSchemaCompatible method is introduced the need to change registerSchema becomes greatly reduces, as one can always first call isSchemaCompatible before calling registerSchema.

  2. You could change the registerSchema signature to incorporate this functional error, but it doesn't feel right to me as this is an exceptional case for this method

registerSchema(schema: SchemaDescription, options?: RegisterSchemaOptions): Promise<SchemaId | { status: 'incompatible'; error: string }>;
  1. For registerSchema fixing & documenting the error handling for this would be acceptable to me. Currently that would be that the resulting error object matches{ details: { body: { Code: 400, Detail: /^Schema validation failed: .* compatibility test failed.*/ } }
@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 May 6, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 6, 2021
@nguerrera nguerrera self-assigned this May 6, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label May 6, 2021
@nguerrera
Copy link
Contributor

Thanks again for your feedback, @dhoepelman

Adding @hmlam for service perspective.

@nguerrera nguerrera added feature-request This issue requires a new behavior in the product in order be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 6, 2021
@hmlam
Copy link
Member

hmlam commented May 6, 2021

Thanks for the feedback. this requirement is something that we are aware of, and it is in our backlog of design items to go through as we get closer to GA the service.

@ramya-rao-a ramya-rao-a added this to the Backlog milestone May 6, 2021
@ramya-rao-a ramya-rao-a added Client This issue points to a problem in the data-plane of the library. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels May 6, 2021
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this issue Aug 2, 2021
[AKS] Merge dev-containerservice-Microsoft.ContainerService-2021-07-01 to master (Azure#15370)

* Adds base for updating Microsoft.ContainerService from version stable/2021-05-01 to version 2021-07-01

* Updates readme

* Updates API version in new specs and examples

* Modify Swagger to fix the problem of automatically generating ugly names in track 2 (Azure#14758)

* update swagger to fix track 2 autogenerated naming issue

* fix

* update readme for sdk generation

* fix lint error

* Trigger Build

* update readme

* Improve AKS Swagger documentation (Azure#14957)

* Improve AKS Swagger documentation

  - This change has already been merged in master
    for the 2021-05-01 API version.

* Fix up custom words

* aks: replace CloudError with ManagedClusterPodIdentityProvisioningError for AAD pod identity provisioning spec (Azure#15033)

* fix: decouple pod identity provisioning error from cloud error

* drop extra external mark

* fix linting issue

* fix reference

* Dev containerservice microsoft.container service 2021 07 01: add SecurityProfile (Azure#15035)

* Add SecurityProfile to ManagedClusters

* spaces

* Space

* spaces

* json formatting

* move from params to defs

* :)

* just another

* now with npm

* Descriptions update for AKS July API (Azure#15074)

* allow disabling of runcommand (Azure#15092)

* allow disabling of runcommand

* format error

* format with example

* change enable to disable

* Revert "allow disabling of runcommand (Azure#15092)" (Azure#15147)

This reverts commit ec3e241a564d21f5ec914f4aa0b59a96ac7ec0d9.

* [AKS] Add NATGatewayProfile to 2021-07-01 API (Azure#15154)

* [AKS] Add NATGatewayProfile to 2021-07-01 API

* Fix linter errors

Co-authored-by: Kaiqi Zhang <kaiqzhan@microsoft.com>

* Add scaleDownMode to agent pool properties (Azure#15124)

* add scale down mode

* address comments

* fix markdown link

* update proper api version

* Resolve python markdown conflict & fix typo (Azure#15402)

* resolve python conflict & fix typo

* resolve conflict

Co-authored-by: FumingZhang <81607949+FumingZhang@users.noreply.github.com>
Co-authored-by: Matthew Christopher <matthchr@microsoft.com>
Co-authored-by: hbc <bcxxxxxx@gmail.com>
Co-authored-by: Or Parnes <orparnes@gmail.com>
Co-authored-by: Haitao Chen <haitch@users.noreply.github.com>
Co-authored-by: Kaiqi Zhang <kaiqzhan@microsoft.com>
Co-authored-by: Marwan Ahmed <marwanad@microsoft.com>
Co-authored-by: Arthur Ning <57385816+akning-ms@users.noreply.github.com>
@deyaaeldeen deyaaeldeen modified the milestones: Backlog, [2021] October Aug 18, 2021
@deyaaeldeen deyaaeldeen assigned deyaaeldeen and unassigned nguerrera Aug 18, 2021
Copy link

Hi @dhoepelman, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2024
@xirzec xirzec removed this from the Backlog milestone May 7, 2024
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. feature-request This issue requires a new behavior in the product in order be resolved. Schema Registry
Projects
None yet
Development

No branches or pull requests

6 participants