allow new root for tags-unified branch of m-u, m-r, m-b and esrs
Categories
(Developer Services :: Mercurial: hg.mozilla.org, task)
Tracking
(Not tracked)
People
(Reporter: shtrom, Assigned: shtrom)
References
Details
Attachments
(2 files)
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: *** pushing unrelated repository ***
remote:
remote: Changeset acfb15b84578 introduces a new root changeset into this repository. This
remote: almost certainly means you accidentally force pushed to the wrong
remote: repository and/or URL.
remote:
remote: Your push is being rejected because this is almost certainly not what you
remote: intended.
remote: transaction abort!
remote: rollback completed
We should disable the hook on one repo, see what root it pushes, then allow-list that for all and re-enable the hook.
Comment 1•1 year ago
|
||
Can we know the root commit id ahead of time, and just allow-list that?
| Assignee | ||
Comment 2•1 year ago
|
||
I have trimmed the duplicates from the branch, that came from repeatedly processing the tags message and creating the tag in the .hgtags branch (due to https://github.com/glandium/git-cinnabar/issues/354), but then failing to push them leading to the message getting re-processed.
$ git branch -M tags-unified tags-unified-dupes
$ git log tags-unified-dupes
$ git branch tags-unified 812bc458f67642a50b53e882ff46149a6684ef2a
| Assignee | ||
Comment 3•1 year ago
|
||
Can we know the root commit id ahead of time, and just allow-list that?
The dry-run itself didn't work. glandium suggested to force it, but that didn't help.
app@git-hg-sync-worker-0:/clones/firefox$ git -c cinnabar.check=traceback push --dry-run hg::ssh://hg.mozilla.org/releases/mozilla-release/ tags-unified:refs/heads/branches/tags-unified/tip
To hg::ssh://hg.mozilla.org/releases/mozilla-release/
! [remote rejected] tags-unified -> branches/tags-unified/tip (Cannot push to this remote without pulling/updating first)
error: failed to push some refs to 'hg::ssh://hg.mozilla.org/releases/mozilla-release/'
app@git-hg-sync-worker-0:/clones/firefox$ git cinnabar git2hg tags-unified
0000000000000000000000000000000000000000
app@git-hg-sync-worker-0:/clones/firefox$ git -c cinnabar.check=traceback push -f --dry-run hg::ssh://hg.mozilla.org/releases/mozilla-release/ tags-unified:refs/heads/branches/tags-unified/tip
WARNING Pushing a new root
To hg::ssh://hg.mozilla.org/releases/mozilla-release/
* [new branch] tags-unified -> branches/tags-unified/tip
app@git-hg-sync-worker-0:/clones/firefox$ git cinnabar git2hg tags-unified
0000000000000000000000000000000000000000
| Assignee | ||
Comment 4•1 year ago
|
||
We could just push the root to a throw-away repo...
| Assignee | ||
Comment 5•1 year ago
|
||
I disabled the hook for conduit-testing/infra-testing, with this in the mozilla section of its .hg/hgrc.
[mozilla]
...
# Bug 1978262.
check.single_root = disable
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 6•1 year ago
•
|
||
Solution found: -c cinnabar.data=force as per https://github.com/glandium/git-cinnabar?tab=readme-ov-file#avoiding-metadata
So we need
single_roothook disabled-c cinnabar.data=forcefor cinnabar to update the commit IDs--dry-runto not actually push the changes-fto ignore Hg's warning about creating new roots
pp@git-hg-sync-worker-0:/clones/firefox.bug1978262$ git cinnabar git2hg $(git rev-parse tags-unified)
0000000000000000000000000000000000000000
app@git-hg-sync-worker-0:/clones/firefox.bug1978262$ git -c cinnabar.check=traceback -c cinnabar.data=force push --force --dry-run hg::ssh://hg.mozilla.org/conduit-testing/infra-testing tags-unified:refs/heads/branches/tags-unified/tip
WARNING Pushing a new root
Bundling 1 changesets
Bundling 1 manifests
Bundling 1 revisions of 1 files
Updating metadata...
To hg::ssh://hg.mozilla.org/conduit-testing/infra-testing
* [new branch] tags-unified -> branches/tags-unified/tip
Unpacking objects: 100% (21/21), 160.31 KiB | 2.26 MiB/s, done.
app@git-hg-sync-worker-0:/clones/firefox.bug1978262$ git cinnabar git2hg $(git rev-parse tags-unified)
acfb15b84578d7e04524802146c792c8742a95b7
The root to allow-list is acfb15b84578d7e04524802146c792c8742a95b7
| Assignee | ||
Comment 7•1 year ago
•
|
||
Suggestion to proceed:
For each of the repos:
releases/mozilla-betamozilla-centralreleases/mozilla-esr115releases/mozilla-esr128releases/mozilla-esr140releases/mozilla-release
Edit their .hg/hgrc to add the following section, or to it if it's already present:
[allowedroots]
8ba995b74e18334ab3707f27e9eb8f4e37ba3d29 = acfb15b84578d7e04524802146c792c8742a95b7
8ba995b74e18334ab3707f27e9eb8f4e37ba3d29 is the rev 0 changeset of mozilla-unified and other forks
ni: :sheehan for r?
| Assignee | ||
Comment 8•1 year ago
|
||
| Assignee | ||
Comment 9•1 year ago
|
||
Adding allowed_root to system-wide hgrc with ansible instead.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Pushed by omehani@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/a71dcc36e31b
hgssh: add tags-unified root to firefox allowedroots r=sheehan,jcristau
Comment 11•1 year ago
|
||
These were added to hgrc in individual repositories, which cause the global
config to be overridden and ignored. Merge this in so we can clean up
the repo-specific configs (mostly for documentation purposes since these
commits were already pushed at this point).
Comment 12•1 year ago
|
||
Description
•