You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, triggering a Dapr workflow (e.g. BackstageTemplateWorkflow) means hand-editing one of the static input-*.json files in workflows/<workflow>/ and invoking ./run.sh. Per-run parameters (VM name, sizing, lab, provisioning profile, …) live as raw JSON without schema, validation, or interactive prompts.
We already have two projects in the org that solve exactly this for Crossplane claims:
claim-machinery-api — backend that owns KCL-based templates, parameter schema (types, enums, defaults, validation), and renders them via OCI.
Reusing this stack for Dapr workflow inputs gives us schema-driven prompts, central template versioning, and a single UX across Crossplane claims and Dapr workflows.
Author a KCL template dapr-backstage-execution (in the templates registry consumed by claim-machinery-api) that renders the stages: [...] JSON shape currently in input-vm-ansible.json.
Replace the trigger task in Taskfile.yaml (currently gum-selects a static input file) with a flow that calls claims render --templates dapr-backstage-execution --dry-run --single-file, writes to /tmp/dapr-trigger-<ts>.json, then pipes into ./run.sh.
Keep input-*.json files as smoke-test fixtures only.
Add a claims dapr-execute (or equivalent) subcommand that, after rendering, POSTs the JSON directly to http://<host>:<port>/v1.0-beta1/workflows/dapr/<WorkflowName>/start?instanceID=... and tails the run status — replacing run.sh entirely.
Same code path then works for Backstage scaffolder steps and CI triggers, not just local dev.
Decide auth model against the Dapr sidecar (today: open on localhost; remote needs token/mTLS).
Out of scope
Migrating other workflows (golden-image-workflow, build-scan-changed, …) — they can adopt the same template once dapr-backstage-execution is proven.
Replacing the Backstage scaffolder calls inside the Dapr workflow itself; this issue is only about how the workflow is triggered.
Context
Today, triggering a Dapr workflow (e.g.
BackstageTemplateWorkflow) means hand-editing one of the staticinput-*.jsonfiles inworkflows/<workflow>/and invoking./run.sh. Per-run parameters (VM name, sizing, lab, provisioning profile, …) live as raw JSON without schema, validation, or interactive prompts.We already have two projects in the org that solve exactly this for Crossplane claims:
Reusing this stack for Dapr workflow inputs gives us schema-driven prompts, central template versioning, and a single UX across Crossplane claims and Dapr workflows.
Proposed architecture
Phase 1 — Spike (additive, no upstream changes)
dapr-backstage-execution(in the templates registry consumed by claim-machinery-api) that renders thestages: [...]JSON shape currently ininput-vm-ansible.json.lab,cloud,vm_name,vm_sizing,vm_template,provisioning_profile, optionalprovisioning_type(stage 2 ansible target —kind-cluster,rke2, …),kind_cluster_name, collection version pins.triggertask inTaskfile.yaml(currently gum-selects a static input file) with a flow that callsclaims render --templates dapr-backstage-execution --dry-run --single-file, writes to/tmp/dapr-trigger-<ts>.json, then pipes into./run.sh.input-*.jsonfiles as smoke-test fixtures only.Phase 2 — Native dapr execute (architecture cleanup)
claims dapr-execute(or equivalent) subcommand that, after rendering, POSTs the JSON directly tohttp://<host>:<port>/v1.0-beta1/workflows/dapr/<WorkflowName>/start?instanceID=...and tails the run status — replacingrun.shentirely.Out of scope
golden-image-workflow,build-scan-changed, …) — they can adopt the same template oncedapr-backstage-executionis proven.Related