Roll out prevent_broken_csets hook on mozilla-aurora

RESOLVED FIXED

Status

Developer Services
General
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: Justin Lebar (not reading bugmail), Assigned: bkero)

Tracking

Details

(Reporter)

Description

5 years ago
In bug 843081 I wrote a new hg pretxncommit hook, prevent_broken_csets.py.

https://hg.mozilla.org/hgcustom/hghooks/rev/88aa117ff487

We need to prevent these broken changesets everywhere except tryserver, where they don't matter.

Can you please roll this hook out to our hg servers?  These hooks are somewhat difficult to test locally, and this hook in particular is difficult to test because I haven't figured out how to create one of these busted changesets on demand.  So if we can roll it out gradually, that would be probably be prudent.
(Reporter)

Comment 1

5 years ago
Once we roll out this hook, we'll also need to update the merge docs; see bug 843081 comment 9.
Justin,

Can you pick ONE repo to roll this out to at first. Can we then test this extensively and make sure things don't break before we roll this out everywhere?
(Reporter)

Comment 3

5 years ago
Absolutely.  But I'm not sure which one repository to pick.  We want something that various people commit to, since this hook has to do with different hg versions.  But we don't want something that, if we break things, we'll block lots of people.

Perhaps we should start with mozilla-aurora.  If that looks good, we can move to mozilla-central (which is mostly managed by sheriffs, who can handle things going wrong), and finally to m-i.

Updated

5 years ago
Summary: Roll out prevent_broken_csets hook on all trees except try → Roll out prevent_broken_csets hook on mozilla-aurora
Have you double-checked that qimporting and qfinishing fixes up the changesets?
(Reporter)

Comment 5

5 years ago
(In reply to Siddharth Agarwal [:sid0] from comment #4)
> Have you double-checked that qimporting and qfinishing fixes up the
> changesets?

No, I'd put that pretty far down on my list of possibilities...
(Reporter)

Comment 6

5 years ago
> No, I'd put that pretty far down on my list of possibilities...

Hm, "I'd" is ambiguous.  I meant I /had/, not I /would/.
That's what you suggest doing in the hook, right?
(Reporter)

Comment 8

5 years ago
(In reply to Siddharth Agarwal [:sid0] from comment #7)
> That's what you suggest doing in the hook, right?

Yes, although I suggest doing so after upgrading to 2.5.1, which shouldn't strictly be necessary, but in any case should definitely not have this problem.  A patch file can't even encode the information necessary to cause the bug, right?

Anyway, you are absolutely right, I should test that qimport && qpop works.
Git style patch files do contain copy information.
And merely upgrading to 2.5.1 won't fix broken changesets. You need to actually regenerate them somehow.
(Reporter)

Comment 11

5 years ago
(In reply to Siddharth Agarwal [:sid0] from comment #10)
> And merely upgrading to 2.5.1 won't fix broken changesets. You need to
> actually regenerate them somehow.

Right, but that's what qimport && qfin is for; at least, that was my theory.  Unless, as you fear, the patches could somehow be tainted.
(Reporter)

Comment 12

5 years ago
Looks like you were right, Sid; I needed to qimport && qpop && qpush && qfin.  Otherwise hg doesn't recreate the changeset from the patch.

Thanks for bugging me about this.

I'll update the hook.
(Reporter)

Comment 13

5 years ago
https://hg.mozilla.org/hgcustom/hghooks/rev/bf2b1ae64be3
It would be great if you checked one more thing: whether your instructions work if [diff] git = True is set in .hgrc.
(Reporter)

Comment 15

5 years ago
(In reply to Siddharth Agarwal [:sid0] from comment #14)
> It would be great if you checked one more thing: whether your instructions
> work if [diff] git = True is set in .hgrc.

Yes, that was set last night.
Ben, can we roll this out only to mozilla-aurora? Thanks!
Assignee: server-ops-devservices → bkero
(Assignee)

Comment 17

5 years ago
I've enabled this for mozilla-aurora. Let's see if the universe ends.
(Assignee)

Comment 18

5 years ago
Nobody's reported any horrific failures yet. Closing this out. Let me know in the other bug if you'd like me to roll it out to more repos.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Comment 19

5 years ago
Let's roll it out and see what happens!  I'll file additional bugs.
(Reporter)

Updated

5 years ago
Blocks: 846953
Component: Server Operations: Developer Services → General
Product: mozilla.org → Developer Services
You need to log in before you can comment on or make changes to this bug.