Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add approve workflows action #3758

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

JesseStutler
Copy link
Member

BackGround

When contributors from outside contribute their first PR to volcano repo, the repo admin has to click the approve and run button to run the CI, even the approvers don't have the permissions to run the CIs when they are not repo admin. And the volcano-bot cannot automatically run CIs, because the bot uses prow as the testing framework. Currently prow uses k8s' own testing framework, and its integration with github workflow is not so good. So, inspired by this issue: kubernetes-sigs/prow#194, and this config: https://github.com/kubernetes-sigs/cluster-api/blob/main/.github/workflows/pr-gh-workflow-approve.yaml, we can add a action, when there is ok-to-test label in this first PR(which is already reviewed by reviewers), this github workflow can be ran to call other workflows. Therefore, approvers can have the right to run CIs, not only the repo admin.

Testing

Test-1

Add ok-to-test label, Approve Workflow action can run:
image
And other workflows can run subsequently:
image

Test-2

Tag other labels, other workflows can't run, and Approve Workflows action is skipped
image

Test-3

PR to non release-** and master branch, ok-to-test label is useless, only PR to release-** and master branch is useful.
image

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 30, 2024
@JesseStutler
Copy link
Member Author

/assign @Monokaix

@hwdef
Copy link
Member

hwdef commented Sep 30, 2024

Who has permission to add ok-to-test label?

@JesseStutler
Copy link
Member Author

/ok-to-test

@volcano-sh-bot
Copy link
Contributor

@JesseStutler: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@JesseStutler
Copy link
Member Author

image
Only trusted reviewers or approvers in OWNERS file can add ok-to-test label.

@hwdef
Copy link
Member

hwdef commented Oct 8, 2024

/ok-to-test

@volcano-sh-bot volcano-sh-bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 8, 2024
@Monokaix
Copy link
Member

Monokaix commented Oct 8, 2024

/lgtm
/approve

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 8, 2024
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Monokaix

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 8, 2024
@volcano-sh-bot volcano-sh-bot merged commit 0c9b846 into volcano-sh:master Oct 8, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants