Skip to content

test: add failing test for multiple JSON output#559

Open
snyk-tim wants to merge 1 commit intomainfrom
test/multiple-workflow-json-issue
Open

test: add failing test for multiple JSON output#559
snyk-tim wants to merge 1 commit intomainfrom
test/multiple-workflow-json-issue

Conversation

@snyk-tim
Copy link
Copy Markdown
Contributor

@snyk-tim snyk-tim commented Feb 26, 2026

Summary

This PR adds a failing test that demonstrates an issue where only the first workflow.Data item is output when multiple items with application/json content type are passed to the output workflow with --json flag.

Question for the team: Is this intended behavior, or should multiple JSON items be output?

Problem

When a workflow returns multiple workflow.Data items (e.g., scanning multiple lock files), only the first JSON result is printed to stdout. All subsequent results are silently dropped.

Expectation

When encountering multiple workflow.Data they should all be output with the correct renderer. In this case with application/json I would expect the output to be JSONL/NDJSON. One line per JSON separated by a \n character.

@snyk-tim snyk-tim requested review from a team as code owners February 26, 2026 12:08
@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Feb 26, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Feb 26, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant