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

Introducing the Override Bot #810

Merged
merged 1 commit into from
Sep 21, 2020
Merged

Conversation

orenc1
Copy link
Collaborator

@orenc1 orenc1 commented Sep 17, 2020

Signed-off-by: orenc1 [email protected]

On first step, the override bot can invoked by commenting /override-bot on any open PR.
Then it will comment /override ci/prow/... for each failed/pending lane that has a parallel passed lane on another cloud provider, for all open PRs in this repository.

Release note:

Override Bot implementation, using github-actions and python.

@ovirt-infra
Copy link

Hello contributor, thanks for submitting a PR for this project!

I am the bot who triggers "standard-CI" builds for this project.
As a security measure, I will not run automated tests on PRs that are not from white-listed contributors.

In order to allow automated tests to run, please ask one of the project maintainers to review the code and then do one of the following:

  1. Type ci test please on this PR to trigger automated tests for it.
  2. Type ci add to whitelist on this PR to trigger automated tests for it and also add you to the contributor white-list so that your future PRs will be tested automatically. ( keep in mind this list might be overwritten if the job XML is refreshed, for permanent whitelisting, please follow Manage kubevirt CR from sdk generated code #3 option )
  3. If you are planning to contribute to more than one project, maybe it's better to ask them to add you to the project organization, so you'll be able to run tests for all the organization's projects.

@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/L labels Sep 17, 2020
@orenc1 orenc1 changed the title introducing override bot wip: introducing override bot Sep 17, 2020
@kubevirt-bot kubevirt-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 17, 2020
@orenc1 orenc1 changed the title wip: introducing override bot Introducing the Override Bot Sep 17, 2020
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 17, 2020
@orenc1 orenc1 requested review from tiraboschi and removed request for djzager September 17, 2020 14:04
The Bot polls open PRs and finds redundant lanes that can be overridden if the same CI test has been succeeded on another cloud provider.
If such lanes are found, the bot comments the override command for prow.

Signed-off-by: orenc1 <[email protected]>
@orenc1
Copy link
Collaborator Author

orenc1 commented Sep 18, 2020

/retest

1 similar comment
@orenc1
Copy link
Collaborator Author

orenc1 commented Sep 18, 2020

/retest

provider = splitted[-1]
test_name = '-'.join(splitted[:-1])
state = status['state']
overridden = True if status['description'] and 'Overridden' in status['description'] else False
Copy link
Collaborator

@nunnatsa nunnatsa Sep 21, 2020

Choose a reason for hiding this comment

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

A Boolean value is just a result of a Bolean expression. no need to explicitly set True and False; e.g.

overridden = status['description'] and 'Overridden' in status['description']

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for pointing that out. I'll change in a following PR.

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2020
@nunnatsa
Copy link
Collaborator

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nunnatsa

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 Sep 21, 2020
@kubevirt-bot kubevirt-bot merged commit 489fc8b into kubevirt:master Sep 21, 2020
@orenc1 orenc1 deleted the override_bot branch April 25, 2021 11:53
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants