Hello! I have a workflow which chains together sev...
# ask-the-community
Hello! I have a workflow which chains together several sub-workflows, including two
and a
workflow. When I try to view this workflow in the Flyte console, everything shows up as unknown (Node ID’s, type, workflow/task name, etc.), and the graph doesn’t render. When I try to get execution details using
flytectl get execution --details
, I get this error:
Copy code
{"json":{},"level":"info","msg":"Retrieved 1 executions","ts":"2022-11-22T10:25:18-08:00"}
Error: unsupported literal scalar type *core.Scalar_Union
{"json":{},"level":"error","msg":"unsupported literal scalar type *core.Scalar_Union","ts":"2022-11-22T10:27:16-08:00"}
Is what I’m trying to do here something that isn’t supported?
Ah also I’m using
here instead of
because I would get this error otherwise:
Copy code
Exception: Reference sub-workflows are currently unsupported. Use reference launch plans instead.
could you paste the signatures of the code here?
that will help us repro/debug
Sure! Just to check, by signature do you mean you’d like me to share the workflow or something more specific you had in mind?
oh sorry missed this
yeah just the workflow and tasks… you can redact most of the code
at least the task code. but for the tasks it’s helpful to have the signature yeah - the input and output types
gotcha can do! let me take a couple minutes to pull things together in a nicely formatted way
Sorry took a bit longer than intended — Is it okay if I DM you the code?
It’s a pretty large web
Edit: I found a much simpler example:
Copy code
def test_workflow():
    lp = reference_launch_plan_1()
    wf = test_workflow()
    reference_launch_plan_1 >> test_workflow
This has the same behavior
And I found this is happening because of the
, when I remove the
the UI populates properly
So perhaps it’s a bug related to
And to further clarify, if I have a workflow that contains only
, most things in the UI render just fine (except for the graph). When I mix `reference_launch_plan`s with `workflow`s, everything shows up as unknown in the UI
yeah always feel free to dm code
so this is unrelated to Unions?
a bit worried about the
unsupported literal scalar type *core.Scalar_Union
I think that bug is separate from the UI bug now after I discovered this, but I believe I did find which subworkflow is causing that error and can have a look there
that might be a red herring actually. @Prafulla Mahindrakar does flytectl not support displaying of unions?
not quite seeing this.
so for reference I’m running the following
Copy code
cookbook/ $ pyflyte -c ~/.flyte/config-sandbox.yaml register --version ref1 core/flyte_basics/hello_world.py
cookbook/ $ pyflyte -c ~/.flyte/config-sandbox.yaml register --version ref2 core/control_flow/sub_with_ref.py
on this https://github.com/flyteorg/flytesnacks/blob/sd-examples/cookbook/core/control_flow/sub_with_ref.py
so the first register command creates the launch plan, that the second register then uses.
message has been deleted
it’s a little inaccurate in that the top one is technically a launch plan not a “Sub-Workflow” but I think this was something that we decided to print instead a while back as a way of simplifying the experience
does flytectl not support displaying of unions?
@Yee I was going through the code and i couldn’t find we added support for these and structured data set. Created a ticket here to track this change https://github.com/flyteorg/flyte/issues/3094
Interesting, that’s exactly the pattern that breaks for me, it makes my console looks like this
I have also found that if instead of doing
, I instead have
, the UI renders correctly again
would you mind trying with the code from that branch and those commands?
just making sure to eliminate all possible variables.
i’m also on the latest version of everything - but i don’t think that matters, i don’t think i’ve seen a bug fix for subworkflow rendering in a bit but could be wrong
Yes I’ll give it a shot! And yeah that’s a fair check, this is what I see in my Flyte console fwiw:
Copy code
UI Version 1.1.6
Admin Version 1.1.28-2-gf10a7f2
Ah yes upgrading to 1.4.0 fixed the problem! Sorry I should have checked this earlier 🙏 Everything looks wonderful now