Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

What is the reason of 409 Failure ? #117

Description

@LittleWat

Hello!

I deployed the standalone operator and applied the following yaml.

kubectl apply --server-side -f greeting-schema.yaml

Here is greeting-schema.yaml

---
apiVersion: artifact.apicur.io/v1alpha1
kind: Artifact
metadata:
  name: greeting-schema
  namespace: default
spec:
  version: "1"
  groupId: kafka-apicurio-sample  # namespace
  artifactId: simple-avro-maven-topic  # topic name
  name: greeting
  description: "Avro record for Greeting entity"
  type: AVRO
  labels:
  - avro
  - kafka
  content: |
    {
      "type": "record",
      "name": "Greeting",
      "fields": [
        {
          "name": "Message",
          "type": "string"
        },
        {
          "name": "Time",
          "type": "long"
        }
      ]
    }

The schema is successfully deployed.
But I found the following 409 Failure in the log:

kubectl logs  deployments/apicurio-registry-kube-sync -f
2022-11-02 01:26:39,412 INFO  [io.jav.ope.pro.EventDispatcher] (EventHandler-artifactcontroller) Kubernetes exception 409 Failure executing: PUT at: https://10.96.0.1/apis/artifact.apicur.io/v1alpha1/namespaces/default/artifacts/greeting-schema. Message: Operation cannot be fulfilled on artifacts.artifact.apicur.io "greeting-schema": the object has been modified; please apply your changes to the latest version and try again. Received status: Status(apiVersion=v1, code=409, details=StatusDetails(causes=[], group=artifact.apicur.io, kind=artifacts, name=greeting-schema, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Operation cannot be fulfilled on artifacts.artifact.apicur.io "greeting-schema": the object has been modified; please apply your changes to the latest version and try again, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Conflict, status=Failure, additionalProperties={}). during event processing, ExecutionScope{events=[CustomResourceEvent{action=MODIFIED, resource=[ name=greeting-schema, kind=Artifact, apiVersion=artifact.apicur.io/v1alpha1 ,resourceVersion=85773, markedForDeletion: false ]}], customResource uid: 15c0dd7e-aec3-4f77-88fe-c0b3bff68548, version: 85773} failed

Why is this happening?

This is the got result.

$ kubectl get artifacts.artifact.apicur.io greeting-schema -o yaml --show-managed-fields

apiVersion: artifact.apicur.io/v1alpha1
kind: Artifact
metadata:
  creationTimestamp: "2022-11-02T01:26:38Z"
  finalizers:
  - artifacts.artifact.apicur.io/finalizer
  generation: 3
  labels:
    apicur.io/artifactId: simple-avro-maven-topic
    apicur.io/groupId: kafka-apicurio-sample
    apicur.io/version: "1"
  managedFields:
  - apiVersion: artifact.apicur.io/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        f:artifactId: {}
        f:content: {}
        f:description: {}
        f:groupId: {}
        f:labels: {}
        f:name: {}
        f:type: {}
        f:version: {}
    manager: kubectl
    operation: Apply
    time: "2022-11-02T01:26:38Z"
  - apiVersion: artifact.apicur.io/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:finalizers:
          .: {}
          v:"artifacts.artifact.apicur.io/finalizer": {}
        f:labels:
          .: {}
          f:apicur.io/artifactId: {}
          f:apicur.io/groupId: {}
          f:apicur.io/version: {}
      f:spec:
        f:contentId: {}
        f:globalId: {}
        f:modifiedBy: {}
        f:modifiedOn: {}
        f:properties: {}
        f:state: {}
    manager: okhttp
    operation: Update
    time: "2022-11-02T01:26:39Z"
  - apiVersion: artifact.apicur.io/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:status:
        .: {}
        f:artifactId: {}
        f:globalId: {}
        f:groupId: {}
        f:status: {}
        f:version: {}
    manager: okhttp
    operation: Update
    subresource: status
    time: "2022-11-02T01:26:39Z"
  name: greeting-schema
  namespace: default
  resourceVersion: "85776"
  uid: 15c0dd7e-aec3-4f77-88fe-c0b3bff68548
spec:
  artifactId: simple-avro-maven-topic
  content: |
    {
      "type": "record",
      "name": "Greeting",
      "fields": [
        {
          "name": "Message",
          "type": "string"
        },
        {
          "name": "Time",
          "type": "long"
        }
      ]
    }
  contentId: 15
  description: Avro record for Greeting entity
  globalId: 16
  groupId: kafka-apicurio-sample
  labels:
  - avro
  - kafka
  modifiedBy: ""
  modifiedOn: 2022-11-02T01:10:39+0000
  name: greeting
  properties: {}
  state: ENABLED
  type: AVRO
  version: "1"
status:
  artifactId: simple-avro-maven-topic
  globalId: 16
  groupId: kafka-apicurio-sample
  status: ready
  version: "1"

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions