kestra icon indicating copy to clipboard operation
kestra copied to clipboard

Pre-render Pebble in URL (currently gives a bug)

Open janorga opened this issue 4 months ago • 4 comments

Feature description

This a mix about a Feature request and a Bug. Consider a flow where you have a task calling a subflow in a "templated" way like

      - id: call_invoke_migration
        type: io.kestra.plugin.core.flow.Subflow
        namespace: "{{ flow.namespace }}"
        flowId: invoke_migration

Now, if one goes to Topology in an Execution and expands the Subflow, a 404 error is given because the formed URL would be: /ui/flows/edit/{{ flow.namespace }}/invoke_migration/overview

In this way, it would be super nice that when a request is done, first a Pebble rendering is also triggered.

Note that you can even have more complex templating in a subflow call, like: namespace: "{{ (flow.namespace | split('\\.'))[0] }}". Why so complex templating? Because this could be a workaround for working in develop namespace and you want the subflow calls to be relative to the rendered workspace, because you probably want a Sync (push) to Git with a sourceNamespace "develop" but a targetNamespace "production" (so subflow calls (called namespace) are not modified when GitPush flow is executed).

Note that having that 404 error is also currently a bug because we are allowing that templating in namespace but breaking the Topology (and maybe other things that I haven't tested).

janorga avatar Oct 21 '24 12:10 janorga