From c82171ea3f65b164c47120f3d7e69c8dd239e1ed Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Wed, 29 Apr 2026 09:02:37 -0700 Subject: [PATCH] Fix test_components fromJSON error when test_runs_on is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When configure_test_matrix is skipped (test_runs_on is empty), its components output is an empty string. The existing guard only checked for '[]', so empty string passed the if condition and fromJSON('') failed with "empty input". This was exposed by PR #4911 which calls test_artifacts.yml from release workflows for all families, including those without test runners (gfx900, gfx906, gfx908, gfx101x, etc.). Changes: - Add != '' guard so test_components is skipped when configure_test_matrix was skipped - Add || '[]' fallback in fromJSON for defense in depth 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test_artifacts.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_artifacts.yml b/.github/workflows/test_artifacts.yml index 6c98e395a0b..99a34ca976c 100644 --- a/.github/workflows/test_artifacts.yml +++ b/.github/workflows/test_artifacts.yml @@ -167,13 +167,14 @@ jobs: ${{ !failure() && !cancelled() && + needs.configure_test_matrix.outputs.components != '' && needs.configure_test_matrix.outputs.components != '[]' && !inputs.sanity_check_only_for_family }} strategy: fail-fast: false matrix: - components: ${{ fromJSON(needs.configure_test_matrix.outputs.components) }} + components: ${{ fromJSON(needs.configure_test_matrix.outputs.components || '[]') }} uses: './.github/workflows/test_component.yml' secrets: inherit with: