[rush] new "Build cache is only supported if running in a Git repository" error thrown on CI after Rush upgrade
benkeen opened this issue · 1 comments
benkeen commented
Summary
We updated to Rush 5.109.1 yesterday, from 5.88.2. Since then, one of our CI pipelines has been throwing the following error on the rush build
command (this is with --debug
added):
Executing a maximum of 16 simultaneous processes...
Error: Error: Build cache is only supported if running in a Git repository. Either disable the build cache or run Rush in a Git repository.
at _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Async.forEachAsync.concurrency (/vsts/_work/1/s/common/temp/install-run/@microsoft+rush@5.109.1/node_modules/@microsoft/rush-lib/dist/commons.js:17752:27)
rush build - Errors! (0.05 seconds)
Error: An error occurred.
at PhasedScriptAction._executeOperations (/vsts/_work/1/s/common/temp/install-run/@microsoft+rush@5.109.1/node_modules/@microsoft/rush-lib/dist/commons.js:11102:19)
at async PhasedScriptAction._runInitialPhases (/vsts/_work/1/s/common/temp/install-run/@microsoft+rush@5.109.1/node_modules/@microsoft/rush-lib/dist/commons.js:10872:9)
at async PhasedScriptAction.runAsync (/vsts/_work/1/s/common/temp/install-run/@microsoft+rush@5.109.1/node_modules/@microsoft/rush-lib/dist/commons.js:10848:13)
at async RushCommandLineParser.onExecute (/vsts/_work/1/s/common/temp/install-run/@microsoft+rush@5.109.1/node_modules/@rushstack/ts-command-line/lib/providers/CommandLineParser.js:228:13)
at async RushCommandLineParser._wrapOnExecuteAsync (/vsts/_work/1/s/common/temp/install-run/@microsoft+rush@5.109.1/node_modules/@microsoft/rush-lib/dist/commons.js:5431:9)
at async RushCommandLineParser.onExecute (/vsts/_work/1/s/common/temp/install-run/@microsoft+rush@5.109.1/node_modules/@microsoft/rush-lib/dist/commons.js:5411:13)
at async RushCommandLineParser.execute (/vsts/_work/1/s/common/temp/install-run/@microsoft+rush@5.109.1/node_modules/@rushstack/ts-command-line/lib/providers/CommandLineParser.js:101:13)
at async RushCommandLineParser.execute (/vsts/_work/1/s/common/temp/install-run/@microsoft+rush@5.109.1/node_modules/@microsoft/rush-lib/dist/commons.js:5397:16)
Repro steps
Currently only occurs on a single one of our pipelines. All the others work fine. No devs have complained about their local machines.
Details
- I see this particular error message was added recently with the following cobuild PR on Aug 31st.
- I attempted to temporarily mitigate the problem by disabling the cache but the same error still occurs. [N.B. I tried multiple different ways through ENV vars, but also explicitly setting
buildCacheEnabled
to false in build-cache.json]
Standard questions
Any tips on how to debug this or information I could supply that would help?
Question | Answer |
---|---|
@microsoft/rush globally installed version? |
N/A |
rushVersion from rush.json? |
5.109.1 |
useWorkspaces from rush.json? |
Not defined |
Operating system? | Linux (I think) |
Would you consider contributing a PR? | Sure |
Node.js version (node -v )? |
18.17.1 |
benkeen commented
Never mind, apologies. We were doing something wild and woolly on that particular pipeline and copying the checked out repo into a separate folder. That was failing to copy over hidden files + this problem appeared after the Rush upgrade. (Amazing it worked before, quite frankly).