Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Rework review & locks rules #104

Closed
@mordamax

Description

@mordamax
  • Parity code should in general require 3 Parity people to know it prior to merge. This includes the author, therefore we generally want 2 reviews.
  • Locked code (i.e. code marked with a 🔒) or changes to production runtimes (i.e. Kusama & Polkadot relay and their system parachains) should require 2 senior devs (Fellowship rank >= 4) to know the changes prior to merge. This includes the author, so if the author happens to be a senior dev already then this condition only necessitates one further senior dev review.
  • Any parts of the codebase may also have their own lists of reviewers. These can continue, but individual reviews are allowed to contribute to multiple sub-conditions. It should still be based around "knowers-of-code", which means the author should count towards the requirements.
May 25 Gav: can we ensure that the author is also counted against the number of special reviewers? I.e. where we need 2 reviewers from a particular set, if the author of the PR is in this set, then of the two reviewers, we should only require one of them to be from that set. The point of having these privileged sets is not to hold up the review cycle or increase the reviews requried: it's to ensure particular eyes have seen code changes. It doesn't matter if those eyes saw it in the authoring process or in the review process.

I asked for this a while back but just checking that it has been implemented: the locks system should take into account the initiator of the PR, not just the reviewers.
Also, a review by someone for one subcondition should also contribute to another subcondition.

Upd Jun 18:

i'm having a bit of trouble interpreting the CI log here
i authored the PR, kian reviewed it.
it says 2 reviews are needed for the change to runtime files and that there's only 1: Rule "Runtime files" needs in total 2 DISTINCT approvals, but 1 were given
it mentions kian's username: combinationApprovedByMostPeopleOverall: Map(1) { 'Runtime files[1]' => Set(1) { 'kianenigma' } }
yet the other required reviewers it mentions are all the people in locks-review group excluding me (which kian is not a member of): usersToAskForReview Map(4) { 'andresilva' => { teams: Set(1) { 'locks-review' } }, 'eskimor' => { teams: Set(1) { 'locks-review' } }, 'bkchr' => { teams: Set(1) { 'locks-review' } }, 'rphmeier' => { teams: Set(1) { 'locks-review' } } }
so i don't get it - is the script working properly and figured out that i as the author am a member of locks-review (but just hasn't mentioned it in the dump)?
Gav
ok - definitely seems like it's not doing what i want yet.
seems like it's not allowing reviewers enabling locks-review to pass to count in polkadot-review: Rule "Runtime files" needs in total 2 DISTINCT approvals, but 1 were given. Users whose approvals counted towards one criterion are excluded from other criteria. For example: even if a user belongs multiple teams, their approval will only count towards one of them; or even if a user is referenced in multiple subconditions, their approval will only count towards one subcondition. Subcondition "Runtime files[1]" does not have approval from the following users: andresilva (team: polkadot-review), eskimor (team: polkadot-review), athei (team: polkadot-review), stefan-sopic (team: polkadot-review), ordian (team: polkadot-review), bkchr (team: polkadot-review), rphmeier (team: polkadot-review), sandreim (team: polkadot-review).

This is a utterly bare minimum change to make the system developed actually usable.
I'd also like to see integration into a chat bot so that for PRs which have otherwise enough reviews but are blocked on locks-reviews, the relevant individuals are pinged in chat with a link and request to approve the PR

And with the planned move of the runtimes to the fellowship, we should also alter the locks reviews so that they take into account the fellowship rank via a smoldot query.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions