elastic / elastic/docs-content
Workflows docs: document Liquid template limits (parse/render/memory) and new settings.liquid overrides
- Dominant language
- No language data
- Stars
- 47
- Forks
- 261
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 116
Description
## Summary
Document the LiquidJS rendering limits enforced by the Workflows templating engine, and the new `settings.liquid` overrides being added in the Kibana PR below. Prompted by a real user hitting a cryptic `memory alloc limit exceeded` error while rendering a large `console` report ([Slack thread](https://elastic.slack.com/archives/C08U04SUN49/p1781741804987989?thread_ts=1781593138.096999&cid=C08U04SUN49)).
## Dependency — waiting on dev PR
> [!IMPORTANT]
> **Phase 2 of this issue is blocked until the dev PR lands.**
> - Kibana PR: https://github.com/elastic/kibana/pull/273596 (currently **draft/open**)
> - Security-team issue: https://github.com/elastic/security-team/issues/17793
>
> Confirm the **target release version** before tagging `applies_to` on the new `settings.liquid` content. Also re-confirm the final wording of the human-readable error message, which is defined in the PR.
## Background
The workflow templating engine (LiquidJS) enforces three hard limits per the engine defaults in `kbn-workflows/.../create_workflow_liquid_engine.ts`:
| Limit | Default | Meaning |
|---|---|---|
| `parseLimit` | 150,000 | Max total characters allowed in a single `parse()` call |
| `renderLimit` | 1,000 (ms) | Max time allowed for a single `render()` call |
| `memoryLimit` | 15,000,000 | Max object allocations (array/string ops) per render |
The PR adds an optional `settings.liquid` block to the workflow YAML schema (`LiquidSettingsSchema` in `kbn-workflows/spec/schema.ts`) with optional positive-integer overrides for all three, and wraps raw engine limit errors in a friendly message.
## Phase 1 — ship now (not blocked)
These limits already exist in the current GA engine, so this content can land independently of the PR:
- [ ] **`templating.md`**: Add a short "Template rendering limits" section documenting the three current limits and their defaults, with guidance to reduce template/output size and prefer `data.*` steps for large transformations.
- [ ] **`troubleshooting.md`**: Add an entry under "Liquid and data flow" for hitting a Liquid rendering limit (symptom, cause, resolution = reduce template/output size).
## Phase 2 — after PR #273596 lands (blocked)
- [ ] **`settings.md`**: Add `liquid` to the **Fields** table and the **Which setting do I need?** table.
- [ ] **`settings.md`**: Add a new `## liquid [workflows-settings-liquid]` section with a sub-table of `parseLimit` / `renderLimit` / `memoryLimit` (types, defaults), a YAML example, and a caution that raising limits trades off performance/stability.
- [ ] **`settings.md`**: Add `liquid:` to the **Complete settings example**.
- [ ] **`troubleshooting.md`**: Update the Phase 1 entry to (a) reflect the new human-readable error message and (b) add the `settings.liquid` override as a resolution option.
- [ ] **`templating.md`**: Cross-link the limits section to the new `settings.liquid` overrides.
- [ ] Apply correct `applies_to` tag for the new `settings.liquid` content (version TBD — confirm from PR).
## Affected pages
- `explore-analyze/workflows/templating.md`
- `explore-analyze/workflows/authoring-techniques/settings.md`
- `explore-analyze/workflows/authoring-techniques/troubleshooting.md`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.