Hi all! I am facing issues with registering/runnin...
# ask-the-community
n
Hi all! I am facing issues with registering/running workflows on a remote cluster, getting this error:
Copy code
RPC Failed, with Status: StatusCode.INVALID_ARGUMENT
        details: task with different structure already exists with id resource_type:TASK project:"project_name" domain:"staging" name:"some_task_name" version:"Eg1iLWFry-AOPcFmT5AdYQ=="
One suggested solution is to archive the existing tasks. but that didn't solve the issue. I tried deleting the workflow & tasks, but
flytectl delete
doesn't delete tasks or workflows (is this intentional ?). how to properly delete registered tasks completely (no archive)? this is critical I believe CC: @L godlike @Ariel Kaspit
l
Currently, I am not really familiar with
flytectl delete
However, I know how to trace the code. You can go to
flytectl
and search for the
delete
keyword to check if it is implemented or not. It will probably communicate with
flyteadmin
, and
flyteadmin
will delete the workflows & tasks.
s
We don't provide a delete API; you can only archive your tasks/workflows. We don't want you to accidentally delete the flyte entities, and hence we haven't made the API available. To resolve the error you're seeing, you'll need to modify your code or update the version if you're registering but not fast-registering.
n
thank you
what happens if I delete the task directly from database ?
s
You can but that isn't guaranteed to succeed. You'll have to do that at your own risk.
k
Please do not alter the db
Simply use a different version
n
I believe it's necessary to have delete api. a user cant just keep archiving and creating differently-named tasks and launch plans to avoid these errors. I changed the name of the task to fix the error, now I have a different error :
Copy code
details: launch plan with different structure already exists with id resource_type:LAUNCH_PLAN
this is a bug.
s
@Nizar Hattab, you don't need to change the name of your task every time; you can just update the version. If you're using
pyflyte run
or
pyflyte register
, you don't need to specify a version as Flyte automatically computes one.
n
In pyflyte run there is no —version option
When i try to do: Pyflyte run .. the previous error shows up .. meaning that the calculated id is the same as older/already existing one
s
Have you modified the code when re-registering?
n
Yes
s
In pyflyte run there is no —version option
Yes.
pyflyte run
fast registers, hence there's no version.
Yes
If you've, then the version must be updated.
You can try
pyflyte register --non-fast --version <your-version>
n
But isnt it supposed to be automatically assigned ?
In run, i can pass —envs while in register its not possible
s
It should. I'm not sure what's happening in your case.
n
So i need to use run for development at least just to test things
s
We're adding support for envs in `pyflyte register`: https://github.com/flyteorg/flyte/issues/4092
So i need to use run for development at least just to test things
Got it. Can you share the stack trace? Can you also update the code once again and share me the stack trace?
n
Just to be accurate, what code do I have to change ? Workflow file?
Lets say i have my workflow ready and tested, But the logic is in another module.. i updated the used image .. workflow and task definitions are the same . This is my case.. i dont need to update the tasks or workflow
Will send the st soon