Skip to content

Commit 4cfe4cd

Browse files
committed
fix: reduce DEB matrix and improve Trivy SARIF upload handling
**Problem 1: Matrix Size Limit (CRITICAL)** GitHub Actions limits matrix strategies to 256 jobs maximum. The DEB matrix was generating ~260 jobs and failing: - 34 exporters × 4 distros × 2 archs = ~272 jobs ❌ **Problem 2: Trivy SARIF Upload Errors** Upload step was failing with "Path does not exist" even with continue-on-error, generating 70 error annotations in UI. **Solutions:** 1. **Reduced DEB distributions** (Line 97) - Before: ubuntu-22.04, ubuntu-24.04, debian-12, debian-13 (4 distros) - After: ubuntu-22.04, ubuntu-24.04 (2 Ubuntu LTS only) - Result: ~34 × 2 × 2 = ~136 jobs ✅ (safe margin under 256) - Note: Debian support can be added back when we implement distribution-specific matrix splitting 2. **Check SARIF file existence before upload** (Line 264) - Added check-sarif step to verify file exists - Only upload if file is present - Prevents "Path does not exist" errors in UI - Cleaner logs with warning message when skipped **Testing:** Next full-build run should: - ✅ Create DEB jobs successfully (under 256 limit) - ✅ No SARIF upload errors if files are missing
1 parent d377d6f commit 4cfe4cd

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/full-build.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ jobs:
9494
deb_combinations = []
9595
9696
rpm_dists = ['el8', 'el9', 'el10']
97-
deb_dists = ['ubuntu-22.04', 'ubuntu-24.04', 'debian-12', 'debian-13']
97+
# Limit DEB distributions to stay under GitHub's 256 matrix job limit
98+
# With ~34 exporters × 2 distros × 2 archs = ~136 jobs (safe margin)
99+
deb_dists = ['ubuntu-22.04', 'ubuntu-24.04']
98100
99101
for exporter in exporters:
100102
manifest_path = f'exporters/{exporter}/manifest.yaml'
@@ -259,13 +261,23 @@ jobs:
259261
severity: 'CRITICAL,HIGH,MEDIUM'
260262
continue-on-error: true
261263

262-
- name: Upload Trivy Results
264+
- name: Check SARIF File
265+
id: check-sarif
263266
if: steps.check.outputs.enabled == 'true'
267+
run: |
268+
if [ -f "trivy-${{ matrix.exporter }}.sarif" ]; then
269+
echo "exists=true" >> $GITHUB_OUTPUT
270+
else
271+
echo "⚠️ SARIF file not found, skipping upload"
272+
echo "exists=false" >> $GITHUB_OUTPUT
273+
fi
274+
275+
- name: Upload Trivy Results
276+
if: steps.check.outputs.enabled == 'true' && steps.check-sarif.outputs.exists == 'true'
264277
uses: github/codeql-action/upload-sarif@v3
265278
with:
266279
sarif_file: 'trivy-${{ matrix.exporter }}.sarif'
267280
category: 'trivy-${{ matrix.exporter }}'
268-
continue-on-error: true
269281

270282
- name: 🧪 Container Smoke Test
271283
if: steps.check.outputs.enabled == 'true'

0 commit comments

Comments
 (0)