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

Argo Workflows: CRDs do not preserve unknown fields anymore #3129

Open
chrko opened this issue Jan 20, 2025 · 1 comment
Open

Argo Workflows: CRDs do not preserve unknown fields anymore #3129

chrko opened this issue Jan 20, 2025 · 1 comment
Labels
argo-workflows awaiting-upstream Is waiting for a change upstream to be completed before it can be merged. bug Something isn't working

Comments

@chrko
Copy link

chrko commented Jan 20, 2025

Describe the bug

The update of argo workflows here to v3.6.0 (#3037) also updated the CRDs. Unfortunately this causes issues, e.g. for values in the wfeb.spec.submit.metadata section (

). Previous to the update no validation has been performed ( )

"Upstream" this has been fixed a few days ago by adding the missing fields in the CRDs: argoproj/argo-workflows#14044

Instead of awaiting the next release, I'd like to propose to only update the CRDs to the fixed versions. In case noone objects, I'll prepare a PR tomorrow (CET).

Related helm chart

argo-workflows

Helm chart version

0.45.x

To Reproduce

Apply the following manifest:

apiVersion: argoproj.io/v1alpha1
kind: WorkflowEventBinding
metadata:
  name: pipeline-svc-workflow-webhook-server-change
spec:
  event:
    selector: not payload.deleted
  submit:
    arguments:
      parameters:
        - name: name
          valueFrom:
            event: payload.repository.name
        - name: url
          valueFrom:
            event: payload.repository.ssh_url
        - name: ref
          valueFrom:
            event: payload.ref
        - name: refName
          valueFrom:
            event: payload.ref | split("/") | last()
        - name: eventType
          valueFrom:
            event: (payload.ref|split("/"))[1]
        - name: checkoutSha
          valueFrom:
            event: payload.after
    metadata:
      labels:
        app.ci.project: payload.repository.name
        app.ci.ref: payload.ref | split("/") | last()
        app.ci.sha: payload.after
      name: >-
        "ci-" + payload.repository.name + "-" + (payload.ref | split("/") |
        last()) + "-" + (now().Unix() | string())
    workflowTemplateRef:
      name: pipeline-svc-workflow-ci

Let k8s complain:

The request is invalid: patch: Invalid value: […]: strict decoding error: unknown field "spec.submit.metadata.labels", unknown field "spec.submit.metadata.name"

Expected behavior

WorkflowEventBinding is accepted by k8s api.

Screenshots

No response

Additional context

No response

@chrko chrko added the bug Something isn't working label Jan 20, 2025
@yu-croco yu-croco added awaiting-upstream Is waiting for a change upstream to be completed before it can be merged. argo-workflows labels Jan 20, 2025
@yu-croco
Copy link
Collaborator

Hi @chrko , thank you for opening the issue.

"Upstream" this has been fixed a few days ago by adding the missing fields in the CRDs: argoproj/argo-workflows#14044

Instead of awaiting the next release, I'd like to propose to only update the CRDs to the fixed versions. In case noone objects, I'll prepare a PR tomorrow (CET).

Our policy is to follow upstream's version. Once upstream releases the fixed code with version tag, we will follow it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argo-workflows awaiting-upstream Is waiting for a change upstream to be completed before it can be merged. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants