Hi team, I found that executing tasks with out no ...
# ask-the-community
l
Hi team, I found that executing tasks with out no parameter renders an error in FlyteAdmin:
Copy code
failed to create workflow in propeller json: error calling MarshalJSON for type *v1alpha1.Inputs: Marshal called with nil
Is this expected?
b
Hi @Leiqing! Would you happen to have a minimum example of your task/workflow?
l
Looks like any task that take 0 parameter
Copy code
@task
def test() -> str:
    return ""
Well in my case, it’s a pod task
Copy code
@task(task_config=Pod(...))
def test() -> str:
    return ""
b
We do have tasks with no input, so this might be related to it being a pod task, could that be?
d
@Leiqing this is very unexpected. Can you say more about you're environment? Are you running on sandbox? flytekit version
I just ran
Copy code
@task(
    task_config=Pod(
        pod_spec=V1PodSpec(
            containers=[
                V1Container(
                    name="primary",
                    resources=V1ResourceRequirements(
                        requests={"cpu": ".5", "memory": "500Mi"},
                        limits={"cpu": ".5", "memory": "500Mi"},
                    ),
                )
            ],
        ),
    )
)
def my_empty_pod_task() -> str:
    return "hello world!"

@workflow
def empty_pod_workflow() -> str:
    s = my_empty_pod_task()
    return s
without any issue. If there is a problem with this, it is a very large problem. Also, can I ask what the
Pod
definition is? Perhaps there is something that results in mis-formatted inputs / output values.
k
@Dan Rammer (hamersaw) can you run the task only
It seems the error is in single task execution
d
Oh right, I believe we addressed this here.
@Leiqing do you know what version of flyteadmin you are running?
159 Views