Advertise clonebundles feature to supported clients

RESOLVED FIXED

Status

Developer Services
Mercurial: bundleclone
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: gps, Assigned: gps)

Tracking

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
+++ This bug was initially created as a clone of Bug #1216216 +++

The clonebundles feature in Mercurial 3.6 has server-side support for advertising its existence to clients that don't have it enabled. Due to a bug in Mercurial < 3.6, this feature isn't working on our 3.4/3.5 servers (https://selenic.com/repo/hg/rev/3e7f675628ad).

We should work around the bug somehow so the advertisement is there before we upgrade the servers to 3.6.
(Assignee)

Comment 1

2 years ago
Created attachment 8677329 [details]
MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod

scripts/generate-hg-s3-bundles: support not uploading bundles; r?smacleod

This will be needed for testing.
Attachment #8677329 - Flags: review?(smacleod)
(Assignee)

Comment 2

2 years ago
Created attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

There are two issues preventing clonebundles' built-in advertisements
from working in <3.6 servers:

1) "cbattempted" argument to "getbundle" wire protocol command isn't
    defined, leading the server to drop it.
2) parsing of boolean arguments is incorrect (this was fixed in
   3e7f675628ad)

This patch hacks our vendored copy of clonebundles.py to work around
both these issues. We throw an exception if a 3.6+ server is detected.
This way, we catch accidental usage of our vendored clonebundles.py when
we upgrade hg.mozilla.org to 3.6.

A test checking for proper behavior has been added.
Attachment #8677330 - Flags: review?(smacleod)
Attachment #8677329 - Flags: review?(smacleod) → review+
Comment on attachment 8677329 [details]
MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod

https://reviewboard.mozilla.org/r/22919/#review20455
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

https://reviewboard.mozilla.org/r/22921/#review20461

::: hgserver/clonebundles.py:271
(Diff revision 1)
> +        raise Exception('use built-in clonebundles extension with '
> +                        'Mercurial 3.6+')

It would be nice to have a test that actually triggers this.
Attachment #8677330 - Flags: review?(smacleod)
(Assignee)

Comment 5

2 years ago
Comment on attachment 8677329 [details]
MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod

scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod

This will be needed for testing.
Attachment #8677329 - Attachment description: MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r?smacleod → MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod
(Assignee)

Comment 6

2 years ago
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

There are two issues preventing clonebundles' built-in advertisements
from working in <3.6 servers:

1) "cbattempted" argument to "getbundle" wire protocol command isn't
    defined, leading the server to drop it.
2) parsing of boolean arguments is incorrect (this was fixed in
   3e7f675628ad)

This patch hacks our vendored copy of clonebundles.py to work around
both these issues. We throw an exception if a 3.6+ server is detected.
This way, we catch accidental usage of our vendored clonebundles.py when
we upgrade hg.mozilla.org to 3.6.

A test checking for proper behavior has been added.
Attachment #8677330 - Flags: review?(smacleod)
Attachment #8677330 - Flags: review?(smacleod)
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

https://reviewboard.mozilla.org/r/22921/#review20569

::: hgext/bundleclone/tests/test-clonebundles-compat.t:176
(Diff revision 2)
> +  abort: No module named errors!

This is not the error I was expecting...
(Assignee)

Comment 8

2 years ago
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

There are two issues preventing clonebundles' built-in advertisements
from working in <3.6 servers:

1) "cbattempted" argument to "getbundle" wire protocol command isn't
    defined, leading the server to drop it.
2) parsing of boolean arguments is incorrect (this was fixed in
   3e7f675628ad)

This patch hacks our vendored copy of clonebundles.py to work around
both these issues. We throw an exception if a 3.6+ server is detected.
This way, we catch accidental usage of our vendored clonebundles.py when
we upgrade hg.mozilla.org to 3.6.

A test checking for proper behavior has been added.
Attachment #8677330 - Flags: review?(smacleod)
(Assignee)

Comment 9

2 years ago
https://hg.mozilla.org/hgcustom/version-control-tools/rev/ca2878733e98e6ef188f3ed589b38526304ea42e
clonebundles: make advertisement work with <3.6 servers (bug 1217155); r=smacleod
(Assignee)

Comment 10

2 years ago
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

https://reviewboard.mozilla.org/r/22921/#review20655

This was reviewed by smacleod over IRC.
Attachment #8677330 - Flags: review+
(Assignee)

Comment 11

2 years ago
Deployed.
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Assignee)

Updated

2 years ago
Attachment #8677330 - Flags: review?(smacleod)
You need to log in before you can comment on or make changes to this bug.