-
Notifications
You must be signed in to change notification settings - Fork 271
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
Apicurio 2.0.3 : ccompat/v6 bad version return #2796
Comments
Thank you for reporting an issue! Pinging @EricWittmann to respond or triage. |
Oh this is perhaps an interesting bug. I'll have to dig into this to verify what I'm about to tell you is correct, but here's what I think is happening: Registry supports user-defined versions. So when you create or update an artifact, you can (optionally) provide a version. It doesn't have to be a number. It can be whatever string value you want. So instead of If you're using our core API, everything should work nicely. If you use the Confluent compatibility API, it appears there may be a bug. Just checking the code now. For the "Get Versions" endpoint, we are getting back a list of the string versions (the ones optionally provided by the user) and returning those. This is why you see Please note that if you were to use non-numeric versions, you would then no longer be able to use the ccompat API. We would try to convert the version numbers to numeric and it would fail. |
Hi Eric, Thanks for your answer. You confirm what I've investigated :). I think it's not a technical bug because you must be compliant with confluent api. But my problem is more complex and is out of apicurio. Some kafka registry frontends exist and use the ccompat/v6 api like akhq. We have also a redhat amqstream frontend that use registry/v2. I resume your example :
Our workaround consists to force an incremental number inserted in order.
Moreover, latest version is confuse too. For a developer, latest is the bigger number that identify a version. In apicurio it's the last inserted version. Below, 3 is the latest version.
So we must create each versions in ascending order like the second example when you considered error recovery like flushing apicurio db by production crash for example. It's very unyielding. So like you said, we have a choice of no use the label version ? Thanks for your investigations. |
I understand and agree with everything you've said here. We definitely have challenges with versions. Part of the challenge is with I would also add that if you use the core v2 API and simply don't provide a version string (e.g. do not send the |
Hello @EricWittmann During normal operations (today I create a version, and next month another version) this may be livable. But it won't be as soon as you start dealing with unexpected situations:
I should be able to apply CRs in any order. and any suite of actions leading to a certain state from the CR perspective should lead to the same corresponding state in apicurio.
If an action is invalid, then the operation (e.g. delete v1) should be immediately vetoed, or (for create/update) operations the status should be in error. let's summarize this by saying that I would rather by explicit about the version number. |
Yes understood. I don't have a viable solution right now, but we're in agreement about the problem. @andreaTP @carlesarnal @jsenko anything to add to this conversation? |
any news on this? |
Not yet. We think the right way to handle this type of scenario is by adding semver support. However, that has all sorts of complicated consequences. For example, it would be nice to have the Compatibility rule configured differently if the patch version changes vs. if the major version changes. But we could start with just using semver for ordering purposes. Also note that we likely will have some gitops requirements coming soon, which will make us feel your pain and perhaps bump the priority of this. |
I would like to visualize an issue related to the different version types in the integration of Apicurio Registry with a ccompat compliant application, like Kafka-UI. Basically, as soon the schemas in Apicurio use a SemVer approach (or anything with a dot Totally agree with all the comments of this issue, and it is an not easy way to fix it, however, I am thinking about a workaround to avoid breaking the ccompact api. An idea could be check the conversion of the What do you think? References:
|
has this happened @EricWittmann ? |
hello any news on this? thanks. |
We do have some news on this. @jsenko has been working on a gitops approach and there is a PR #3611 opened with it. At the same time, I've been working on improving the compatibility API, mostly addressing problems around enabling/disabling different versions. Hopefully, with those two PRs, the problems mentioned here will be addressed, especially thanks to @jsenko's work. |
Hi guys,
I have a question about the version management inside the apicurio registry. Inside the
"version":
field, we are free to set any alphanumeric character. As you can see below, we have the version 1 and 3 which are a string.We found the same versions by the
ccompat/v6
so consistent.curl http://dev.company.com/apis/ccompat/v6/subjects/com.compagny.movie/versions | jq [ 1, 3 ]
Below, we have a version 2. Where is it from ? With the schema, I recognize the version 3 of above. So how this version is calculate in
ccompat/v6
? Our clients, GUI and other, uses this version 2 which create an ambiguous understanding on schema versionning.Can you explain how this version 2 is calculated ?
Thanks in advance.
The text was updated successfully, but these errors were encountered: