cuddly-jelly-27016
05/26/2025, 12:10 AMflytectl demo start
pyflyte run --remote wf.py wf
flytectl demo start # restart the demo cluster; it will delete the CRD, and the propeller won't propagate the event to admin.
@task(enable_deck=True)
def t1(a: int) -> int:
sleep(3000)
return a + 1
@workflow
def wf() -> int:
return t1(a=3)
### Expected behavior
The status should transition to aborted
### Additional context to reproduce
We do nothing if CRD doesn't exist when deleting the workflow here.
We should make sure the workflow status is aborted before returning nil
func (e K8sWorkflowExecutor) Abort(ctx context.Context, data interfaces.AbortData) error {
target, err := e.executionCluster.GetTarget(ctx, &executioncluster.ExecutionTargetSpec{
TargetID: data.Cluster,
})
if err != nil {
return errors.NewFlyteAdminErrorf(codes.Internal, err.Error())
}
err = target.FlyteClient.FlyteworkflowV1alpha1().FlyteWorkflows(data.Namespace).Delete(ctx, data.ExecutionID.GetName(), v1.DeleteOptions{
PropagationPolicy: &deletePropagationBackground,
})
// An IsNotFound error indicates the resource is already deleted.
if err != nil && !k8_api_err.IsNotFound(err) {
return errors.NewFlyteAdminErrorf(codes.Internal, "failed to terminate execution: %v with err %v", data.ExecutionID, err)
}
// TODO: make sure the workflow status is aborted here. If it's not, we should update the status.
return nil
}
### Screenshots
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/26/2025, 12:10 AM