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

.github: add CODEOWNERS file to implement config review #28249

Merged
merged 6 commits into from
Oct 9, 2021

Conversation

Mini256
Copy link
Member

@Mini256 Mini256 commented Sep 22, 2021

What is changed and how it works?

Proposal: https://internals.tidb.io/t/topic/374/15?u=mini256

What's Changed:

When the PR modifies significant config files, requires domain experts to review them before merging.

How it Works:

Check List

Tests

  • No code

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 22, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bb7133
  • morgo

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Sep 22, 2021
@ti-srebot ti-srebot added the first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. label Sep 22, 2021
@ti-chi-bot ti-chi-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 22, 2021
@tisonkun
Copy link
Contributor

CODEOWNERS mechanism is a bit sick to decide who to request review. I'll create a team for this dedicated purpose. Hopefully it is special enough because we cannot create too much teams to specially handle these cases.

@tisonkun
Copy link
Contributor

@Mini256 tidb-configuraion-reviewer is created. Please confirm that require_code_owner_reviews works well to avoid reworks.

@tisonkun tisonkun requested a review from a team September 22, 2021 06:28
@tisonkun
Copy link
Contributor

For how CODEOWNERS works, you may be interested in https://github.community/t/where-is-the-logic-how-codeowners-works-on-auto-assigning/183421

@Mini256
Copy link
Member Author

Mini256 commented Sep 22, 2021

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 22, 2021
@morgo
Copy link
Contributor

morgo commented Sep 22, 2021

@tisonkun There's a typo in the group name:

- tidb-configuraion-reviewer
+ tidb-configuration-reviewer

@tisonkun
Copy link
Contributor

configuration

Updated.

@Mini256
Copy link
Member Author

Mini256 commented Sep 23, 2021

/run-check_dev_2

@Mini256
Copy link
Member Author

Mini256 commented Sep 23, 2021

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 23, 2021
@tisonkun
Copy link
Contributor

@Mini256 is it ready to merge? is tichi config ready?

ti-chi-bot pushed a commit to ti-community-infra/configs that referenced this pull request Sep 26, 2021
#### Proposal

https://internals.tidb.io/t/topic/374/15?u=mini256

#### Related PR

pingcap/tidb#28249

#### How it works

**Notice**: When this PR is merged, the robot will automatically synchronize the configuration to the branch protection configuration of the GitHub repository.

![image](https://user-images.githubusercontent.com/5086433/134446173-5ac78947-d797-4af5-abf7-26dca6fa1817.png)

We enable the CODEOWNERS to implement our config review mechanism by turning on the `require_code_owner_reviews` option.

But GitHub will require us to enable the `required_approving_review_count` option at the same time, and the minimum value of this option is 1. 

It will require our PR to pass through at least one reviewer with **write permission** before it can be merged. However, our *team reviewer* only has read permission in the repository settings. 

Notice: **After enabling this option, if the PR does not get the approval of at least one committer or maintainer (whose role with write permission) before the committer comments `/merge`, the committer needs to perform an additional approve operation, or GitHub will prompt this.**

![image](https://user-images.githubusercontent.com/5086433/134448367-7ca5db9f-b083-4b88-b9bb-3e634c253579.png)
@Mini256
Copy link
Member Author

Mini256 commented Sep 26, 2021

@Mini256 is it ready to merge? is tichi config ready?

For now, tichi config is ready, the 'require code owners review' config is enabled.

@Mini256
Copy link
Member Author

Mini256 commented Sep 26, 2021

@bb7133, Should this PR cherry-pick to the release branch, to ensure that configuration item modifications need to be reviewed again before merging into the release branch.

@morgo
Copy link
Contributor

morgo commented Sep 27, 2021

@bb7133, Should this PR cherry-pick to the release branch, to ensure that configuration item modifications need to be reviewed again before merging into the release branch.

I don't think we need to cherry pick to the release branch. There is already protection such that cherry-picks need to be approved by a limited set of people.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 27, 2021
@Mini256
Copy link
Member Author

Mini256 commented Sep 28, 2021

/cc @bb7133

PTAL~

@ti-chi-bot ti-chi-bot requested a review from bb7133 September 28, 2021 02:38
@zhouqiang-cl
Copy link
Contributor

ping @bb7133

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Oct 9, 2021
@bb7133
Copy link
Member

bb7133 commented Oct 9, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 2c839f1

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 9, 2021
@ti-chi-bot
Copy link
Member

@Mini256: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot merged commit 6e70be9 into pingcap:master Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants