Hi team.. I want to bypass the error caused by dup...
# ask-the-community
r
Hi team.. I want to bypass the error caused by duplicate version while registration but want to fail if there are any other errors. Will
continueOnError
suppress real errors?
s
I believe so. @Prafulla Mahindrakar, can you confirm?
p
Copy code
AlreadyExists
is not considered to be an error case in flytectl so continueOnError doesn’t apply to it . yes but you can circumvent the normal errors using that flag
r
This is the problem I’m running into… In my current branch the only thing I did was change a Makefile that impacts whether the continueOnError flag is used or not.. yet the error I see is this:
Copy code
/tmp/register3835595043/24_flyte.workflows.some_file.some_wf_2.pb                                    | Failed  | Error registering file due to rpc error: code =         |
|                                                                                                                   |         | InvalidArgument desc = workflow with different          |
|                                                                                                                   |         | structure already exists with id resource_type:WORKFLOW |
|                                                                                                                   |         | project:"my_project" domain:"development"               |
|                                                                                                                   |         | name:"flyte.workflows.some_file.some_wf"   |
|                                                                                                                   |         | version:"141dbf71ef1e878e5527859768d99d5c538a3274"
The workflow that’s complaining has absolutely no changes
This is seen when I try to register the same version again
p
This says structure is different and hence throws InvalidArgument which is different than AlreadyExists error code which is thrown by admin incase you try to overwrite a version. I guess this should be bucketed still in AlreadyExists . In such a case it expected to change the version you want to register since flyte objects are immutable
r
that’s the weird part.. the structure is not different.. because I changed absolutely nothing other than a Makefile
so I guess I’m curious why a structure change is being detected
Makefile change is the addition and then omission of “continueOnError” flag
no other change has been made
Is there any way to debug this?
p
r
thank you.. that helps
p
So seems byte comparision is showing a diff in workflowDigest which gets computed
Copy code
workflowDigest, err := util.GetWorkflowDigest(ctx, workflowClosure.CompiledWorkflow)
So there should have been some change.
r
Can you go a little deeper into how the “workflow digest” is computed?
Every single task and every other workflow shows “Already exists” and just this workflow fails even though nothing related to any of the workflows was modified
To get around it I created an empty commit and pushed and that fixed it… and now re-registering also works on that same commit
so the workflow digest calculation may have something unexpected going on?
p
We use https://github.com/benlaurie/objecthash which uses sha256 under the hood and has very low probability of collision. When you generated an empty commit that would still create i am assuming a new hash and git which will create a new registration version for flyte if you are passing that one.
276 Views