apicurio-registry
apicurio-registry copied to clipboard
Confluent Compatibility Issue with subject version
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
Thank you for reporting an issue!
Pinging @jsenko to respond or triage.
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.
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 ?
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.
Ok I have reopened it
Thank you!
Hello @jsenko, the ticket was closed as I would have expected, looks like its a normal behavior on their side ( at least internally)
Sorry, getting back to this, I'll create a fix to match the behavior of Confluent.
@mouadk Please check if the PR fixes your issue
Hello @jsenko, I just tested your PR and it looks all good on my side. Thanks