What does the macro {{ registration.<> }} support ...
# ask-the-community
n
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
Can you elaborate on what are you trying to do? Where are you using that macro?
n
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
@Nizar Hattab project, domain and version should work when you use the
flytectl register
command.
n
@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
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
How should i pass —version with flytectl?
s
you can use the
--version
flag.
n
Its not supported , is it?
s
it is! for example:
flytectl register files --project flytesnacks --domain development --archive flyte-package.tgz --version v2
n
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
yes, you need to package your code first:
pyflyte --pkgs productionizing.reference_task package -f
e
@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