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

Leiqing

02/06/2023, 7:41 AM
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

Bernhard Stadlbauer

02/06/2023, 8:03 AM
Hi @Leiqing! Would you happen to have a minimum example of your task/workflow?
l

Leiqing

02/06/2023, 8:38 AM
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

Bernhard Stadlbauer

02/06/2023, 8:44 AM
We do have tasks with no input, so this might be related to it being a pod task, could that be?
d

Dan Rammer (hamersaw)

02/06/2023, 3:40 PM
@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

Ketan (kumare3)

02/06/2023, 3:58 PM
@Dan Rammer (hamersaw) can you run the task only
It seems the error is in single task execution
d

Dan Rammer (hamersaw)

02/06/2023, 4:05 PM
Oh right, I believe we addressed this here.
@Leiqing do you know what version of flyteadmin you are running?
80 Views