Skip to content

Conversation

@findepi
Copy link
Member

@findepi findepi commented Oct 21, 2025

Add a new build-success job in the main CI GitHub Actions workflow. This job should pass when the whole workflow passes and should fail otherwise.

Summary by Sourcery

Add a build-success marker job to the main CI workflow to ensure the overall pipeline status reflects failures of any individual job, and update tests to verify its configuration

New Features:

  • Add a build-success job to the GitHub Actions CI workflow that aggregates the results of all other jobs and fails if any job failed

CI:

  • Introduce the build-success job with an always-running condition and dependencies on all existing CI jobs
  • Implement a 'Check results' step that verifies each dependent job succeeded or was skipped

Tests:

  • Add a TestCiWorkflow test to validate the build-success job’s dependencies and generated run script

@findepi findepi added the github_actions Pull requests that update GitHub Actions code label Oct 21, 2025
@cla-bot cla-bot bot added the cla-signed label Oct 21, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Oct 21, 2025

Reviewer's Guide

This PR adds a new build-success sentinel job to the main GitHub Actions CI workflow that always runs after all other jobs, checks each preceding job’s result, and includes a unit test in TestCiWorkflow to verify its dependencies and script configuration.

File-Level Changes

Change Details Files
Add build-success job to CI workflow
  • Configure build-success job in ci.yml with if: always() and needs on all existing jobs
  • Add Check results step running a shell script to assert each dependency’s result is success or skipped
.github/workflows/ci.yml
Add test for build-success job in TestCiWorkflow
  • Implement testBuildSuccessDependencies to verify job presence, sorted-unique needs, and correct run script
  • Introduce ifPresent helper method for optional YAML key retrieval
testing/trino-tests/src/test/java/io/trino/tests/ci/TestCiWorkflow.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

sourcery-ai[bot]

This comment was marked as off-topic.

@electrum
Copy link
Member

I like this:
Screenshot 2025-10-21 at 3 45 22 PM

@electrum electrum requested a review from Copilot October 21, 2025 22:46
Copy link

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

Adds a build-success marker job to the CI workflow that aggregates the results of all other jobs, ensuring the overall pipeline status accurately reflects individual job failures or cancellations. This provides a single, reliable status indicator for branch protection rules or other automation that depends on CI completion.

Key Changes:

  • Introduces a build-success job that depends on all other CI jobs and validates their results
  • Adds test coverage to verify the job's dependencies match all other jobs and validates the generated run script

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/ci.yml Adds the build-success job with dependencies on all CI jobs and result validation logic
testing/trino-tests/src/test/java/io/trino/tests/ci/TestCiWorkflow.java Adds test to verify build-success job dependencies and generated script match expectations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Add a new `build-success` job in the main CI GitHub Actions workflow.
This job should pass when the whole workflow passes and should fail
otherwise.
@findepi findepi force-pushed the findepi/add-build-success-marker-job-to-ci-yml-9eca3a branch from 508e2de to 61cebef Compare October 22, 2025 07:24
@findepi
Copy link
Member Author

findepi commented Oct 22, 2025

@findepi
Copy link
Member Author

findepi commented Oct 22, 2025

@findepi
Copy link
Member Author

findepi commented Oct 22, 2025

@wendigo
Copy link
Contributor

wendigo commented Oct 22, 2025

@findepi roll dice harder ;-)

@findepi
Copy link
Member Author

findepi commented Oct 22, 2025

@findepi findepi merged commit e99e241 into trinodb:master Oct 22, 2025
104 checks passed
@findepi findepi deleted the findepi/add-build-success-marker-job-to-ci-yml-9eca3a branch October 22, 2025 15:44
@github-actions github-actions bot added this to the 478 milestone Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed github_actions Pull requests that update GitHub Actions code

Development

Successfully merging this pull request may close these issues.

4 participants