Skip to content

Fix /run-acceptance-tests for bridged providers - #1793

Open
blampe wants to merge 2 commits into
masterfrom
blampe/community-prs
Open

Fix /run-acceptance-tests for bridged providers#1793
blampe wants to merge 2 commits into
masterfrom
blampe/community-prs

Conversation

@blampe

@blampe blampe commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

This adds an optional sha argument to our reusable workflows. When we get a community PR, we propagate the PR's merge commit SHA to those workflows.

run-acceptance-tests.yml is modified to create and update a status check for Sentinel for these community PR workflows.

We aren't able to use the native "Approve workflows to run" button because our ESC secrets require id-token: write permission but PRs from forks can only have read.

Fixes #1409

@EronWright
EronWright requested a review from Copilot October 16, 2025 23:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 support for community pull requests by adding optional sha parameters to reusable workflows and implementing a status check mechanism for the Sentinel job when running acceptance tests via repository dispatch events.

  • Adds optional sha input parameter to all reusable workflow files to support building from specific commits
  • Replaces environment variable-based commit SHA references with the new input parameter
  • Implements community PR workflow jobs that create and update GitHub status checks for Sentinel

Reviewed Changes

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

File Description
provider-ci/test-providers//workflows/.yml Added sha input parameter and updated checkout actions to use it instead of environment variables
provider-ci/internal/pkg/templates//workflows/.yml Updated workflow templates with sha parameter support
provider-ci/test-providers/*/workflows/run-acceptance-tests.yml Added start-community-pr and finish-community-pr jobs for status check management
provider-ci/test-providers/*/workflows/command-dispatch.yml Added pull-requests write permission and reorganized workflow structure

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

@EronWright EronWright left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good.

An oddity is that the natural run-acceptable-test still waits for maintainer approval.

contents: read
id-token: write # For ESC secrets.
with:
sha: ${{ github.event.client_payload.pull_request.merge_commit_sha }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Earlier we have:

PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }}

It is intentional that the checkout use the merge commit rather than the head commit?


env:
PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }}
MISE_ENV: test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the impact of removing MISE_ENV

uses: #{{ .Config.ActionVersions.Checkout }}#
with:
ref: ${{ env.PR_COMMIT_SHA }}
ref: ${{ inputs.sha }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm a bit concerned that the ref is changing from head to merge commit.

with:
commands: |
run-acceptance-tests
release

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Explanation for why release is being dropped?

description: Version of the provider to build
sha:
type: string
description: The commit to build, primarily for community PRs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might be nice to clarify the default behavior.

repository_dispatch:
types:
- run-acceptance-tests-command
workflow_dispatch: {}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is workflow_dispatch actually being used?

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.

Can't run acceptance tests for 3rd party PRs

3 participants