Page MenuHomePhabricator

Warn when 'git-http-backend' is not on the PATH.
ClosedPublic

Authored by hach-que on Nov 4 2013, 7:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 7:21 PM
Unknown Object (File)
Thu, Apr 4, 8:07 PM
Unknown Object (File)
Apr 3 2024, 7:05 AM
Unknown Object (File)
Mar 28 2024, 12:10 PM
Unknown Object (File)
Mar 23 2024, 9:47 PM
Unknown Object (File)
Mar 13 2024, 9:54 PM
Unknown Object (File)
Mar 12 2024, 5:50 PM
Unknown Object (File)
Feb 4 2024, 4:41 AM

Details

Summary

Currently if 'git-http-backend' is not on the PATH, there is no visible message to the user other than "info/refs: is this a valid git repository?" when trying to clone. This adds a setup check so that if there are any Git repositories in use, it will check for the existance of the "git-http-backend" binary in the PATH.

I believe this is shipped by default alongside the git package on most distros, but in some (such as OpenSUSE), this binary isn't on the PATH by default.

Test Plan

Removed /usr/lib/git from my environment.append-paths and saw the message appear. Added it back and the message went away.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

src/applications/config/check/PhabricatorSetupCheckBinaries.php
151 ↗(On Diff #16873)

This makes the additional information a bit more visible on the issue page.

We also need git-receive-pack (git ssh), git-upload-pack (git ssh), svnserve (any svn hosting?) and svnadmin (any svn hosting). For Mercurial, apparently hg is sufficient in all cases. (We could possibly rewrite the git-*-pack commands we receive over SSH to git *-pack, but I'm slightly hesitant about that.)

With this approach, I'm worried that it will be somewhat overwhelming and not actually as useful as it could be:

  • We'll potentially warn you about a lot of binaries you don't actually need, since we don't check if these repositories are hosted.
  • Whether we check if the repositories are hosted or not, this message probably comes too late. It generally will show up only after the next restart, so users without these binaries will probably hit "configure repo" -> "it doesn't work" -> "no clue how to proceed" without seeing this.

Instead, what do you think about moving this check to DiffusionRepositoryEditMainController::buildRepositoryStatus()? It could check for exactly the binaries that the repository needs based on whether it is hosted or not, and present the information to the user at a relevant time.

That's probably a better option.

I've always liked the idea of caching / storing exceptions that happen "behind-the-scenes" and then displaying a yellow bar to Administrators that exceptions have occurred. We could even use this to display exceptions in daemons out to Administrators so that they are aware that exceptions are occurring.

hach-que updated this revision to Unknown Object (????).Nov 4 2013, 11:00 PM

Move binary checks onto DiffusionRepositoryEditMainController

epriestley closed this revision.

Closed by commit rP10659ece8e2d (authored by @hach-que, committed by @epriestley).