Skip to content

[One Workflow] Update liquidjs to version 10.26.0 and add sha256 and hmac_sha256 filters (#269989)#271967

Merged
VladimirFilonov merged 1 commit into
elastic:9.4from
VladimirFilonov:backport/9.4/pr-269989
May 30, 2026
Merged

[One Workflow] Update liquidjs to version 10.26.0 and add sha256 and hmac_sha256 filters (#269989)#271967
VladimirFilonov merged 1 commit into
elastic:9.4from
VladimirFilonov:backport/9.4/pr-269989

Conversation

@VladimirFilonov
Copy link
Copy Markdown
Contributor

Summary

Adopts Shopify-compatible sha256 and hmac_sha256 Liquid filters for Workflows by upgrading liquidjs to
10.26.0
(harttle/liquidjs#889). Filter behavior comes from liquidjs core—no custom server-side implementations.

  • Execution (server): Built-in filters work via createWorkflowLiquidEngine() with existing renderSync / evalValueSync (Node crypto).
  • Editor autocomplete: Added sha256 and hmac_sha256 entries with Shopify reference examples.
  • Hover preview (browser): Switched evaluateExpression to async evalValue so crypto filters resolve correctly in the browser bundle (Web Crypto is async-only). Hover only shows evaluated filter output when viewing an execution on the Executions tab and hovering on the filter segment inside {{ }}.

Changes

Area Change
package.json / yarn.lock liquidjs 10.25.710.26.0
liquid_parse_cache.test.ts Parse/validation tests for built-in crypto filters
evaluate_expression.ts evalValueSyncawait evalValue for browser crypto
unified_hover_provider.ts await evaluateExpression(...)

Not changed: templating_engine.ts, liquid_parse_cache.ts — no registerFilter stubs needed for built-in filters.

Examples:

name: Crypto filters
enabled: true
triggers:
  - type: manual
    inputs:
      - name: message
        type: string
        default: "hello world"

consts:
  secret: "secret"

steps:
  - name: hmac_sha256
    type: console
    with:
      message: "{{ inputs.message | hmac_sha256: consts.secret }}"

  - name: sha256
    type: console
    with:
      message: "{{ inputs.message | sha256 }}"

…hmac_sha256 filters (elastic#269989)

## Summary

Adopts Shopify-compatible `sha256` and `hmac_sha256` Liquid filters for
Workflows by upgrading [liquidjs to
10.26.0](https://github.com/harttle/liquidjs/releases/tag/v10.26.0)
([harttle/liquidjs#889](harttle/liquidjs#889)).
Filter behavior comes from liquidjs core—no custom server-side
implementations.

- **Execution (server):** Built-in filters work via
`createWorkflowLiquidEngine()` with existing `renderSync` /
`evalValueSync` (Node `crypto`).
- **Editor autocomplete:** Added `sha256` and `hmac_sha256` entries with
Shopify reference examples.
- **Hover preview (browser):** Switched `evaluateExpression` to async
`evalValue` so crypto filters resolve correctly in the browser bundle
(Web Crypto is async-only). Hover only shows evaluated filter output
when viewing an execution on the **Executions** tab and hovering on the
filter segment inside `{{ }}`.

## Changes

| Area | Change |
|------|--------|
| `package.json` / `yarn.lock` | `liquidjs` `10.25.7` → `10.26.0` |
| `liquid_completions.ts` | Autocomplete for `sha256`, `hmac_sha256` |
| `templating_engine.test.ts` | Server tests (Shopify reference vectors)
|
| `liquid_parse_cache.test.ts` | Parse/validation tests for built-in
crypto filters |
| `evaluate_expression.ts` | `evalValueSync` → `await evalValue` for
browser crypto |
| `unified_hover_provider.ts` | `await evaluateExpression(...)` |
| `evaluate_expression.test.ts` | Async tests + crypto filter coverage |

**Not changed:** `templating_engine.ts`, `liquid_parse_cache.ts` — no
`registerFilter` stubs needed for built-in filters.

## Examples:

```yaml
name: Crypto filters
enabled: true
triggers:
  - type: manual
    inputs:
      - name: message
        type: string
        default: "hello world"

consts:
  secret: "secret"

steps:
  - name: hmac_sha256
    type: console
    with:
      message: "{{ inputs.message | hmac_sha256: consts.secret }}"

  - name: sha256
    type: console
    with:
      message: "{{ inputs.message | sha256 }}"

```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 79909d5)

# Conflicts:
#	package.json
#	src/platform/plugins/shared/workflows_execution_engine/server/templating_engine.test.ts
#	yarn.lock
@botelastic botelastic Bot added the Team:One Workflow Team label for One Workflow (Workflow automation) label May 29, 2026
@VladimirFilonov VladimirFilonov added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting v9.4.2 labels May 29, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout Lane #10 - stateful-classic / default / local-stateful-classic - Observability Landing Page (discover.isEsqlDefault enabled) - redirects to onboarding when no logs data exists

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
workflowsManagement 2.3MB 2.3MB +1.8KB

Copy link
Copy Markdown
Contributor

@Kiryous Kiryous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VladimirFilonov VladimirFilonov merged commit 8796ce0 into elastic:9.4 May 30, 2026
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:One Workflow Team label for One Workflow (Workflow automation) v9.4.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants