Skip to content

Conversation

@justin808
Copy link
Member

@justin808 justin808 commented Nov 17, 2025

Summary

Fixes the GitHub Actions error where matrix exclude keys didn't match any keys within the matrix for the build-dummy-app-webpack-test-bundles job.

Changes

  • Added missing exclude section to build-dummy-app-webpack-test-bundles job in .github/workflows/integration-tests.yml
  • The exclude section matches the structure used in dummy-app-integration-tests job
  • This ensures the minimum dependency matrix (Ruby 3.2, Node 20) only runs on master, workflow_dispatch, force_run, or when full-ci label is present

Test Plan

  • ✅ Verified workflow syntax with actionlint
  • ✅ Checked that the exclude section matches the pattern used in dummy-app-integration-tests job
  • CI will validate the matrix configuration works correctly

Related

🤖 Generated with Claude Code


This change is Reviewable

Summary by CodeRabbit

  • Chores
    • Refined GitHub Actions workflow configuration to optimize test matrix execution conditions across integration and webpack test bundles.

Adds the missing exclude section to the build-dummy-app-webpack-test-bundles
job to match the structure used in dummy-app-integration-tests job. This fixes
the GitHub Actions error where matrix exclude keys (ruby-version, node-version,
dependency-level) didn't match any keys within the matrix.

The exclude section prevents the minimum dependency matrix (Ruby 3.2, Node 20)
from running on regular PRs, ensuring it only runs on master, workflow_dispatch,
force_run, or when the full-ci label is present.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 17, 2025

Warning

Rate limit exceeded

@justin808 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 0 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between d8c3230 and ad67d52.

📒 Files selected for processing (3)
  • .github/workflows/examples.yml (1 hunks)
  • .github/workflows/gem-tests.yml (1 hunks)
  • .github/workflows/integration-tests.yml (2 hunks)

Walkthrough

This PR adds exclude matrix entries to the GitHub Actions integration-tests workflow to prevent the minimum dependency matrix from executing on regular PRs. The exclusion rules ensure minimum-dependency builds only run on master, workflow_dispatch triggers, or when full CI conditions are satisfied.

Changes

Cohort / File(s) Summary
GitHub Actions workflow configuration
\.github/workflows/integration-tests\.yml
Adds matrix exclusion rules to build-dummy-app-webpack-test-bundles and dummy-app-integration-tests jobs to skip minimum dependency matrix on regular PRs, preventing unnecessary test execution.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Workflow configuration file modification with straightforward matrix exclusion logic applied consistently across jobs

Possibly related PRs

  • PR #2006: Modifies GitHub Actions matrix exclusion logic for minimum vs latest dependency runs in main.yml and examples.yml workflows with the same conditional control pattern.

Suggested labels

bug

Poem

🐰 A hop, skip, and a skip—no need for the test!
Matrix rows trimmed, keeping PRs the best,
Minimum deps only when truly required,
Workflows now smarter, as workflows desired! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: fixing matrix exclude keys in a specific GitHub Actions job.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link

claude bot commented Nov 17, 2025

Code Review

Summary

This PR fixes a GitHub Actions workflow error where the build-dummy-app-webpack-test-bundles job was missing matrix exclude configuration. The change adds the same exclude pattern used in the dummy-app-integration-tests job.

✅ Positives

  1. Consistency: The exclude section now matches the pattern established in the dummy-app-integration-tests job (lines 164-168), ensuring consistency across the workflow.

  2. Correct Logic: The exclude condition properly filters out the minimum dependency matrix (Ruby 3.2, Node 20) on regular PRs while allowing it on:

    • Master branch pushes
    • Workflow dispatch events
    • PRs with the full-ci label
    • Manual force_run triggers
  3. Well Documented: The inline comment clearly explains the purpose of the exclusion.

  4. Necessary Fix: This resolves a legitimate GitHub Actions error where matrix exclude keys didn't match any matrix entries.

🔍 Observations

  1. Matrix Logic Complexity: The current approach uses both include with conditional values AND exclude with conditional values. This is a bit convoluted but appears to be working as intended:

    • The include section (lines 72-75) conditionally adds the minimum matrix entry
    • The exclude section (lines 76-80) conditionally removes it when the condition is false
  2. Potential Edge Case: When the include condition evaluates to false, it adds entries with empty string values. The exclude then tries to match those empty strings. This works but is somewhat fragile.

🎯 Recommendations

No changes required for this PR - the fix is correct and follows the established pattern. However, for future consideration:

  1. The current pattern of conditional include + conditional exclude is complex but necessary given GitHub Actions limitations.

  2. The CLAUDE.md file's CI switching documentation is excellent and should help prevent confusion about when minimum vs latest dependencies run.

✅ Verdict

LGTM - This is a straightforward bug fix that correctly addresses the matrix configuration error. The change is:

  • Minimal and focused
  • Consistent with existing patterns
  • Properly tested with actionlint
  • Well documented in the PR description

The code follows the project's GitHub Actions patterns and should resolve the CI error without introducing new issues.

@coderabbitai coderabbitai bot added the bug label Nov 17, 2025
The previous approach used conditional expressions within the include
section, which caused GitHub Actions to create matrix entries with
false/empty values when conditions weren't met. This resulted in a
(false, false, false) matrix entry that failed.

Solution: Changed to match the pattern used in gem-tests.yml and
examples.yml - use static entries in include section and rely solely
on exclude section for conditional logic.

Changes:
- Converted matrix from array-based to include-based for both jobs
- Made include entries static (always add both latest and minimum)
- Keep exclude section to conditionally remove minimum on PRs

This ensures only valid matrix combinations are created.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
Copy link

claude bot commented Nov 17, 2025

PR Review - Fix matrix exclude keys in build-dummy-app-webpack-test-bundles job

✅ Summary

This PR correctly fixes the GitHub Actions workflow error by restructuring the matrix configuration to match the pattern already established in the dummy-app-integration-tests job. The changes are well-executed and follow best practices.


🎯 Code Quality & Best Practices

Excellent:

  • Consistency: The changes perfectly mirror the structure used in the dummy-app-integration-tests job (lines 157-169), maintaining consistency across the workflow
  • Clarity: The refactoring from implicit matrix values to explicit include sections significantly improves readability
  • Documentation: Inline comments clearly explain when each matrix configuration runs
  • DRY Principle: Both jobs now use identical matrix configuration patterns, making maintenance easier

Pattern Applied:

# Before (lines 68-76): Implicit matrix that caused exclude mismatch
matrix:
  ruby-version: ['3.4']
  node-version: ['22']
  dependency-level: ['latest']
  include: [conditional minimum versions]

# After (lines 68-81): Explicit include with proper exclude
matrix:
  include:
    - ruby-version: '3.4'  # Always run
      node-version: '22'
      dependency-level: 'latest'
    - ruby-version: '3.2'  # Conditional via exclude
      node-version: '20'
      dependency-level: 'minimum'
  exclude: [conditional exclusion]

🐛 Bug Fix Validation

Root Cause Correctly Identified:
The original error occurred because exclude was trying to match keys that didn't exist in the base matrix. The implicit matrix only defined:

  • ruby-version: ['3.4']
  • node-version: ['22']
  • dependency-level: ['latest']

But the include section tried to conditionally add 3.2/20/minimum, and the exclude had no matching base values to exclude.

Solution:
By moving all matrix values into the include section, the exclude now has concrete matrix combinations to match against. This is the correct GitHub Actions pattern for conditional matrix entries.


🔒 Security Considerations

No security concerns. The changes:

  • Only modify workflow configuration, not runtime behavior
  • Maintain the same security boundaries (PR vs master branch checks)
  • Don't introduce new permissions or secrets usage

⚡ Performance Considerations

Neutral to Positive:

  • ✅ No performance impact on actual test execution
  • ✅ Same matrix logic: PRs run 1 config (latest), master runs 2 configs (latest + minimum)
  • ✅ More efficient GitHub Actions parsing with explicit include structure

🧪 Test Coverage

Adequate:

  • ✅ PR description mentions actionlint validation
  • ✅ The proof will be in CI execution (which the PR explicitly notes)
  • ✅ Low-risk change since it mirrors working configuration from dummy-app-integration-tests

Suggestion: After merge, monitor the next master branch build to confirm both matrix entries (latest + minimum) execute as expected.


📝 Minor Suggestions

  1. Consistency in both jobs: I noticed the diff shows changes to both build-dummy-app-webpack-test-bundles (lines 68-81) and dummy-app-integration-tests (lines 157-169). Both jobs now have identical matrix structures, which is excellent for maintainability. ✅

  2. Condition Logic: The exclude condition is complex but correct:

github.event_name == 'pull_request' && 
github.ref \!= 'refs/heads/master' && 
inputs.force_run \!= true && 
needs.detect-changes.outputs.has_full_ci_label \!= 'true' && 
'3.2' || ''

This correctly excludes the minimum config on regular PRs while allowing it on master, forced runs, and PRs with the full-ci label.


🚀 Recommendation

APPROVE

This is a well-executed fix that:

  • Solves the immediate GitHub Actions error
  • Improves code clarity and maintainability
  • Follows established patterns in the codebase
  • Has no breaking changes or security concerns

The change is low-risk and high-value. The consistent structure across both jobs will make future maintenance much easier.


📚 References


Review conducted per CLAUDE.md guidelines 🤖

@justin808
Copy link
Member Author

/run-skipped-ci

@github-actions
Copy link
Contributor

🚀 Full CI Mode Enabled

All checks are already running - nothing to do!

All CI checks are already running on this PR. Added the full-ci label - future commits will run the full CI suite.

Replace problematic include/exclude approach with setup-matrix job that
generates different matrices based on branch and trigger context.

The previous approach using conditional expressions in exclude with empty
strings ('') didn't work reliably - GitHub Actions can't truly conditionally
exclude matrix entries this way.

New approach:
- Add setup-matrix job that evaluates conditions and outputs JSON matrix
- examples job uses fromJson() to consume the dynamic matrix
- On PRs: runs 1 job (Ruby 3.4 + latest) for fast feedback
- On master/workflow_dispatch/force_run/full-ci: runs 2 jobs for full coverage

Benefits:
- Actually works (no empty string workarounds)
- Clear and maintainable (explicit bash conditions)
- Debuggable (matrix output visible in logs)
- Flexible (easy to add more conditions)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
Copy link

claude bot commented Nov 17, 2025

Code Review - PR #2036: Fix matrix exclude keys

Summary

This PR correctly fixes the GitHub Actions matrix configuration issue by adding the missing exclude section to the build-dummy-app-webpack-test-bundles job. The changes align well with the patterns used in other jobs.

Positive Aspects

  1. Consistency: The matrix configuration now matches the pattern used in dummy-app-integration-tests, which improves maintainability.

  2. Correct Logic: The exclude conditions properly implement the intended behavior - PRs run only latest versions (Ruby 3.4, Node 22) for fast feedback, while master branch, workflow_dispatch, force_run, or full-ci label trigger both latest AND minimum versions.

  3. Well-documented: Comments clearly explain the purpose of each matrix entry.

  4. Bonus improvement in examples.yml: The setup-matrix job approach is cleaner and more maintainable than the conditional exclude pattern.

Code Quality Observations

The matrix structure is now consistent across jobs. This fixes the original error where the exclude section was missing entirely from build-dummy-app-webpack-test-bundles.

The new setup-matrix approach in examples.yml is superior because logic is centralized in one place, no need for complex conditional excludes, easier to test and verify, and more explicit about what runs when.

Suggestions

  1. Consider Adopting setup-matrix Pattern Everywhere (Optional): The setup-matrix pattern used in examples.yml is cleaner than the include + exclude pattern. Consider refactoring the other jobs to use this approach for consistency.

  2. Matrix Exclude Edge Case (Minor): The exclude condition uses github.ref != refs/heads/master but when github.event_name == pull_request, github.ref refers to the PR branch, not the base branch. However, this works correctly in practice. For clarity, you could simplify the condition slightly.

Test Coverage

  • The PR description mentions actionlint validation, which is appropriate.
  • CI will validate the matrix works correctly in practice.
  • Consider testing this on a PR to verify only the latest matrix runs, then merge to master and verify both matrices run.

Final Recommendation

APPROVE - This PR successfully fixes the immediate issue and maintains consistency with the existing patterns. The code is correct and well-documented.

Optional follow-up: Consider refactoring all three jobs to use the setup-matrix pattern for better maintainability, but that is out of scope for this bug fix.


Review generated with assistance from Claude Code

@claude
Copy link

claude bot commented Nov 17, 2025

Code Review

Summary

This PR fixes GitHub Actions matrix configuration issues across multiple workflow files. The changes move from a problematic conditional matrix approach to more reliable patterns.

✅ Strengths

  1. Correct Problem Diagnosis: The PR correctly identifies that GitHub Actions doesn't handle empty string ('') exclusions reliably, leading to invalid matrix combinations.

  2. Multiple Approaches Tested: The PR shows evolution through 3 commits, testing different solutions:

    • Commit 1: Adding exclude section (partial fix)
    • Commit 2: Static include + exclude pattern (works for integration-tests.yml)
    • Commit 3: Dynamic matrix generation (cleaner for examples.yml)
  3. Consistent Pattern Application: The integration-tests.yml fix uses the same static include + exclude pattern successfully used in gem-tests.yml, ensuring consistency across workflows.

  4. Well-Documented: Excellent commit messages explaining the "why" behind each change, and clear inline comments in the workflow files.

📋 Code Quality

Integration Tests Workflow (.github/workflows/integration-tests.yml):

  • ✅ Correctly changed from array-based to include-based matrix
  • ✅ Static entries prevent false/empty value issues
  • ✅ Exclude section properly uses || '' fallback pattern
  • ✅ Both dummy-app-integration-tests and build-dummy-app-webpack-test-bundles jobs updated consistently

Examples Workflow (.github/workflows/examples.yml):

  • ✅ Dynamic matrix generation via setup-matrix job is more maintainable
  • ✅ Bash conditionals are explicit and debuggable
  • ✅ JSON output properly escaped and formatted
  • fromJson() correctly consumes the dynamic matrix

🔍 Potential Issues

  1. Node Version Missing in Examples Workflow:
    The examples workflow doesn't include node-version in the matrix, while integration-tests does. Is this intentional? If examples need Node.js, consider adding it for consistency:

    {"include":[{"ruby-version":"3.4","node-version":"22","dependency-level":"latest"},...]}
  2. Inconsistent Matrix Approaches:

    • integration-tests.yml: Uses static include + exclude
    • examples.yml: Uses dynamic matrix generation

    Question: Should we standardize on one approach across all workflows? The dynamic approach in examples.yml is arguably cleaner and more maintainable.

  3. Testing Recommendation:
    Since this fixes CI configuration, verify these scenarios work correctly:

    • ✓ Regular PR (should run only latest versions)
    • ✓ PR with full-ci label (should run both matrices)
    • ✓ Push to master (should run both matrices)
    • ✓ Manual workflow_dispatch (should run both matrices)

🎯 Suggested Improvements

Consider unifying the approach across all workflows:

# Option A: Extend dynamic matrix to integration-tests.yml (recommended)
# Pros: More maintainable, explicit, debuggable
# Cons: Extra job overhead (minimal)

# Option B: Keep current hybrid approach
# Pros: Fewer jobs, proven pattern for integration tests
# Cons: Two different patterns to maintain

If choosing Option A, you could extract the matrix logic into a reusable workflow to avoid duplication.

🔒 Security & Performance

  • ✅ No security concerns
  • ✅ Performance impact is minimal (setup-matrix job adds ~5-10 seconds)
  • ✅ Reduces wasted CI time by correctly excluding minimum matrix on PRs

📊 Test Coverage

  • ⚠️ Action Required: These are workflow changes, so they can only be validated by actual CI runs. Recommend testing with:
    1. A regular PR (verify only latest matrix runs)
    2. A PR with full-ci label (verify both matrices run)
    3. Checking the workflow run matrix in GitHub Actions UI

✅ Final Verdict

Approve with minor suggestions. The fix is correct and solves the immediate problem. The hybrid approach (static+exclude for integration-tests, dynamic for examples) works but could be unified for better maintainability in the future.

Before merging: Verify the workflow runs successfully with the expected matrix configurations.


Review completed following repository CLAUDE.md guidelines

justin808 and others added 2 commits November 16, 2025 17:40
Apply same dynamic matrix approach to integration-tests.yml that was
used in examples.yml. This fixes the matrix exclude errors for both
build-dummy-app-webpack-test-bundles and dummy-app-integration-tests jobs.

Changes:
- Add setup-integration-matrix job to generate dynamic matrices
- Update both jobs to use fromJson() with the dynamic matrix
- Remove broken exclude rules with empty string workarounds

Behavior:
- On PRs: runs 1 job (Ruby 3.4 + Node 22 + latest) for fast feedback
- On master/workflow_dispatch/force_run/full-ci: runs 2 jobs for full coverage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Convert gem-tests.yml to use the same dynamic matrix pattern as
integration-tests.yml and examples.yml for consistency.

Changes:
- Added setup-gem-tests-matrix job to compute matrix based on context
- Updated rspec-package-tests to use fromJson(needs.setup-gem-tests-matrix.outputs.matrix)
- Removed static include/exclude pattern in favor of dynamic generation
- Maintains same behavior: latest on PRs, both latest+minimum on master or with full-ci label

Benefits:
- Consistent pattern across all three test workflows
- More explicit and debuggable (matrix visible in job output)
- Prevents potential issues with empty/false values in exclude
- Easier to understand and maintain

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@justin808
Copy link
Member Author

@claude review this PR

@claude
Copy link

claude bot commented Nov 17, 2025

Claude finished @justin808's task —— View job


PR Review: Fix matrix exclude keys in build-dummy-app-webpack-test-bundles job

Todo List

  • Read repository guidelines (CLAUDE.md)
  • Read modified workflow files
  • Analyze the changes via git diff
  • Review matrix configuration logic
  • Provide comprehensive feedback

Summary

This PR refactors the GitHub Actions matrix configuration across three workflow files to use a cleaner, more maintainable pattern. The changes replace the complex include + exclude conditional logic with a dedicated setup job that dynamically generates the appropriate matrix based on the context (PR vs master, full-ci label, etc.).

✅ Strengths

  1. Significant Improvement in Maintainability: The new approach with dedicated setup-matrix jobs is vastly superior to the previous conditional include/exclude pattern. Logic is now centralized in one place per workflow, making it much easier to understand and modify.

  2. Consistency Across Workflows: All three workflows now follow the same pattern:

    • .github/workflows/examples.ymlsetup-matrix job
    • .github/workflows/gem-tests.ymlsetup-gem-tests-matrix job
    • .github/workflows/integration-tests.ymlsetup-integration-matrix job
  3. Correct Logic: The matrix generation correctly implements the intended behavior:

    • PRs: Run only latest versions (Ruby 3.4, Node 22) for fast feedback
    • Master/workflow_dispatch/force_run/full-ci label: Run both latest AND minimum versions (Ruby 3.2, Node 20)
  4. Fixes the Original Issue: The previous integration-tests.yml had a problematic pattern where build-dummy-app-webpack-test-bundles used a different matrix structure than dummy-app-integration-tests. This PR unifies them to use the same setup-integration-matrix job.

  5. Clear Comments: Inline comments explain when each matrix configuration runs, making the intent obvious.

  6. Eliminates Fragile Empty String Patterns: The old approach relied on conditionally generating empty strings ('') for exclude matching, which was error-prone. The new approach generates the correct matrix upfront.

🔍 Code Quality Observations

Before (integration-tests.yml lines 68-76):

matrix:
  ruby-version: ['3.4']
  node-version: ['22']
  dependency-level: ['latest']
  include:
    - ruby-version: ${{ (condition) && '3.2'}}
      node-version: ${{ (condition) && '20'}}
      dependency-level: ${{ (condition) && 'minimum'}}

After (integration-tests.yml lines 68-81):

# Dedicated setup job generates the matrix dynamically
setup-integration-matrix:
  steps:
    - id: set-matrix
      run: |
        if [[ full_ci_conditions ]]; then
          echo 'matrix={"include":[...both configs...]}' >> $GITHUB_OUTPUT
        else
          echo 'matrix={"include":[...latest only...]}' >> $GITHUB_OUTPUT
        fi

This is much clearer and avoids the pitfall of GitHub Actions trying to evaluate conditional expressions that result in empty values.

📊 Matrix Logic Analysis

The matrix generation logic in all three workflows correctly handles:

  1. Master branch pushes: Always run full matrix (latest + minimum)
  2. workflow_dispatch: Always run full matrix
  3. force_run input: Always run full matrix
  4. full-ci label: Always run full matrix
  5. Regular PRs: Only run latest matrix for fast feedback

The condition is consistent across all three workflows:

if [[ "${{ github.ref }}" == "refs/heads/master" ]] || \
   [[ "${{ github.event_name }}" == "workflow_dispatch" ]] || \
   [[ "${{ inputs.force_run }}" == "true" ]] || \
   [[ "${{ needs.detect-changes.outputs.has_full_ci_label }}" == "true" ]]; then

Note: The gem-tests.yml workflow doesn't include workflow_dispatch in its condition (line 73), which is intentional since that workflow doesn't support inputs.force_run (see line 18-24 in gem-tests.yml).

🎯 Specific Changes Review

1. examples.yml (lines 60-78)

  • ✅ Creates setup-matrix job
  • ✅ Removes complex exclude section (lines 81-82 in old version)
  • ✅ Uses fromJson(needs.setup-matrix.outputs.matrix)
  • ✅ Matrix includes only ruby-version and dependency-level (no node-version needed for generator tests)

2. gem-tests.yml (lines 64-80)

  • ✅ Creates setup-gem-tests-matrix job
  • ✅ Removes complex exclude section
  • ✅ Uses fromJson(needs.setup-gem-tests-matrix.outputs.matrix)
  • ✅ Matrix includes only ruby-version and dependency-level (no node-version needed for gem tests)

3. integration-tests.yml (lines 61-80, 81-87, 157-162)

  • ✅ Creates setup-integration-matrix job
  • Fixes the original issue: build-dummy-app-webpack-test-bundles now uses the same matrix as dummy-app-integration-tests
  • ✅ Matrix includes ruby-version, node-version, and dependency-level (all three needed for integration tests)
  • ✅ Both jobs now depend on setup-integration-matrix and use fromJson(needs.setup-integration-matrix.outputs.matrix)

🐛 Original Issue Analysis

The PR description mentions:

"Fixes the GitHub Actions error where matrix exclude keys didn't match any keys within the matrix"

This occurred in the build-dummy-app-webpack-test-bundles job because:

Old approach (problematic):

matrix:
  ruby-version: ['3.4']
  node-version: ['22']
  dependency-level: ['latest']
  include:
    - ruby-version: ${{ condition && '3.2'}}  # Could evaluate to empty string

When the condition was false, this would create a matrix entry with empty values, but there was no corresponding exclude section to remove them, unlike the dummy-app-integration-tests job which had both include AND exclude.

New approach (correct):
The setup-integration-matrix job generates the complete, correct matrix upfront—no empty values, no complex exclude logic needed.

🚀 Performance Impact

Positive: The new approach adds one lightweight setup job per workflow (~5-10 seconds), but this is negligible compared to the clarity and correctness gains.

Neutral: The actual test execution remains the same—PRs run 1 configuration, master runs 2 configurations.

📝 Minor Suggestions

  1. Inconsistency in workflow_dispatch handling (informational, not blocking):

    • integration-tests.yml and examples.yml check for github.event_name == 'workflow_dispatch'
    • gem-tests.yml does NOT check for this (line 73)

    This appears intentional since gem-tests.yml doesn't have inputs.force_run in its trigger configuration. If you want consistency, you could add workflow_dispatch support to gem-tests.yml, but this is outside the scope of this PR.

  2. Consider extracting to reusable workflow (future enhancement):
    The matrix setup logic is nearly identical across workflows. You could create a reusable workflow at .github/workflows/setup-matrix.yml that all three workflows call. However, this is a nice-to-have optimization, not a requirement.

✅ Final Recommendation

APPROVE

This PR successfully:

  • ✅ Fixes the original GitHub Actions matrix error
  • ✅ Significantly improves code clarity and maintainability
  • ✅ Establishes a consistent pattern across all workflows
  • ✅ Eliminates fragile conditional logic with empty strings
  • ✅ Makes the matrix behavior explicit and easy to verify

The refactoring is well-executed and makes the workflows much easier to understand and maintain. The consistent setup-matrix pattern is a best practice for complex conditional matrices in GitHub Actions.

🧪 Testing Notes

Since you've already run /run-skipped-ci and enabled the full-ci label, this should trigger the full matrix on this PR, allowing you to verify that both configurations (latest + minimum) execute correctly before merging.

After merge, monitor the next master branch build to confirm the expected behavior continues.


References:


@justin808 justin808 merged commit 2f751d1 into master Nov 17, 2025
28 of 30 checks passed
@justin808 justin808 deleted the justin808/fix-matrix-exclude branch November 17, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants