Skip to content

chore: [DevOps] Fix parsing of multiline strings in E2E test workflow#944

Open
Jonas-Isr wants to merge 8 commits into
mainfrom
multiline-error
Open

chore: [DevOps] Fix parsing of multiline strings in E2E test workflow#944
Jonas-Isr wants to merge 8 commits into
mainfrom
multiline-error

Conversation

@Jonas-Isr

@Jonas-Isr Jonas-Isr commented Jul 14, 2026

Copy link
Copy Markdown
Member

Context

Recently the E2E test workflow always failed with message:

Error: Unable to process file command 'output' successfully.
Error: Invalid format '            role: user'

This PR fixes the parsing error.

Test run without parsing error here.

@Jonas-Isr Jonas-Isr added the please-review Request to review a pull-request label Jul 14, 2026
@Jonas-Isr Jonas-Isr self-assigned this Jul 14, 2026
Comment thread .github/workflows/e2e-test.yaml Outdated
echo "error_message=$ERROR_MSG" >> $GITHUB_OUTPUT
echo "error_message<<GITHUB_OUTPUT_EOF" >> $GITHUB_OUTPUT
echo "$ERROR_MSG" >> $GITHUB_OUTPUT
echo "GITHUB_OUTPUT_EOF" >> $GITHUB_OUTPUT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What purpose does putting message<<EOF in the output have

@Jonas-Isr Jonas-Isr Jul 14, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's documented here.

Basically, the first line tells github to treat everything that comes next until GITHUB_OUTPUT_EOF as input to $GITHUB_OUTPUT. Then in the third line we actually add GITHUB_OUTPUT_EOF manually to signal that the input is over. The only caveat is that you have to make sure that GITHUB_OUTPUT_EOF does not appear in $ERROR_MSG (which I think is pretty unlikely to happen).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we need to do that? What made it fail?

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

Labels

please-review Request to review a pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants