Skip to content

Commit fdd25b9

Browse files
authored
chore(stackable-devel): Tweak npm+yarn transport settings (#1587)
1 parent 72efe58 commit fdd25b9

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

stackable-devel/stackable/.npmrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1+
# See https://docs.npmjs.com/cli/v12/using-npm/config#registry
12
registry=https://build-repo.stackable.tech/repository/npm-public/
3+
4+
# By default, fetches are retried 2 times. We increase the count slightly to hopefully get less
5+
# failing builds in CI. See https://docs.npmjs.com/cli/v12/using-npm/config#fetch-retries
6+
fetch-retries=5
7+
8+
# 10000 milliseconds (10 seconds) is the default of npm, but we explicitly set it here if this needs
9+
# to be tweaked in the future. See https://docs.npmjs.com/cli/v12/using-npm/config#fetch-retry-mintimeout
10+
fetch-retry-mintimeout=10000
11+
12+
# By default, this factor is 10. The value below is tweaked to result in 5 retries over the span of
13+
# 5 minutes with an initial timeout of 10 seconds. See:
14+
# - https://docs.npmjs.com/cli/v12/using-npm/config#fetch-retry-factor
15+
# - https://github.com/tim-kos/node-retry/blob/master/README.md#retrytimeoutsoptions
16+
# - https://www.wolframalpha.com/input?i=Sum%5B10000*x%5Ek%2C+%7Bk%2C+0%2C+4%7D%5D+%3D+5+*+60+*+1000
17+
fetch-retry-factor=1.97
18+
19+
# 3000000 milliseconds (300 seconds, 5 minutes) is the default of npm, but we explicitly set it here
20+
# if this needs to be tweaked in the future. This value is also used in the factor tweaking above.
21+
# See https://docs.npmjs.com/cli/v12/using-npm/config#fetch-timeout
22+
fetch-timeout=300000
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
npmRegistryServer: "https://build-repo.stackable.tech/repository/npm-public/"
2+
3+
# By default, yarn retries failed HTTP requests after 3 seconds. We increase this to 50 seconds
4+
# to spam the Nexus instance a little less. In combination with the timeout configured below, this
5+
# should result in roughly 5 retries. See https://yarnpkg.com/configuration/yarnrc#httpRetry
6+
httpRetry: 50
7+
8+
# By default, yarn times out after 1 minute. We increase this to 5 minutes to hopefully get less
9+
# failing builds in CI. See https://yarnpkg.com/configuration/yarnrc#httpTimeout
10+
httpTimeout: 5m

0 commit comments

Comments
 (0)