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

Inconsistent response from endpoint /api/v1/workflows/ depending on whether the workflow is persisted or not #14287

Open
3 of 4 tasks
jacek-jablonski opened this issue Mar 11, 2025 · 0 comments
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)

Comments

@jacek-jablonski
Copy link

jacek-jablonski commented Mar 11, 2025

Pre-requisites

  • I have double-checked my configuration
  • I have tested with the :latest image tag (i.e. quay.io/argoproj/workflow-controller:latest) and can confirm the issue still exists on :latest. If not, I have explained why, in detail, in my description below.
  • I have searched existing issues and could not find a match for this bug
  • I'd like to contribute the fix myself (see contributing guide)

What happened? What did you expect to happen?

After updating Argo Workflows to version v3.5.6 and above, we have noticed, that response is now different then in previous versions, depending on whether the workflow is persisted or not.
Sample API call: https://api.argo-workflows.domain.com/api/v1/workflows/?fields=items.metadata.uid%2Citems.metadata.name%2Citems.metadata.namespace%2Citems.metadata.ownerReferences%2Citems.metadata.labels%2Citems.metadata.annotations%2Citems.spec.arguments%2Citems.spec.workflowTemplateRef%2Citems.spec.templates%2Citems.status.phase%2Citems.status.startedAt%2Citems.status.finishedAt%2Citems.status.estimatedDuration%2Citems.status.progress

For not persisted worfklows, all requested fields are present:

{
    "metadata": {
    "name": "monitoring-bq-export-check-results-light-5m-1741707240",
    "namespace": "monitoring",
    "uid": "c50edfb9-81a0-42fa-95fe-a7043f9ac85a",
    "creationTimestamp": null,
    "labels": {
        "app.kubernetes.io/component": "jobs",
        "app.kubernetes.io/instance": "jobs-monitoring-extras",
        "app.kubernetes.io/managed-by": "Helm",
        "app.kubernetes.io/name": "jobs",
        "helm.sh/chart": "jobs-0.2.79",
        "workflows.argoproj.io/completed": "false",
        "workflows.argoproj.io/cron-workflow": "monitoring-bq-export-check-results-light-5m",
        "workflows.argoproj.io/phase": "Running"
    },
    "annotations": {
        "workflows.argoproj.io/pod-name-format": "v2",
        "workflows.argoproj.io/scheduled-time": "2025-03-11T15:34:00Z"
    },
    "ownerReferences": [
        {
        "apiVersion": "argoproj.io/v1alpha1",
        "kind": "CronWorkflow",
        "name": "monitoring-bq-export-check-results-light-5m",
        "uid": "922b13d7-2367-4a0a-92e2-c28cfbe93082",
        "controller": true,
        "blockOwnerDeletion": true
        }
    ]
    },
    "spec": {
    "arguments": {

    },
    "workflowTemplateRef": {
        "name": "monitoring-bq-export-check-results-light"
    }
    },
    "status": {
    "phase": "Running",
    "startedAt": "2025-03-11T15:34:01Z",
    "finishedAt": null,
    "estimatedDuration": 67,
    "progress": "0/1"
    }
}

However for persisted workflow, here is sample response item:

{
    "metadata": {
    "name": "e2e-tests-critical-e5m-1741691400",
    "namespace": "e2e-tests",
    "uid": "c2d39228-5d6b-41f0-80b2-5411151cf5d7",
    "creationTimestamp": null,
    "labels": {
        "app.kubernetes.io/component": "jobs",
        "app.kubernetes.io/instance": "e2e-monitoring-tests",
        "app.kubernetes.io/managed-by": "Helm",
        "app.kubernetes.io/name": "jobs",
        "helm.sh/chart": "jobs-0.2.78",
        "workflows.argoproj.io/completed": "true",
        "workflows.argoproj.io/cron-workflow": "e2e-tests-critical-e5m",
        "workflows.argoproj.io/phase": "Succeeded",
        "workflows.argoproj.io/workflow-archiving-status": "Persisted"
    },
    "annotations": {
        "workflows.argoproj.io/pod-name-format": "v2",
        "workflows.argoproj.io/scheduled-time": "2025-03-11T11:10:00Z"
    }
    },
    "spec": {
    "arguments": {

    }
    },
    "status": {
    "phase": "Succeeded",
    "startedAt": "2025-03-11T11:10:05Z",
    "finishedAt": "2025-03-11T11:10:35Z",
    "estimatedDuration": 21,
    "progress": "1/1"
    }
}

In persisted workflow ownerReferences and workflowTemplateRef fields are missing.
This behaviour breaks our custom GUI and tools depending on AW's API.
Is it possible to make a response from this endpoint consistent again, like it was in v3.5.5?

Version(s)

v3.5.6-v3.6.5

@jacek-jablonski jacek-jablonski added type/bug type/regression Regression from previous behavior (a specific type of bug) labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

No branches or pull requests

1 participant