Skip to content

fix(zx): print command stdout in Script and Commands examples - #477

Merged
fdelbrayelle merged 1 commit into
kestra-io:mainfrom
knowprasad:fix/zx-examples-log-output
Oct 28, 2026
Merged

fdelbrayelle merged 1 commit into
kestra-io:mainfrom
knowprasad:fix/zx-examples-log-output

Conversation

@knowprasad

Copy link
Copy Markdown
Contributor

Description

In io.kestra.plugin.scripts.zx.Script and io.kestra.plugin.scripts.zx.Commands, the @Example flows executed await $\echo ...`` without printing the result. Because zx 8 does not print command stdout unless explicitly output or verbose mode is enabled, running the example flows produced no output logs.

This PR updates the example code in both classes to capture and log the command stdout via console.log(result.stdout.trim()) so that users copying the example see the expected log lines.

Closes #476.

@kestrabot kestrabot Bot added area/plugin Plugin-related issue or feature request kind/external Pull requests raised by community contributors labels Oct 28, 2026
@kestrabot
kestrabot Bot requested a review from a team October 28, 2026 11:30
@kestrabot
kestrabot Bot requested a review from fdelbrayelle October 28, 2026 11:30
@github-project-automation github-project-automation Bot moved this to To review in Pull Requests Oct 28, 2026

@fdelbrayelle fdelbrayelle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Kestra Plugin Code Review

Business Requirements — met

Both zx @Example flows (Script, Commands) now print the command stdout with console.log(result.stdout.trim()), which is the fix suggested in #476. The change touches only the two example strings: no build, CI, or runtime code changes.

Kestra Guidelines — 0 findings

✅ No violations. Examples stay full runnable flows with id, namespace, full = true, no lang, and closing """ aligned with the flow id.

Security (OWASP Top 10:2025 + KPS) — 0 findings

✅ No issues found. The examples interpolate only a local JS constant inside a zx template literal, which zx escapes, and no {{ inputs.* }} value reaches a shell (KPS-06).

Performance — 0 findings

✅ No issues found

Verdict: APPROVE; recommendation only, posted as COMMENT, a maintainer decides.

Confidence: 100%

@fdelbrayelle
fdelbrayelle merged commit 9b23c0b into kestra-io:main Oct 28, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from To review to Done in Pull Requests Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/plugin Plugin-related issue or feature request kind/external Pull requests raised by community contributors

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

zx Script and Commands examples produce no log output

2 participants