[meta] Implement Mercurial commit hook checks in Lando
Categories
(Conduit :: Lando, enhancement)
Tracking
(Not tracked)
People
(Reporter: sheehan, Assigned: sheehan)
References
(Depends on 2 open bugs, Blocks 2 open bugs)
Details
(Keywords: meta)
Lando commit hooks
As part of the hg->git migration we will need to re-implement our Mercurial commit checks in Lando.
Hooks to port
Treeclosure hook(completed as bug 1771695, migrate all of Treestatus into Lando).Commit message check (various commit message structure validation checks)(completed as bug 1902545).Prevent NSPR NSS changes (block direct updates to vendored libraries NSPR and NSS).(completed as bug 1903456).- Merge day (assert the merge day push doesn't contain unexpected changes).
Prevent cross-channel messages (block lines withEdit: Can be dropped according to flod.X-Channel-
in commit message, TBD).- Check bug references (block commit messages referencing non-public bugs from try).
Prevent symlinks. (completed as bug 1895762)Prevent WPTSync changes (block changes to files outside of testing/web-platform by the wptsync bot).(completed as bug 1903130).Try task config (block try's(completed as bug 1895931).try_task_config.json
from landing outside of try)
Hooks to convert to Herald rule
Prevent sync IPC changes (block changes tosync-messages.init
without IPC peer review).- Prevent WedIDL changes (block changes to WebIDL files without DOM peer review).
New checks to add
Prevent Git submodules.(completed as bug 1903462)
Assignee | ||
Comment 1•9 months ago
|
||
Looks like we already have H279 to check for sync-messages.init
changes.
Assignee | ||
Comment 2•8 months ago
|
||
For completeness, these are the hooks we intend to deprecate/not carry forward into Lando, with reasoning as to why:
Hooks to deprecate
- push_printurls: Print URLs to Treeherder, hgweb on push. No longer required since direct pushing is not supported, URLs will be sent in emails and elsewhere.
- prevent_bookmarks: Prevent pushing bookmarks to the repositories. No longer required since direct pushing will be disabled, bookmarks are an hg-only feature, and the equivalent (git branches) will be managed via Github.
- single_head_per_branch: Enforce a single head commit per Mercurial branch. Git branches can only point to a single commit by definition, so this is no longer required.
- advertise_upgrade: Display a message when the Mercurial version on the client is sufficiently old. No longer required since we are moving to Git.
- single_root: Block multiple repository roots. No longer required as we can disable this in Git.
- try_warning: Print a warning when patches are pushed to try that will not schedule any jobs. Not required as we can warn on the client side.
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Comment 3•5 months ago
|
||
I did some experimenting with Herald rules, and confirmed that the "Add each time the rule matches" specifier for Herald actions does cause the review to be re-applied immediately upon removal. We should be able to convert hooks to Herald rules such that they are enforced by Lando before landing.
Comment 5•2 months ago
|
||
Hi Connor, I noticed that the WebIDL task doesn't have a bug yet. Is that still planned or was it work incorporated in some other issue? If it's still planned can you file the bug? Thanks!
Assignee | ||
Comment 6•2 months ago
|
||
We just need to tweak the existing Herald rule, no need for a bug. :)
Comment 7•1 month ago
|
||
Just checking, is this meant to block or be blocked by bug 1920087?
Assignee | ||
Comment 8•1 month ago
|
||
It blocks that bug, since we will be fixing it after this bug is resolved. :)
Description
•