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 2 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
- lint
- test-mysql
- test-postgres
- test-sqlite
Copy link
Member

Choose a reason for hiding this comment

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

It's a little unclear which names should the contexts use.

This API returns only the job name, with Matrix suffix:

curl -s \
  -H "Authorization: token ${GITHUB_TOKEN}" \
  https://api.github.com/repos/apache/superset/commits/master/check-runs | jq ".check_runs[] | .name"

"test-sqlite (3.7)"
"pre-commit (3.7)"
"Prefer Typescript"
"test-postgres-presto (3.8)"
"test-postgres (3.8)"
"babel-extract (3.7)"
"test-postgres (3.7)"
"lint (3.7)"
"build"
"License Check"
"build"
"test-postgres-hive (3.8)"
"test-postgres-hive (3.7)"
"frontend-check"
"test-mysql (3.7)"
"build"
"babel-extract (3.7)"

Copy link
Member

Choose a reason for hiding this comment

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

@ktmud do you have these actions set up in your fork? If so, can you check the name that appears under the settings tab for the repo?

Copy link
Member

Choose a reason for hiding this comment

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

status-check-names

I'm assuming the API will use the same names as displayed here?

We might want to rename a couple of our jobs to avoid confusion (there are a couple of duplicate "build"s).

I guess the safest route would be to have a very limited list here to override the admin settings, then add them back in a separate PR?

Copy link
Member

Choose a reason for hiding this comment

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

I think those are the names we need to use, though they do look quite different than the names reported on PRs. I don't think the risk here is that high, I doubt committers will be merging PRs with failing status checks (even if they're not actually marked required). We could make and announcement just in case, "You might see some changes to the required checks as we figure things out, please don't merge anything that's failing a check"

Copy link
Member Author

Choose a reason for hiding this comment

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

The docs show them as <Action Name>/<Job Name>:

 contexts:
          - gh-infra/jenkins
          - another/build-that-must-pass

although I realize that the action name was missing in some of the tests when I pulled them in, so I can update that. Looks to me that we would have to provide the action name in order for the duplicated job names to even work.

Copy link
Member

@ktmud ktmud Jan 23, 2021

Choose a reason for hiding this comment

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

I think the risk here is that if you add checks not matching the actual context names as required, everyone will (may) be blocked from merging until INFRA intervenes.

Copy link
Member

Choose a reason for hiding this comment

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

Right, that's a good point. We should probably do this during hours of low activity. Worst case, we revert quickly and none of the check will be required. Without the admin repo privileges we are kind of shooting in the dark though

Copy link
Member Author

Choose a reason for hiding this comment

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

Following on this scenario, do you think all the "blocked" prs would automatically be mergable after we revert this? Do you think there's any risk that we won't be able to unblock them? I think worst case scenario, we should be able to close and open the pr to retrigger the checks, which would just be time consuming.

Copy link
Member

Choose a reason for hiding this comment

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

I think rather than revert we'd want to set the context as empty or remove the ones that end up stuck


required_pull_request_reviews:
dismiss_stale_reviews: true
Copy link
Member

Choose a reason for hiding this comment

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

Do we want this? It might cause some pain, say if a PR is approved but a rebase is needed before merging.

Copy link
Member Author

Choose a reason for hiding this comment

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

good call. updated.

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.