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

chore: add required review on master #12694

Merged
merged 6 commits into from
Feb 3, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,24 @@ github:
squash: true
merge: false
rebase: false

protected_branches:
master:
required_status_checks:
# strict means "Require branches to be up to date before merging".
strict: false
# contexts are the names of checks that must pass
contexts:
- Docker/build
- Frontend/build
- PR Lint/check
- E2E/Cypress
- Python Misc/lint
- Python MySQL/test-mysql
- Python MySQL/test-postgres
- Python MySQL/test-sqlite
Copy link
Member Author

Choose a reason for hiding this comment

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

@nytai @ktmud Do we feel comfortable with this list or do we want to use the api response instead?

Copy link
Member

Choose a reason for hiding this comment

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

I found a few other projects using this feature
https://github.com/apache/skywalking-eyes/blob/main/.asf.yaml
https://github.com/apache/skywalking/blob/master/.asf.yaml
https://github.com/apache/skywalking-python/blob/master/.asf.yaml

It seems they're using the portion after the /, which would result in duplicates for us. I think this looks good to me

Copy link
Member

Choose a reason for hiding this comment

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

I suspect if a match isn't found in the list of recent contexts nothing happens

Copy link
Member

Choose a reason for hiding this comment

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

I suspect it will wait for that check forever... Maybe let's add a very short list to override the admin settings first, then gradually add them back?

Copy link
Member

Choose a reason for hiding this comment

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

When you go to settings you can't just enter any string, you have to choose from the list of "status checks found in the last week for this repository". I think it needs to be a context the repo has seen before. Also, here they have build set but no check is marked as required.
https://github.com/apache/skywalking-client-js/blob/04dd6b3b024f838b3b92002a370ce3b7f70638b4/.asf.yaml#L38

Copy link
Member

@nytai nytai Jan 26, 2021

Choose a reason for hiding this comment

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

Although, it may be a good idea to be extra safe here as we may end up in a stuck state waiting for apache infra.

Copy link
Member

@ktmud ktmud Jan 26, 2021

Choose a reason for hiding this comment

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

Tested with a personal fork, now I'm 90% sure GitHub will just be forever waiting for these unidentifiable checks:

API request

settings

random-checks

IMO the safest course of actions is:

  1. Update this PR to include only the simplest check (e.g. "check" for "PR Lint") in the required list, just to override manual admin settings.
  2. Once the CI passes, merge it.
  3. Make another PR to rename the jobs with ambiguous names
  4. Maybe another PR to add other required checks back to the "required" list. Could combine with 3, too.

Copy link
Member Author

@eschutho eschutho Jan 26, 2021

Choose a reason for hiding this comment

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

ah, this is great. @ktmud it looks like three of four of those context strings didn't match any existing checks. Did "build" work and match to Frontend / build?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually based on your other screenshot, I think I should go with the whole string with the space PR Lint / check for example.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the thorough investigation @ktmud. I think you're right, this file is just used to make a request to the github api.


required_pull_request_reviews:
dismiss_stale_reviews: false
require_code_owner_reviews: true
required_approving_review_count: 1
Copy link
Member Author

@eschutho eschutho Jan 22, 2021

Choose a reason for hiding this comment

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

definitely would like a second pair of eyes on all this. I don't think there's a way to test before merging.

Copy link
Member

Choose a reason for hiding this comment

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

The only risk I see is the contexts are not correct. Let's just be ready to fix/revert if needed

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, yeah, I set up: #12698 and will rebase when this lands. We might as well wait until next week, too, to land this.