Skip to content

DataFlowFlexTemplateJob: finalizer fails to delete k8s object if job has been manually canceled #5587

@jeffb4

Description

@jeffb4

Checklist

Bug Description

If a DataflowFlexTemplateJob controlled by KCC is manually canceled, and then the k8s object is deleted, the deletion will fail because the finalizer is unable to cancel the DF job it presumes to exist, that is in state CANCELLED. It will never recover from this state, and the finalizer will need to be removed from the k8s object.

The KCC finalizer should, if DF job cancellation fails and the expected DF job is in state cancelled, allow the k8s object deletion to continue.

Additional Diagnostic Information

Reproduction:

Create a DataflowFlexTemplateJob with KCC
Cancel the job manually from the GCP UI
Quickly delete the KCC object from k8s

Kubernetes Cluster Version

v1.33.5-gke.1162000

Config Connector Version

1.137.0

Config Connector Mode

cluster mode

Log Output

No response

Steps to reproduce the issue

Reproduction:

Create a DataflowFlexTemplateJob with KCC
Cancel the job manually from the GCP UI
Quickly delete the KCC object from k8s

YAML snippets

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions