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

What is the reason of 409 Failure ? #117

Open
LittleWat opened this issue Nov 2, 2022 · 2 comments
Open

What is the reason of 409 Failure ? #117

LittleWat opened this issue Nov 2, 2022 · 2 comments

Comments

@LittleWat
Copy link
Contributor

LittleWat commented Nov 2, 2022

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!

@eshepelyuk
Copy link

Hello, @LittleWat
But as you can see from yaml output your artifact is ready, it should appear in apicurio registry.
As far as i remember this error is temporarily and eventually is self healing, so you may ignore it.

@LittleWat
Copy link
Contributor Author

@eshepelyuk Thank you for your reply! I see. Yes, the log level is INFO so we may ignore this.
But I would like to solve this error if possible 🤔 I will read the code deeply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants