apicurio-registry icon indicating copy to clipboard operation
apicurio-registry copied to clipboard

Confluent Compatibility Issue with subject version

Open mouadk opened this issue 2 years ago • 7 comments

Hello, Looks like Apicurio registry is not fully compatible with Confluent. Confluent API schema registry uses the version -1 as a special id for the latest version. When using the Confluent Schema Registry plugin and a version is not provided, it fallback on -1 and sends a request similar the one below to Apicurio: https://apicurio-service/apis/ccompat/v6/subjects/my-subject-value/versions/-1

The following error is observed:

{
    "message": "Illegal version format: -1",
    "error_code": 0
}

I was expecting that Apicurio handle the -1 similarly.

I have also noticed that there is no Maven plugin allowing to register/test compatibility ect.. of schemas.

Best,

Mouad

mouadk avatar Sep 29 '22 14:09 mouadk

Thank you for reporting an issue!

Pinging @jsenko to respond or triage.

apicurio-bot[bot] avatar Sep 29 '22 14:09 apicurio-bot[bot]

The Confluent API documentation says:

version (versionId) – Version of the schema to be deleted. 
Valid values for versionId are between [1,2^31-1] or the string “latest”, 
which deletes the last registered schema under the specified subject.

This looks like an undocumented Confluent behavior, can you give me a link to some official information about this? Which version of the Confluent plugin shows this behavior? It should use latest instead of -1, so maybe it's a bug on their side.

jsenko avatar Sep 30 '22 11:09 jsenko

I have tried to open this ticket https://github.com/confluentinc/schema-registry/issues/2394 on their side, it explains the behaviour, however I wasn't sure if it was expected on their side and I closed it and opened this one.

What do you think ?

mouadk avatar Sep 30 '22 11:09 mouadk

Wait, but they didn't reply, so how can you be sure it's not an issue on their side? I'd suggest you reopen the issue and depending on the answer, if they provide a reasonable explanation or mark it not-a-bug, we'll add the compatible behavior.

jsenko avatar Sep 30 '22 11:09 jsenko

Ok I have reopened it

mouadk avatar Sep 30 '22 11:09 mouadk

Thank you!

jsenko avatar Sep 30 '22 11:09 jsenko

Hello @jsenko, the ticket was closed as I would have expected, looks like its a normal behavior on their side ( at least internally)

mouadk avatar Sep 30 '22 15:09 mouadk

Sorry, getting back to this, I'll create a fix to match the behavior of Confluent.

jsenko avatar Oct 26 '22 10:10 jsenko

@mouadk Please check if the PR fixes your issue

jsenko avatar Oct 26 '22 11:10 jsenko

Hello @jsenko, I just tested your PR and it looks all good on my side. Thanks

mouadk avatar Oct 26 '22 14:10 mouadk