kubeflow/pipelines

[backend] ScheduledWorkflow doesn't have any OwnerReferences

Closed this issue · 3 comments

Accordingly to

// assign OwnerReference to scheduledworkflow

a ScheduledWorkflow should have an OwnerReference, but it hasn't.

$ kubectl get swf runoftutorialdsl-controlsdfgnv -oyaml | yq .metadata
creationTimestamp: "2024-10-07T13:29:00Z"
generateName: runoftutorialdsl-controls
generation: 4
labels:
  scheduledworkflows.kubeflow.org/enabled: "true"
  scheduledworkflows.kubeflow.org/status: Enabled
name: runoftutorialdsl-controlsdfgnv
namespace: kubeflow
resourceVersion: "2102"
uid: ed294fef-1339-4a08-bb3d-1d27b054375f

Steps to reproduce

  1. Schedule a pipeline using cron: 0 */10 * * * *
  2. Set to end in one hour
  3. Check the .metadata.OwnerReferences of the created ScheduledWorkflow.
    oc get swf ${SWF_NAME} -oyaml | yq .metadata.ownerReferences

Expected result

It should return at least one OwnerReference. But it returns null.


Impacted by this bug? Give it a 👍.

I'm guessing this means SWF are not being cleaned up when jobs are deleted. Not great.

The code linked here sets an OwnerReference on the Argo Workflow, not on the ScheduledWorkflow. The ScheduledWorkflow does not have an owning resource. Vote to close.

@demarna1 you are correct. Thanks for double checking!