Closed Bug 1645196 Opened 5 years ago Closed 5 years ago

Teach `mach vcs-setup` to tune git configuration in the same way it tunes hg configuration

Categories

(Firefox Build System :: Bootstrap Configuration, enhancement, P3)

enhancement

Tracking

(firefox80 fixed)

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: nalexander, Assigned: mhentges)

Details

(Keywords: in-triage)

Attachments

(1 file)

I'm evaluating using git for developing on m-c, and there's a great deal of git performance configuration possible -- and possibly required -- to get acceptable performance. There's code to do some tuning but it seems to be tied to cloning and not used to help get developers into the best possible state.

Concurrently, it would be nice if this was expanded. Locally, I've found

  • core.commitGraph
  • core.fsmonitor
  • core.splitIndex
  • core.untrackedCache

seem to make git usable with a fresh clone.

fsmonitor has behaved really poorly on my Mac for me so I'm not sure enforcing it globally makes sense. The rest, sure.

Severity: -- → S4
Keywords: in-triage
Priority: -- → P3

core.commitGraph is enabled by default since git 2.24. The pref itself exists since 2.18. It feels to me we should rely on the default and push people to use a more modern version of git if theirs is too old, like we do for mercurial.

core.untrackedCache had a bug before 2.17, so we probably shouldn't enable it on these older versions.

I tried core.splitIndex at the suggestion of comment 0 and it caused all my builds to unconditionally fail in cargo because it depends on libgit2 which appears to not support splitIndex, so that's probably a no-go :)

What the hell does cargo do with the index?

I guess it's using git (via libgit2) to determine whether crates need to be rebuilt? At least, that's the only thing I can possibly conclude from the error:

 1:52.99 error: failed to determine package fingerprint for build script for geckodriver v0.26.0 (/Users/rickystewart/src/mozilla-unified/testing/geckodriver)
 1:52.99 Caused by:
 1:52.99   failed to determine the most recently modified file in /Users/rickystewart/src/mozilla-unified/testing/geckodriver
 1:52.99 Caused by:
 1:52.99   failed to determine list of files in /Users/rickystewart/src/mozilla-unified/testing/geckodriver
 1:52.99 Caused by:
 1:53.00   failed to open git index at /Users/rickystewart/src/mozilla-unified/.git/
 1:53.00 Caused by:
 1:53.00   unsupported mandatory extension: 'link'; class=Index (10)
 1:53.02 make[4]: *** [force-cargo-program-build] Error 101
 1:53.02 make[3]: *** [testing/geckodriver/target] Error 2

If that's true, that's news to me. I had no idea cargo even knew what git is, beyond calling git init for me when I do cargo init.

Assignee: nobody → mhentges

Based on the above discussion, I'll change vcs-setup to do:

  1. Enable untrackedCache by default
  2. Recommend users use a git version that is at least 2.24 to improve performance

Also adds a warning if a user's git version is older than 2.24

Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d72c64af2c23 Tune git settings to improve performance r=rstewart
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Status: RESOLVED → REOPENED
Flags: needinfo?(mhentges)
Resolution: FIXED → ---
Target Milestone: mozilla80 → ---

The backout didn't help and the tests are still failing. See bug 1651542 comment 14 for details.

Mitchell, feel free to reland your patch.

Sounds good!

Flags: needinfo?(mhentges)
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/422c5c783008 Tune git settings to improve performance r=rstewart
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
No longer regressions: 1651542
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: