Skip to content

Apicurio 2.0.3 : ccompat/v6 bad version return #2796

Open
@mpumd

Description

@mpumd

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.

curl http://dev.company.com/apis/registry/v2/groups/default/artifacts/com.compagny.movie/versions | jq
{
  "count": 2,
  "versions": [
    {
      "name": "company-movie",
      "description": "super movie avro",
      "createdOn": "2022-09-14T13:29:20+0000",
      "createdBy": "",
      "type": "AVRO",
      "labels": [
        "avro",
        "kafka"
      ],
      "state": "ENABLED",
      "globalId": 56,
      "version": "1",
      "properties": {
        "custom1": "bubu",
        "custom2": "lala"
      },
      "contentId": 16
    },
    {
      "name": "company-movie",
      "description": "super movie avro",
      "createdOn": "2022-09-14T13:36:28+0000",
      "createdBy": "",
      "type": "AVRO",
      "labels": [
        "avro",
        "kafka"
      ],
      "state": "ENABLED",
      "globalId": 57,
      "version": "3",
      "properties": {
        "custom1": "bubu",
        "custom2": "lala"
      },
      "contentId": 20
    }
  ]
}

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.

curl http://dev.company.com/apis/ccompat/v6/subjects/com.compagny.movie/versions/latest | jq 
{                                                                                                                                                                                      
  "id": 20,
  "subject": "com.compagny.movie",
  "version": 2, 
  "schema": "{\"namespace\":\"com.company\",\"type\":\"record\",\"name\":\"Movie\",\"fields\":[{\"name\":\"title2\",\"type\":\"string\"},{\"name\":\"year\",\"type\":\"int\"}]}"
}

Can you explain how this version 2 is calculated ?
Thanks in advance.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions