From 573e86ec15e952cc6ae539d5d35300818dc34aaf Mon Sep 17 00:00:00 2001 From: Joey Vagedes Date: Wed, 1 Apr 2026 14:36:28 -0700 Subject: [PATCH 1/3] .github: PackageMatrix: Bugfix empty packages list The list of packages in the generated matrix can sometimes be empty, which is invalid and will result in the actual matrix of job runners failing to generate (because all values must be a non-empty array). This commit performs a final validation of job matrix, removing all default configs if the package list is empty, and removing the includes list if it is empty. --- .github/workflows/PackageMatrix.yml | 49 ++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/.github/workflows/PackageMatrix.yml b/.github/workflows/PackageMatrix.yml index 97fb5b22..d453c725 100644 --- a/.github/workflows/PackageMatrix.yml +++ b/.github/workflows/PackageMatrix.yml @@ -76,7 +76,7 @@ jobs: runs-on: ubuntu-latest outputs: - matrix: ${{ steps.filter-matrix.outputs.matrix || steps.set-packages.outputs.matrix }} + matrix: ${{ steps.clean-matrix.outputs.matrix }} steps: - name: Checkout repository @@ -171,3 +171,50 @@ jobs: echo "::endgroup::" echo "" echo "matrix=$OUTPUT" >> "$GITHUB_OUTPUT" + + - name: Clean matrix if no packages found + id: clean-matrix + shell: bash + env: + MATRIX: ${{ steps.filter-matrix.outputs.matrix || steps.set-packages.outputs.matrix }} + DEFAULT_CONFIG: ${{ inputs.default-config }} + run: | + echo "Checking if matrix has any packages..." + + # Check if packages array is empty + PACKAGES_COUNT=$(echo "$MATRIX" | jq '.packages | length') + + echo "Packages count: $PACKAGES_COUNT" + + if [ "$PACKAGES_COUNT" -eq 0 ]; then + echo "No packages found - removing default-config dimensions and packages, keeping include only" + # Keep only include, remove packages and all default-config dimensions + OUTPUT=$(echo "$MATRIX" | jq '{include: .include}') + else + echo "Packages found - keeping matrix as-is" + OUTPUT="$MATRIX" + fi + + # Remove include if it's an empty array (regardless of packages count) + INCLUDE_COUNT=$(echo "$OUTPUT" | jq '.include | length') + echo "Include count: $INCLUDE_COUNT" + + if [ "$INCLUDE_COUNT" -eq 0 ]; then + echo "Include array is empty - removing it" + OUTPUT=$(echo "$OUTPUT" | jq 'del(.include)') + fi + + # Check if we have an empty JSON object and return empty string instead + OBJECT_KEYS=$(echo "$OUTPUT" | jq 'keys | length') + if [ "$OBJECT_KEYS" -eq 0 ]; then + echo "Matrix is completely empty - returning empty string" + OUTPUT='' + fi + + echo "::group::Final matrix JSON" + echo "$OUTPUT" | jq . + echo "::endgroup::" + echo "" + # Ensure compact JSON output for GitHub Actions + COMPACT_OUTPUT=$(echo "$OUTPUT" | jq -c .) + echo "matrix=$COMPACT_OUTPUT" >> "$GITHUB_OUTPUT" From 6f8465093d0d45933046138a9409d80db9ba0eee Mon Sep 17 00:00:00 2001 From: Joey Vagedes Date: Wed, 1 Apr 2026 15:06:21 -0700 Subject: [PATCH 2/3] .sync: Files.yml: Cleanup CLANGPDB file sync A mu_feature_ipmi and mu_feature_debugger do not support `stuart_setup` and thus would error because their config was set to `both`. This commit updates the config for these two repositories to only be `ci-setup`. Additionally, this commit removes mu_plus from being sync'd as it requires rust be configured. We do not plan on supporting this at this time. --- .sync/Files.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.sync/Files.yml b/.sync/Files.yml index 7d9d24d4..5429162e 100644 --- a/.sync/Files.yml +++ b/.sync/Files.yml @@ -646,7 +646,7 @@ group: repos: | microsoft/mu_crypto_release -# Leaf Workflow - CLANGPDB Package CI (feature repos) +# Leaf Workflow - CLANGPDB Package CI (mu_feature_config and mu_feature_dfci) - files: - source: .sync/workflows/leaf/clangpdb-ci.yml dest: .github/workflows/clangpdb-ci.yml @@ -655,11 +655,20 @@ group: setup_cmd: both repos: | microsoft/mu_feature_config - microsoft/mu_feature_debugger microsoft/mu_feature_dfci + +# Leaf Workflow - CLANGPDB Package CI (mu_feature_ipmi and mu_feature_debugger) + - files: + - source: .sync/workflows/leaf/clangpdb-ci.yml + dest: .github/workflows/clangpdb-ci.yml + template: + branch: main + setup_cmd: ci-setup + repos: | microsoft/mu_feature_ipmi + microsoft/mu_feature_debugger -# Leaf Workflow - CLANGPDB Package CI (mu_oem_sample, mu_plus) +# Leaf Workflow - CLANGPDB Package CI (mu_oem_sample) - files: - source: .sync/workflows/leaf/clangpdb-ci.yml dest: .github/workflows/clangpdb-ci.yml @@ -667,7 +676,6 @@ group: setup_cmd: ci-setup repos: | microsoft/mu_oem_sample - microsoft/mu_plus # Leaf Workflow - CLANGPDB Package CI (mu_tiano_platforms) - files: From 46744bac5a5a7877215c37e5e255c99459ea552c Mon Sep 17 00:00:00 2001 From: Joey Vagedes Date: Wed, 1 Apr 2026 15:09:00 -0700 Subject: [PATCH 3/3] update mu_devops version to v18.0.5 for release --- .sync/Version.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.sync/Version.njk b/.sync/Version.njk index e26492ef..3818191d 100644 --- a/.sync/Version.njk +++ b/.sync/Version.njk @@ -30,7 +30,7 @@ #} {# The git ref value that files dependent on this repo will use. #} -{% set mu_devops = "v18.0.4" %} +{% set mu_devops = "v18.0.5" %} {# The latest Project Mu release branch value. #} {% set latest_mu_release_branch = "release/202511" %}