Closed
Bug 1399918
Opened 8 years ago
Closed 8 years ago
mozharness vcstools should allow for default-push path when using hg
Categories
(Release Engineering :: Release Automation, defect, P2)
Release Engineering
Release Automation
Tracking
(firefox59 fixed)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox59 | --- | fixed |
People
(Reporter: sfraser, Assigned: jlorenzo)
References
Details
(Whiteboard: [releaseduty])
Attachments
(1 file)
At the moment during merge day tasks we're often cloning mercurial repositories using ssh:
https://dxr.mozilla.org/mozilla-central/rev/f9a5e9ed62103c84e4cde915f4d08f1ce71be83e/testing/mozharness/configs/merge_day/beta_to_release.py#45-46
Mercurial allows us to specify a default-push path, so we could clone over https have an hgrc file like this:
[paths]
default = https://hg.mozilla.org/releases/mozilla-beta
default-push = ssh://hg.mozilla.org/releases/mozilla-beta
Only pushes will use ssh, and pulls will use https, as recommended.
This would require an extra field to be supported, listing any extra paths to be added in https://dxr.mozilla.org/mozilla-central/rev/f9a5e9ed62103c84e4cde915f4d08f1ce71be83e/testing/mozharness/mozharness/base/vcs/mercurial.py#332 and some modification to the hgrc file (looks like it might be compatible with configparser/ConfigParser? Safer if so)
Comment 2•8 years ago
|
||
Might be too late for this cycle, but ...
Presumably the goal here is a fast https clone via a bundle, while maintaining ssh for the push. If the config was switched to https then the destination for the push can be passed on the command line without needing to set up an hgrc. And MercurialRepoManipulationMixin already supports a push_dest in the config,
https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/mozharness/mozilla/repo_manipulation.py#151
so something like this:
diff --git a/testing/mozharness/configs/merge_day/beta_to_release.py b/testing/mozharness/configs/merge_day/beta_to_release.py
--- a/testing/mozharness/configs/merge_day/beta_to_release.py
+++ b/testing/mozharness/configs/merge_day/beta_to_release.py
@@ -34,6 +34,7 @@ config = {
"tools_repo_url": "https://hg.mozilla.org/build/tools",
"tools_repo_branch": "default",
- "from_repo_url": "ssh://hg.mozilla.org/releases/mozilla-beta",
- "to_repo_url": "ssh://hg.mozilla.org/releases/mozilla-release",
+ "from_repo_url": "https://hg.mozilla.org/releases/mozilla-beta",
+ "to_repo_url": "https://hg.mozilla.org/releases/mozilla-release",
+ "push_dest": "ssh://hg.mozilla.org/releases/mozilla-release",
"base_tag": "FIREFOX_RELEASE_%(major_version)s_BASE",
Comment 3•8 years ago
|
||
Ah, but that won't work because we're pushing to more than one repo - a tag into 'from', all the history into 'to'.
| Assignee | ||
Comment 4•8 years ago
|
||
Yesterday was mergeday. For the record, I manually edited $repo/.hg/hgrc, just like sfraser pointed out in comment 0. I had introduced a few errors (bad copy and paste). I also needed to edit ~ubuntu/.ssh/config to get the correct username:
> Host hg.mozilla.org git.mozilla.org
> User jlorenzo@mozilla.com
> Compression yes
> ServerAliveInterval 300
Also, kmoir had defined .hgrc, which I completed:
> [ui]
> #ssh = ssh -C -i ~/.ssh/kmoir_rsa.pub
> ssh = ssh -C -i ~/.ssh/jlorenzo_rsa.pub
>
> [extensions]
> strip =
(The strip extension is handy in case one push goes wrong). Thanks to that config, I was able to pull from https and push via ssh.
[1] https://github.com/mozilla/releasewarrior/blob/108bd1ff0a5840a412500efa95ee1a9b8a996a6b/how-tos/merge-and-staging-instance.md
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jlorenzo
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 7•8 years ago
|
||
For the record, this patch is not needed for Firefox 57. The review requests can happen after 57 is shipped.
| Reporter | ||
Comment 8•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8926856 [details]
Bug 1399918 - mozharness vcstools should allow for default-push path when using hg
https://reviewboard.mozilla.org/r/198104/#review203350
Looks good to me - the use of ConfigParser is great. It should be easily caught when the python3 compatibility work catches up, too.
Attachment #8926856 -
Flags: review?(sfraser) → review+
Comment 9•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8926856 [details]
Bug 1399918 - mozharness vcstools should allow for default-push path when using hg
https://reviewboard.mozilla.org/r/198104/#review203516
Attachment #8926856 -
Flags: review?(nthomas) → review+
Comment 10•8 years ago
|
||
Pushed by jlorenzo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/edef5e008fe5
mozharness vcstools should allow for default-push path when using hg r=nthomas,sfraser
Comment 11•8 years ago
|
||
| bugherder | ||
Updated•7 years ago
|
Whiteboard: [releaseduty]
You need to log in
before you can comment on or make changes to this bug.
Description
•