Closed Bug 2024589 Opened 8 months ago Closed 6 months ago

adjust the code: searchfox.org/mozilla-central is now redirectiring to searchfox.org/firefox-main/

Categories

(Developer Infrastructure :: Firefox Source Docs: Content, task)

task

Tracking

(firefox152 fixed)

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

Details

Attachments

(3 external files)

No description provided.

not updating /rev/ as the hashes don't match

Attachment #9554805 - Attachment description: Bug 2024589 - adjust the code: searchfox.org/mozilla-central is now redirectiring to searchfox.org/firefox-main/ r?asuth → Bug 2024589 - adjust the code: searchfox.org/mozilla-central is now redirecting to searchfox.org/firefox-main/ r?asuth

(In reply to Sylvestre Ledru [:Sylvestre] from comment #1)

not updating /rev/ as the hashes don't match

Note that the "oldrev" endpoint can be used on the new firefox-main tree if the desire is to avoid references to mozilla-central; this is how we handle the mozilla-central redirect to firefox-main under the hood generically:

print(f'  rewrite ^/{oldtree_name}/rev/(.*)$ /{repo}/oldrev/$1 permanent;')

And the concrete expanded current nginx rewrite rules for m-c to f-m are:

  rewrite ^/mozilla-central/rev/(.*)$ /firefox-main/oldrev/$1 permanent;
  rewrite ^/mozilla-central/commit/(.*)$ /firefox-main/oldcommit/$1 permanent;
  rewrite ^/mozilla-central/diff/(.*)$ /firefox-main/olddiff/$1 permanent;
  rewrite ^/mozilla-central/(.*)$ /firefox-main/$1 permanent;

Those will internally then get redirected at runtime after a dynamic lookup so that the user ends up on a /rev/ page, but currently one would need to script following the oldrev links to pierce them, there's no batch lookup affordance.

The :searchfox: role splits the target on the first : to extract the
source-tree name. When the target is tree/rev/<sha>:path, the role
produced https://searchfox.org/tree/rev/<sha>/source/path, which is
not a valid searchfox URL: pinned-revision URLs do not take a source/
segment.

Detect the /rev/ marker in the source segment and omit source/ in
that case so pinned-revision links render correctly.

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
Pushed by sledru@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/62b1ca8d057b https://hg.mozilla.org/integration/autoland/rev/34f70555ad5a adjust the code: searchfox.org/mozilla-central is now redirecting to searchfox.org/firefox-main/ r=asuth,perftest-reviewers,necko-reviewers,jgraham,webcompat-reviewers,mozperftest-reviewers,geckoview-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,taskgraph-reviewers,releng-reviewers,desktop-theme-reviewers,win-reviewers,translations-reviewers,omc-reviewers,firefox-desktop-core-reviewers ,home-newtab-reviewers,core-sessionstore-reviewers,browser-installer-reviewers,profiles-reviewers,dom-worker-reviewers,geckodriver-reviewers,ai-platform-reviewers,Sasha,niklas,manuel,janerik,bhearsum,valentin,twisniewski,nchevobbe,emcminn,webrtc-reviewers,mjf,handyman,mconley,mossop,ahal,sparky,nrishel,robwu,ohall,dimi,hjones https://github.com/mozilla-firefox/firefox/commit/a2ce5437cef5 https://hg.mozilla.org/integration/autoland/rev/3e62d5b8a498 doc: use the :searchfox: macro r=asuth,perftest-reviewers,necko-reviewers,mozperftest-reviewers,geckoview-reviewers,extension-reviewers,credential-management-reviewers,search-reviewers,releng-reviewers,places-reviewers,profiler-reviewers,win-reviewers,omc-reviewers,urlbar-reviewers,permissions-reviewers,core-sessionstore-reviewers,browser-installer-reviewers,layout-reviewers,dom-worker-reviewers,ai-platform-reviewers,niklas,sthompson,janerik,bhearsum,valentin,dshin,sparky,scunnane,canaltinova,hanna_a,handyman,ahal,farre,jteow,emz,nrishel,ohall,dimi,robwu,emilio

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/59608 for changes under testing/web-platform/tests

Upstream PR merged by moz-wptsync-bot

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: