Page MenuHomePhorge

Add GitHub mirror to list of known mirrors
ClosedPublic

Authored by avivey on Apr 7 2023, 10:49.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 14:53
Unknown Object (File)
Thu, Apr 11, 01:05
Unknown Object (File)
Mon, Apr 8, 03:40
Unknown Object (File)
Fri, Apr 5, 17:04
Unknown Object (File)
Mon, Apr 1, 04:08
Unknown Object (File)
Mon, Apr 1, 01:11
Unknown Object (File)
Mon, Apr 1, 01:11
Unknown Object (File)
Mon, Apr 1, 01:11

Details

Summary

Ref T15046

Test Plan

Clone phorge from github mirror, visit /config/, see correct branch-point in Version Information

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avivey requested review of this revision.Apr 7 2023, 10:49
valerio.bozzolan retitled this revision from Add Github mirror to list of known mirrors to Add GitHub mirror to list of known mirrors.Apr 7 2023, 13:59

Honestly I cannot test since - in both cases - in my local installation that section is just empty:

Phorge empty Version information.png (164×481 px, 10 KB)

Any tip?

Honestly I cannot test since - in both cases - in my local installation that section is just empty:

Phorge empty Version information.png (164×481 px, 10 KB)

Any tip?

maybe we need to add some logs here for debugging, I had a hard time testing it myself.

It runs git remote -v to find the remotes, and then checks each one against this whitelist.
It picks either origin or the first matching remote, and runs git merge-base HEAD <remote>/master.

If any of that fails, it produces nothing.

It's possible that these commands will fail due to the www user not having access to read the config (in newer git clients - unsafe repository?).

There's similar code in the exception handling code - do you get git information in exceptions?

In D25115#3728, @avivey wrote:

Honestly I cannot test since - in both cases - in my local installation that section is just empty

maybe we need to add some logs here for debugging, I had a hard time testing it myself.

Thank you for this useful and totally correct stuff.

Let's move these discussions here:

T15242: /config/ can run git log commands that silently fail ("fatal: detected dubious ownership in repository at ....")
T15243: The /config/ page should log git errors instead of silently ignore them

About this change, thank you and green light for me. Tested successfully.

This revision is now accepted and ready to land.Apr 8 2023, 22:02