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

Nizar Hattab

11/28/2023, 2:30 PM
What does the macro {{ registration.<> }} support because I tried with domain, project and it didnt work. was it removed in newer versions ? i am trying to reference a workflow/launchplan with dynamic domain
h

Haytham Abuelfutuh

11/28/2023, 4:52 PM
Can you elaborate on what are you trying to do? Where are you using that macro?
n

Nizar Hattab

11/28/2023, 4:59 PM
I am trying to use reference_launch_plan / workflow but i need to specify the domain and the version in addition to project .. But i want these values to be dynamic based on the domain i register to. Ie: take wf1 from proj.dev.wf1 when registering new_wf in dev .. and stg for sstg
s

Samhita Alla

11/29/2023, 9:30 AM
@Nizar Hattab project, domain and version should work when you use the
flytectl register
command.
n

Nizar Hattab

11/29/2023, 2:19 PM
@Samhita Alla I get this error when trying to register a wf that has reference_launch_plan in it
Copy code
RPC Failed, with Status: StatusCode.INTERNAL
        details: failed to compile workflow for [resource_type:WORKFLOW project:"project_name" domain:"development" name:"flyte.workflows.master_wf.master_wf" version:"6d243d4" ] with err missing entity of type LAUNCH_PLAN with identifier project:"project_name" domain:"{{ registration.domain }}" name:"flyte.workflows.wf1.wf1" version:"{{ registration.version }}"
when I use hardcoded values it worked
I use pyflyte to register , does it need to be flytectl ?
s

Samhita Alla

11/29/2023, 4:07 PM
i believe so.
pyflyte register
isn't working for me either. @Eduardo Apolinario (eapolinario) do we need to add support for macros when using
pyflyte register
?
n

Nizar Hattab

11/29/2023, 4:10 PM
How should i pass —version with flytectl?
s

Samhita Alla

11/29/2023, 4:20 PM
you can use the
--version
flag.
n

Nizar Hattab

11/29/2023, 4:24 PM
Its not supported , is it?
s

Samhita Alla

11/29/2023, 4:35 PM
it is! for example:
flytectl register files --project flytesnacks --domain development --archive flyte-package.tgz --version v2
n

Nizar Hattab

11/29/2023, 5:07 PM
how can I generate flyte-package.tgz ? i understand it should be the serialized objects(wfs, tasks and so on) right ?
so I have to use pyflyte first?
s

Samhita Alla

11/30/2023, 12:29 PM
yes, you need to package your code first:
pyflyte --pkgs productionizing.reference_task package -f
e

Eduardo Apolinario (eapolinario)

12/01/2023, 7:05 PM
@Eduardo Apolinario (eapolinario) do we need to add support for macros when using
pyflyte register
?
@Samhita Alla, seems reasonable, can you open a gh issue?
s

Samhita Alla

12/02/2023, 7:38 AM