Page MenuHomePhabricator

Consolidate binary (hg, git, svn) analysis code into one place
ClosedPublic

Authored by epriestley on Jul 31 2017, 7:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 30, 9:35 AM
Unknown Object (File)
Mon, Jan 27, 2:59 AM
Unknown Object (File)
Sun, Jan 26, 2:02 PM
Unknown Object (File)
Fri, Jan 17, 1:13 PM
Unknown Object (File)
Fri, Jan 17, 4:01 AM
Unknown Object (File)
Wed, Jan 15, 11:24 PM
Unknown Object (File)
Tue, Jan 14, 1:27 AM
Unknown Object (File)
Dec 31 2024, 12:06 AM
Subscribers

Details

Summary

Ref T12942. Currently, we have a bunch of code spread out all over the place for doing version tests on hg, svn, and git.

Consolidate this code a bit so we can use it to drive a new section on the "Version Information" page showing the installed versions (and paths) for binaries.

The primary goal is to reduce the support burden a little bit. Two particular issues are:

  • Various stuff with old (or new) VCS binaries, mostly Mercurial.
  • Cases where the webserver sees a different binary than sudoers specifies.

These should be easier to spot with binaries in the version info.

Test Plan

Added unit tests, see also next change. Eventual result is this:

Screen Shot 2017-07-31 at 12.14.42 PM.png (341×777 px, 101 KB)

Diff Detail

Repository
rPHU libphutil
Branch
version1
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/filesystem/binary/PhutilDiffBinaryAnalyzer.php:21XHP14Misuse of `preg_quote`
Unit
Tests Passed
Build Status
Buildable 17855
Build 23984: Run Core Tests
Build 23983: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jul 31 2017, 7:29 PM

Also Pygmentize and nodejs?

Also, what happens if different servers in the cluster have different versions of git?

  • Support pygmentize.
  • Node is a whole separate mess, and not something we execute from the web, so skip it for now.

Also, what happens if different servers in the cluster have different versions of git?

In theory, we could enumerate every device assigned to a repository service in Almanac and query all of them for binary versions and paths to detect this. I'm inclined to wait until this actually happens before pursuing it, though.

This revision was automatically updated to reflect the committed changes.