Skip to content

fix(ci): preserve JSON structure of changes output in build-matrix step#104

Merged
coleramos425 merged 3 commits intomainfrom
copilot/fix-fromjson-failure
Apr 1, 2026
Merged

fix(ci): preserve JSON structure of changes output in build-matrix step#104
coleramos425 merged 3 commits intomainfrom
copilot/fix-fromjson-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

fromJson in the test-installation strategy matrix fails on PRs that only modify a subset of packages because the dorny/paths-filter changes output (e.g., ["kerncap","metrix"]) is interpolated inside a double-quoted echo, causing the shell to strip the inner quotes and write invalid JSON ([kerncap,metrix]) to GITHUB_OUTPUT.

Change

Assign the expression to a shell variable using single quotes before echoing — the same pattern already used for ALL:

- echo "packages=${{ steps.filter.outputs.changes }}" >> "$GITHUB_OUTPUT"
+ CHANGES='${{ steps.filter.outputs.changes }}'
+ echo "packages=${CHANGES}" >> "$GITHUB_OUTPUT"

GHA expands ${{ }} before the shell runs, so the shell sees CHANGES='["kerncap","metrix"]'; single quotes preserve the JSON intact.

Copilot AI changed the title [WIP] Fix CI failure caused by fromJson JSON output fix(ci): preserve JSON structure of changes output in build-matrix step Mar 30, 2026
Copilot AI requested a review from coleramos425 March 30, 2026 21:48
@coleramos425 coleramos425 marked this pull request as ready for review April 1, 2026 17:51
Copilot AI review requested due to automatic review settings April 1, 2026 17:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the CI workflow’s “Build package matrix” step so the dorny/paths-filter changes output remains valid JSON when written to GITHUB_OUTPUT, preventing fromJson(...) from failing when only a subset of packages changes.

Changes:

  • Store ${{ steps.filter.outputs.changes }} in a single-quoted shell variable before emitting it as a job output.
  • Update the packages output emission to use the intermediate CHANGES variable, preserving JSON quoting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…lid JSON output

Agent-Logs-Url: https://github.com/AMDResearch/intellikit/sessions/f1e2ef4e-1d36-4c43-8df3-289005ba64fc

Co-authored-by: coleramos425 <11466906+coleramos425@users.noreply.github.com>
@coleramos425
Copy link
Copy Markdown
Collaborator

Looks good. This PR fixed the reoccuring failures observed in the Intellikit CI Test job, e.g.
image

@coleramos425 coleramos425 merged commit 32bad9b into main Apr 1, 2026
38 checks passed
@coleramos425 coleramos425 deleted the copilot/fix-fromjson-failure branch April 1, 2026 20:47
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.

CI: fromJson fails due to shell quote stripping

3 participants