Skip to content
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

Orphan artifact : change the artifactId create a new artifact without delete the old. #111

Open
mpumd opened this issue Sep 23, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@mpumd
Copy link

mpumd commented Sep 23, 2022

Hi All,

I detected a new issue on the apicurio's operator inside openshift.
Inside a CRD of an apicurio artifact, when I change the value of the artifactId field, the operator create a new artifact inside apicurio registry. This behavior of creation is correct. But the old artefact has not been deleted, and It is no longer managed by the operator. The old artefact become an orphan.

So I have a CRD named kafka-sample-kafka-sample-pet-mpusg-1 which contain its spec like this :

spec:
  modifiedBy: ''
  modifiedOn: '2022-09-23T13:08:36+0000'
  name: kafka-sample-kafka-sample-pet-mpusg
  artifactId: com.company.mpusg.test.Pet
  state: ENABLED
  properties: {}
  contentId: 66
  version: '1'
  content: >-
    {"type":"record","name":"Pet","namespace":"com.company.mpusg.test","fields":[{"name":"name","type":"string"},{"name":"age","type":["int","null"]}]}
  type: AVRO
  description: MPUSG pet test
  globalId: 205
  labels:
    - avro
    - kafka
status:
  artifactId: com.company.mpusg.test.Pet
  globalId: 205
  status: ready
  version: '1'

I see it by registry/v2 rest api :

curl https://myregistry.company.com/apis/registry/v2/groups/default/artifacts | jq '.artifacts[].id'
"com.company.mpusg.test.Pet" 

I change only the value of the artifactId field.

spec:
  modifiedBy: ''
  modifiedOn: '2022-09-23T13:48:17+0000'
  name: kafka-sample-kafka-sample-pet-mpusg
  artifactId: com.company.mpusg.test.Pet.new
  state: ENABLED
  properties: {}
  contentId: 66
  version: '1'
  content: >-
    {"type":"record","name":"Pet","namespace":"com.company.mpusg.test","fields":[{"name":"name","type":"string"},{"name":"age","type":["int","null"]}]}
  type: AVRO
  description: MPUSG pet test
  globalId: 206
  labels:
    - avro
    - kafka
status:
  artifactId: com.company.mpusg.test.Pet.new
  globalId: 206
  status: ready
  version: '1'
curl https://myregistry.company.com/apis/registry/v2/groups/default/artifacts | jq '.artifacts[].id'
"com.company.mpusg.test.Pet" 
"com.company.mpusg.test.Pet.new" 

A new artifact is created with the name "com.company.mpusg.test.Pet.new" but the old is always up. When I push a new schema, the new version is applicate only on "com.company.mpusg.test.Pet.new". From the change on the artifactId, the operator loses control over the old one.

Can you analyze ? Thanks for your investigations.

@EricWittmann EricWittmann added the bug Something isn't working label Sep 23, 2022
@mpumd
Copy link
Author

mpumd commented Oct 19, 2022

Hi @jsenko, @EricWittmann

Any news ?

cc @vsevel

@vsevel
Copy link

vsevel commented Mar 15, 2023

any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants