Troubleshooting
Here are some common problems you may encounter when developing with LittleHorse, and how to get around them.
ALREADY_EXISTS
on TaskDef
If you get an error like the following:
Exception in thread "main" io.grpc.StatusRuntimeException: ALREADY_EXISTS: TaskDef [my-task] already exists and is immutable.
That means that a my-task
TaskDef
was already registered in the LittleHorse Server with different inputs/outputs. For type safety of live WfRun
s and WfSpec
s in production, TaskDef
s are immutable. To get around this in local development, you can just delete the TaskDef
:
lhctl delete taskDef my-task
Nonexistent TaskDef
If you try to register a WfSpec
that uses a TaskDef
that hasn't been registered before, you will get an error like the following:
INVALID_ARGUMENT: Thread entrypoint: Node 1-some-task-TASK: Refers to nonexistent TaskDef some-task
This means that you need to register a TaskDef
named some-task
before you can refer to it in your WfSpec
s. You can do that by following this documentation.