Skip to content

Conversation

@piotr-iohk
Copy link
Collaborator

Description

Adds an e2e-status job that aggregates the results of all E2E test shards.
This job provides a single unified status check (e2e-status) that can be used in branch protection rules to ensure all E2E shards pass before merging.

Preview

QA Notes

@piotr-iohk piotr-iohk requested a review from ovitrif November 12, 2025 15:05
@piotr-iohk piotr-iohk self-assigned this Nov 12, 2025
@claude
Copy link

claude bot commented Nov 12, 2025

PR Review - E2E Status Job for Branch Protection

Overview

This PR adds a unified e2e-status job that aggregates results from all E2E test shards, providing a single status check for branch protection rules. This is a common and valuable pattern for workflows with matrix strategies.

Code Quality ✅

Strengths:

  • Clean, focused implementation that follows GitHub Actions best practices
  • Proper use of needs dependency to wait for all E2E shards
  • Correct use of if: always() to ensure the status job runs even if E2E tests fail
  • Clear, descriptive job and step names that match the workflow style
  • Appropriate use of emoji indicators in output messages

Consistency with Repository:

  • Follows the same naming conventions as other jobs in the workflow (.github/workflows/e2e.yml:210-221)
  • Consistent with the workflow's existing structure and style

Potential Issues ⚠️

Minor Issue - Missing Newline at EOF:

  • Line 221 is missing a newline at the end of the file
  • This is a common best practice and convention for text files
  • Recommendation: Add a newline after the final echo statement

Best Practices 🔍

Architecture Pattern:
The implementation correctly follows the "status check aggregation" pattern used in many CI/CD workflows. The key elements are properly implemented:

  1. needs: [e2e-tests] - waits for the matrix job
  2. if: always() - runs regardless of previous job outcomes
  3. ✅ Explicit failure exit (exit 1) when tests fail

Alternative Consideration:
While the current implementation is good, you could also consider checking for specific outcomes beyond just "success":

if: ${{ needs.e2e-tests.result != 'success' && needs.e2e-tests.result != 'cancelled' }}

This would distinguish between failures and cancellations, though the current approach is simpler and likely sufficient.

Performance Considerations ✅

  • Negligible performance impact - this is a lightweight status aggregation job
  • Runs on ubuntu-latest which is appropriate for this simple bash script
  • No unnecessary dependencies or actions

Security Concerns ✅

  • No security concerns identified
  • No secrets or sensitive data handling
  • Simple bash script with no external inputs
  • Read-only operation checking job status

Test Coverage 📝

Testing Notes:
Since this is a workflow configuration change:

  • The change can be validated by observing the workflow run in the Actions tab
  • Verify that the e2e-status job appears as a unified check in the PR
  • Confirm that branch protection rules can use e2e-status as a required check

Suggested QA:

  1. Run the workflow with all shards passing → e2e-status should succeed
  2. Run the workflow with at least one shard failing → e2e-status should fail
  3. Verify the job appears correctly in GitHub's status checks UI
  4. Test that branch protection rules recognize and enforce the new status check

Summary

This is a well-implemented and valuable addition to the CI/CD workflow. The code is clean, follows best practices, and will improve the developer experience by providing a single unified status check for branch protection.

Recommendation: APPROVE ✅ (with the minor newline fix as optional polish)


Action Items:

  • Optional: Add newline at end of file (.github/workflows/e2e.yml:221)
  • Verify the status check appears correctly in PR UI after merge
  • Update branch protection rules to use e2e-status instead of individual shard checks

Copy link
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 adds an aggregation job e2e-status to the E2E workflow that provides a single unified status check for branch protection rules. This ensures all E2E test shards must pass before merging.

  • Adds a new e2e-status job that depends on the e2e-tests matrix job
  • Implements conditional logic to check if all E2E test shards succeeded
  • Provides clear success/failure messages with emoji indicators

ovitrif
ovitrif previously approved these changes Nov 12, 2025
Copy link
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

Nice, TY 🙏🏻

@claude
Copy link

claude bot commented Nov 12, 2025

PR Review: e2e-status for branch protection

Summary

This PR adds an aggregator job (e2e-status) to provide a unified status check for all E2E test shards, enabling simplified branch protection rules. The implementation is clean and follows GitHub Actions best practices.


✅ Strengths

  1. Clear Purpose: The single unified status check simplifies branch protection configuration
  2. Proper Dependencies: Correctly uses needs: [e2e-tests] to ensure all shards complete
  3. Always Runs: The if: always() condition ensures the status job runs even when upstream jobs fail
  4. Appropriate Error Handling: Checks the result status and exits with proper codes

📋 Code Quality Assessment

Overall: Good

The code follows GitHub Actions conventions and is straightforward:

  • Clear job naming
  • Appropriate use of conditional execution
  • Simple, readable bash script
  • Proper exit codes (0 for success, 1 for failure)

🐛 Potential Issues

Minor: Missing Newline at EOF

.github/workflows/e2e.yml:221 - The file is missing a newline at the end

  • Impact: Low (cosmetic, but some tools/editors flag this)
  • Fix: Add a newline after the last line

Consideration: Handling Skipped Jobs

The current implementation only checks for success status, but does not explicitly handle other possible outcomes:

  • success ✓
  • failure ✓ (implicitly handled)
  • cancelled (not explicitly handled)
  • skipped (e.g., if the build or e2e-branch jobs fail)

The e2e-tests job can be skipped if github.event.pull_request.draft == false evaluates to false. In this case, the e2e-status job would currently fail because needs.e2e-tests.result would be skipped, not success.

Recommendation: Consider whether skipped E2E tests should pass or fail the status check. If draft PRs should pass the status check, you might want to handle the skipped state explicitly.


⚡ Performance Considerations

No concerns - The job is extremely lightweight:

  • Single Ubuntu runner
  • Only bash commands
  • Negligible resource usage
  • No additional latency to the workflow

🔒 Security Concerns

No concerns - The job:

  • Uses only built-in GitHub Actions expressions
  • No external dependencies
  • No secret handling
  • No user input processing
  • Read-only operations

🧪 Test Coverage

Manual Testing Needed:

  1. ✓ Verify status check appears in PR checks
  2. ✓ Confirm it passes when all shards succeed
  3. ✓ Confirm it fails when any shard fails
  4. ✓ Test with draft PRs (to verify skipped behavior)
  5. ✓ Test branch protection rules integration

Since this is workflow infrastructure, there is no unit test coverage needed, but you should verify the workflow behavior in practice.


💡 Suggestions

  1. Add Newline at EOF: For consistency with standard file formatting
  2. Consider Skipped State: Decide how to handle skipped E2E tests (draft PRs)
  3. Documentation: Consider adding a comment in the workflow explaining why this job exists (for future maintainers)

✅ Recommendation

Approve with minor suggestions

The PR achieves its goal effectively. The only required change is adding a newline at EOF. The skipped state handling is worth considering but may not be necessary depending on your branch protection strategy.

Once merged, remember to:

  1. Update branch protection rules to require the e2e-status check
  2. Remove individual shard checks from branch protection (if desired)

Great work on improving the CI/CD workflow! 🚀

Copy link
Member

@jvsena42 jvsena42 left a comment

Choose a reason for hiding this comment

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

Nice!

@jvsena42 jvsena42 merged commit 98e2d98 into master Nov 12, 2025
14 checks passed
@jvsena42 jvsena42 deleted the test/e2e-status branch November 12, 2025 16:25
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.

4 participants