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

project-infra, botreview: Initial implementation of prow plugin to automate simple reviews #2448

Merged
merged 17 commits into from
Dec 7, 2023

Conversation

dhiller
Copy link
Contributor

@dhiller dhiller commented Nov 10, 2022

botreview aims to automate reviews that follow simple patterns.

Tracked in #3100

This first implementation can be used as a cli tool, but also has the setup for the deployment to KubeVirt prow. Tested with prow-deploy test setup and phony GitHub events.

Note that the deployment currently has --dry-run=true enabled, since we want to test it's stability gradually.

Implemented review strategies

Review strategies implemented today:

It can also handle mixed PRs, where each change abides by the rules of the strategy.

@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Nov 10, 2022
@rmohr
Copy link
Member

rmohr commented Nov 10, 2022

Nice!

@dhiller dhiller mentioned this pull request Nov 28, 2022
@dhiller dhiller changed the title WIP: botreview - tool to automate simple reviews WIP: botreview - automate simple reviews Nov 28, 2022
@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 18, 2023
@dhiller
Copy link
Contributor Author

dhiller commented Apr 21, 2023

/remove-lifecycle stale
/lifecycle frozen

@kubevirt-bot kubevirt-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 21, 2023
@kubevirt-bot
Copy link
Contributor

@dhiller: The lifecycle/frozen label cannot be applied to Pull Requests.

In response to this:

/remove-lifecycle stale
/lifecycle frozen

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.

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 21, 2023
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 23, 2023
@dhiller dhiller mentioned this pull request Jun 23, 2023
@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 5, 2023
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 6, 2023
Create external prow plugin. Implement first review strategy "prow image bump".

Signed-off-by: Daniel Hiller <[email protected]>
Signed-off-by: Daniel Hiller <[email protected]>
Also use base and head for calculating the diff from a PR

Signed-off-by: Daniel Hiller <[email protected]>
Signed-off-by: Daniel Hiller <[email protected]>
Use file names only for comment if otherwise too long

Signed-off-by: Daniel Hiller <[email protected]>
Fix copyright notice, pass through dry run and add checkout in server mode.
Add server checkout. Don't attach comment if the review didn't match any type.
Use latest tag for botreview image. Fix bazel with gazelle.

Signed-off-by: Daniel Hiller <[email protected]>
Signed-off-by: Daniel Hiller <[email protected]>
Signed-off-by: Daniel Hiller <[email protected]>
Copy link
Member

@brianmcarey brianmcarey left a comment

Choose a reason for hiding this comment

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

/lgtm

/approve

This will be great to automate some of the PR reviews that are generated with automation. Thanks @dhiller !!

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 7, 2023
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brianmcarey

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 7, 2023
@kubevirt-bot kubevirt-bot merged commit 8b4e797 into kubevirt:main Dec 7, 2023
11 checks passed
@kubevirt-bot
Copy link
Contributor

@dhiller: Updated the following 2 configmaps:

  • plugins configmap in namespace kubevirt-prow at cluster default using the following files:
    • key plugins.yaml using file github/ci/prow-deploy/kustom/base/configs/current/plugins/plugins.yaml
  • job-config configmap in namespace kubevirt-prow at cluster default using the following files:
    • key project-infra-postsubmits.yaml using file github/ci/prow-deploy/files/jobs/kubevirt/project-infra/project-infra-postsubmits.yaml

In response to this:

botreview aims to automate reviews that follow simple patterns.

Tracked in #3100

This first implementation can be used as a cli tool, but also has the setup for the deployment to KubeVirt prow. Tested with prow-deploy test setup and phony GitHub events.

Note that the deployment currently has --dry-run=true enabled, since we want to test it's stability gradually.

Implemented review strategies

Review strategies implemented today:

It can also handle mixed PRs, where each change abides by the rules of the strategy.

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.

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants