<#2252 [BUG] flytectl: Partial errors during regis...
# flyte-github
a
#2252 [BUG] flytectl: Partial errors during register files is considered success Issue created by ariefrahmansyah Describe the bug In the middle of
flytectl register files
, some file registration is failed. These files are in the middle of the queue.
Copy code
$ flytectl register files ...

...
25_pipeline.workflows.workflow.workflow.pipeline_workflow_3.pb            | Success | AlreadyExists
26_pipeline.workflows.workflow.workflow.pipeline_dry_run_workflow_2.pb    | Failed  | Error registering file due to rpc error: code = InvalidArgument desc = workflow with different structure already exists with id resource_type:WORKFLOW...
27_pipeline.workflows.workflow.workflow.pipeline_dry_run_workflow_3.pb    | Success | AlreadyExists
28_pipeline.workflows.workflow.launchplan.pipeline_workflow_schedule_3.pb | Success | AlreadyExists
...
The example snippet above returns a non-0 exit code and no error is displayed. Note that I also didn't use
--continueOnError
flag. Expected behavior I think the bug is due to this looping condition: https://github.com/flyteorg/flytectl/blob/v0.5.7/cmd/register/files.go#L140. The fix depends on how flytectl handles this. Is flytectl: 1. Stop registering files, return non-0 exit code, or 2. Continue registering remaining files, but still return non-0 exit code I prefer option 1 since it's expected behaviour if the user didn't specify
--continueOnError
flag. Additional context to reproduce No response Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte