Closed
Bug 1340440
Opened 9 years ago
Closed 9 years ago
Add a hook to reject changes to sync-messages.json without review from a IPC peer
Categories
(Developer Services :: Mercurial: hg.mozilla.org, defect)
Developer Services
Mercurial: hg.mozilla.org
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: kanru, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 4 obsolete files)
|
12.04 KB,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
Once bug 1336919 lands we will want to reject such changes from the hg hook. We could extend the webidl hook or just copy and modify that to our needs.
| Assignee | ||
Comment 1•9 years ago
|
||
I wrote a patch for this. Unfortunately <http://mozilla-version-control-tools.readthedocs.io/en/latest/devguide/environment.html#devguide-create-env> fails for me so I can't really run the tests. I had to leave the changeset IDs in the test as xxx and hope that it passes. :-)
Assignee: nobody → ehsan
| Assignee | ||
Comment 2•9 years ago
|
||
glob, do you mind please running the tests to see what happens, and give me the changeset sha1 that the test would expect? Thanks!
Attachment #8838802 -
Flags: review?(glob)
Comment on attachment 8838802 [details] [diff] [review]
Extend the WebIDL hook to also check for review requirements on sync-messages.ini
Review of attachment 8838802 [details] [diff] [review]:
-----------------------------------------------------------------
for now i'd prefer if this hook wasn't renamed as renaming a hook requires editing all the relevant hgrc files at the same time the code lands.
can you keep it as prevent_webidl_changes.py, and file a follow-up bug to rename it to prevent_unreviewed_changes.py.
i'll chat with gps about the best way to do that without causing disruption upon his return.
i'll attach a diff of the test results.
::: hghooks/mozhghooks/prevent_unreviewed_changes.py
@@ +146,5 @@
> + if file.endswith('.webidl'):
> + webidlReviewed = search(DOM_authors, DOM_peers)
> + if not webidlReviewed:
> + error += "WebIDL file %s altered in changeset %s without DOM peer review\n" % (file, short(c.node()))
> + note = "\nChanges to WebIDL files in this repo require review from a DOM peer in the form of r=...\nThis is to ensure that we behave responsibly with exposing new Web APIs. We appreciate your understanding..\n"
the indentation is wrong here, and in the next block
Attachment #8838802 -
Flags: review?(glob) → review-
| Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8839734 -
Flags: review?(glob)
| Assignee | ||
Updated•9 years ago
|
Attachment #8838802 -
Attachment is obsolete: true
| Assignee | ||
Updated•9 years ago
|
Attachment #8839036 -
Attachment is obsolete: true
| Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8839735 -
Flags: review?(glob)
| Assignee | ||
Updated•9 years ago
|
Attachment #8839734 -
Attachment is obsolete: true
Attachment #8839734 -
Flags: review?(glob)
Comment on attachment 8839735 [details] [diff] [review]
Extend the WebIDL hook to also check for review requirements on sync-messages.ini
Review of attachment 8839735 [details] [diff] [review]:
-----------------------------------------------------------------
::: hghooks/tests/test-prevent-webidl.t
@@ +1,5 @@
> $ hg init server
> $ cd server
> $ cat >> .hg/hgrc << EOF
> > [hooks]
> + > pretxnchangegroup.prevent_unreviewed = python:mozhghooks.prevent_unreviewed_changes.hook
oops - looks like you forgot to revert the hook name changes in the test.
Attachment #8839735 -
Flags: review?(glob) → review-
| Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8839932 -
Flags: review?(glob)
| Assignee | ||
Updated•9 years ago
|
Attachment #8839735 -
Attachment is obsolete: true
Comment on attachment 8839932 [details] [diff] [review]
Extend the WebIDL hook to also check for review requirements on sync-messages.ini
Review of attachment 8839932 [details] [diff] [review]:
-----------------------------------------------------------------
r=glob
Attachment #8839932 -
Flags: review?(glob) → review+
| Assignee | ||
Comment 10•9 years ago
|
||
Thanks for the review! How should I get this deployed these days?
Flags: needinfo?(glob)
Comment 11•9 years ago
|
||
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/77618d43e04e
Extend the WebIDL hook to also check for review requirements on sync-messages.ini; r=glob
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 12•9 years ago
|
||
i should be able to deploy this early next week.
| Assignee | ||
Comment 13•9 years ago
|
||
Thanks!
You need to log in
before you can comment on or make changes to this bug.
Description
•