question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apicurio registry compatibility with order of register() operations

See original GitHub issue

The current procedure for registering a schema starts by trying to fetch and update the compatibility rules. This works fine with the Confluent registry, but caused an issue in my testing with Apicurio registry.

Understandably this could be considered an issue with the Apicurio API compatibility layer, but generally the order of operations is unusual. If the existing config is not found, a PUT is still attempted to modify a non-existing config.

A simple workaround was to switch the order of operations from:

  1. await this.api.Subject.config(args)
  2. await this.api.Subject.updateConfig(args)
  3. await this.api.Subject.register(args)

To this (2 & 3 switched):

  1. await this.api.Subject.config(args)
  2. await this.api.Subject.register(args)
  3. await this.api.Subject.updateConfig(args)

AFAICT this works as intended with both registry APIs. Does it make sense to make this change, or would it have unintended side effects?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Nevoncommented, Apr 19, 2022

Most likely during the week starting May 2nd.

1reaction
Nevoncommented, Apr 4, 2022

I suppose in Confluent schema registry when doing updateConfig we’re not dependent on the subject existing because we’re not modifying the subject, we’re modifying the config, which is why we’re able to do that before the subject actually exists. In apicurio I suppose they require the subject to exist before being able to modify the configuration for a subject.

Either way, I think it seems like a reasonable change to make.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Registry | Apicurio
The registry can be configured to store data in various back-end storage systems depending on use-case, including Kafka, PostgreSQL, and Infinispan (embedded).
Read more >
Apicurio Registry User Guide - Red Hat Customer Portal
1.4. APICURIO REGISTRY CORE REST API. Compatibility with other schema registry REST APIs. 1.5. APICURIO REGISTRY STORAGE OPTIONS.
Read more >
Releases · Apicurio/apicurio-registry - GitHub
An API/Schema registry - stores APIs and Schemas. Contribute to Apicurio/apicurio-registry development by creating an account on GitHub.
Read more >
Using Kafka Connect with Schema Registry
The AvroConverter , ProtobufConverter , and JsonSchemaConverter automatically register schemas generated by source connectors. Sink Connectors receive schema ...
Read more >
Stream Processing with Apache Spark, Kafka, Avro, and ...
Using a registry to decouple schemas from messages in an event streaming ... Kafka, Avro, and Apicurio Registry on Amazon EMR and Amazon...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found