Closed Bug 1965730 Opened 3 months ago Closed 3 months ago

git commit link from hgmo for tag pushes returns 404 in git

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: CosminS, Assigned: jcristau)

References

Details

Attachments

(1 file)

For all on these tags pushes (treeherder link) the git commit link from hgmo (eg: https://hg-edge.mozilla.org/releases/mozilla-beta/rev/a2718c57d79444d45d35205bddbc56dc0a31ac24) points to https://github.com/mozilla-firefox/firefox/commit/976721f9c2e581b608ed1f1f1afc337c5d826455 that returns a 404.
Same for these mozilla-release pushes.
They should point to the correspondent from here https://github.com/mozilla-firefox/firefox/tags

Component: git-to-hg sync → Mercurial: hg.mozilla.org
Product: Conduit → Developer Services

AIUI git-hg-sync is what populates the mercurial commit extra data, in this case apparently with incorrect information?

Flags: needinfo?(glob)

There's no associated git commit to point to; hgweb will need to special-case these commits and instead point to /tags.

Flags: needinfo?(glob)

That said - if there's no git commit, where did 976721f9c2e581b608ed1f1f1afc337c5d826455 come from?

ni shtrom, as we were speaking about this bug earlier today which resulted in its component change 🙂

Flags: needinfo?(omehani)

The Git commit that adds the tag does exist: it is created by cinnabar, and lives in the working directory in the syncer. If one were to cinnabar-clone the HG repo again, that commit would get recreated. It just doesn't exist in upstream git.

Flags: needinfo?(omehani)

I'm pretty sure this is what we need to do, but I'm unable to run the tests on macOS:

diff --git a/hgtemplates/gitweb_mozilla/changeset.tmpl b/hgtemplates/gitweb_mozilla/changeset.tmpl
--- a/hgtemplates/gitweb_mozilla/changeset.tmpl
+++ b/hgtemplates/gitweb_mozilla/changeset.tmpl
@@ -58,16 +58,17 @@ changeset |
 {ifeq(count(parent), '2', parent%changesetparentdiff, parent%changesetparent)}
 {child%changesetchild}
 <tr><td>push id</td><td>{if(pushid, '<a href="{url|urlescape}pushloghtml?changeset={node}">{pushid}</a>', 'unknown')}</td></tr>
 <tr><td>push user</td><td>{if(pushuser, pushuser|escape, 'unknown')}</td></tr>
 <tr><td>push date</td><td class="date age">{if(pushdate, pushdate|rfc822date, 'unknown')}</td></tr>
 {if(convertsourcepath, '<tr><td>converted from</td><td><a href="{convertsourcepath}/rev/{convertsourcenode}">{convertsourcenode}</a></td></tr>')}
 {if(treeherderrepourl, if(pushhead, '<tr><td>treeherder</td><td>{treeherderrepo|escape}@{pushhead|short} [<a href="{treeherderrepourl}&revision={pushhead}">default view</a>] [<a href="{treeherderrepourl}&revision={pushhead}&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception">failures only]</td></tr>'))}
 {if(perfherderurl, '<tr><td>perfherder</td><td>[<a href="{perfherderurl}&framework=1" target="_blank">talos</a>] [<a href="{perfherderurl}&framework=2" target="_blank">build metrics</a>] [<a href="{perfherderurl}&framework=6" target="_blank">platform microbench</a>] (compared to previous push)</td></tr>')}
-{if(git_repo_url, '<tr><td>git commit</td><td><a href="{git_repo_url}/commit/{git_commit}" target="_blank">{git_commit}</a></td></tr>')}
+{if(git_repo_url, if(startswith("tags-",branch), '', '<tr><td>git commit</td><td><a href="{git_repo_url}/commit/{git_commit}" target="_blank">{git_commit}</a></td></tr>'))}
 {if(reviewers, '<tr><td>reviewers</td><td>{join(reviewers%reviewerlink, ", ")}</td></tr>')}
 {if(bugs, '<tr><td>bugs</td><td>{join(bugs%bughyperlink, ", ")}</td></tr>')}
 {if(milestone, '<tr><td>milestone</td><td>{milestone|escape}</td></tr>')}
 {if(backsoutnodes, '<tr><td>backs out</td><td>{join(backsoutnodes%backedoutnodelink, "<br />")}</td></tr>')}
 {if(have_first_and_last_firefox_releases, '
   <tr><td>first release with</td><td><div>{firefox_releases_first % firefox_release_entry}</div></td></tr>
   <tr><td>last release without</td><td><div>{firefox_releases_last % firefox_release_entry}</div></td></tr>

The synthetic commits created by git-cinnabar for tags don't correspond
to a commit on github.

Assignee: nobody → jcristau
Status: NEW → ASSIGNED

Pushed by jcristau@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/eacdd82f44e2
hgtemplates: don't add git commit link for tags r=sheehan

Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: