What does the macro {{ registration.<> }} support ...
# flyte-support
i
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?
i
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
t
@important-hamburger-34837 project, domain and version should work when you use the
flytectl register
command.
i
@tall-lock-23197 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 ?
t
i believe so.
pyflyte register
isn't working for me either. @high-accountant-32689 do we need to add support for macros when using
pyflyte register
?
i
How should i pass —version with flytectl?
t
you can use the
--version
flag.
i
Its not supported , is it?
t
it is! for example:
flytectl register files --project flytesnacks --domain development --archive flyte-package.tgz --version v2
i
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?
t
yes, you need to package your code first:
pyflyte --pkgs productionizing.reference_task package -f
h
@high-accountant-32689 do we need to add support for macros when using
pyflyte register
?
@tall-lock-23197, seems reasonable, can you open a gh issue?
t