Skip to content

readfile liquid tag not available when passing parameters to remote workflows #305

@buger

Description

@buger

Summary

The readfile liquid tag registered in src/liquid-extensions.ts is not available when parameters are passed to remote workflows (e.g., imported from visor-ee).

Steps to Reproduce

  1. Create a local workflow that imports a remote workflow:
imports:
  - https://raw.githubusercontent.com/probelabs/visor-ee/master/workflows/code-talk.yaml

steps:
  ask-tyk:
    type: workflow
    workflow: code-talk
    args:
      architecture: |
        {% readfile "docs/tyk-architecture.md" %}
  1. Run the workflow

  2. Error occurs:

[error] Error executing check ask-tyk: tag "readfile" not found, line:1, col:1

Expected Behavior

The readfile tag should be available when rendering parameters that are passed to workflows, whether local or remote.

Current Behavior

The readfile tag works for local liquid templates but fails when the rendered content is passed as a parameter to a remote workflow.

Technical Context

  • The readfile tag is registered in src/liquid-extensions.ts via configureLiquidWithExtensions()
  • When parameters are passed to remote workflows, it seems the liquid context used for rendering doesn't have the custom extensions

Use Case

We want to keep architecture documentation in a separate .md file for easier maintenance, then include it in workflow parameters using {% readfile "docs/tyk-architecture.md" %}.

Workaround

Currently have to inline the entire content in the YAML file, which makes it harder to maintain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexternal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions