https://flyte.org logo
#ask-the-community
Title
# ask-the-community
r

Rupsha Chaudhuri

08/25/2022, 5:53 AM
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

Samhita Alla

08/25/2022, 7:37 AM
I believe so. @Prafulla Mahindrakar, can you confirm?
p

Prafulla Mahindrakar

08/25/2022, 9:23 AM
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

Rupsha Chaudhuri

08/25/2022, 4:37 PM
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

Prafulla Mahindrakar

08/25/2022, 4:53 PM
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

Rupsha Chaudhuri

08/25/2022, 4:54 PM
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

Prafulla Mahindrakar

08/25/2022, 4:56 PM
r

Rupsha Chaudhuri

08/25/2022, 4:57 PM
thank you.. that helps
p

Prafulla Mahindrakar

08/25/2022, 4:57 PM
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

Rupsha Chaudhuri

08/25/2022, 5:02 PM
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

Prafulla Mahindrakar

08/26/2022, 9:14 AM
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.
160 Views