From 8a2f4fb1e157ffc664747f652e053f18065f18e9 Mon Sep 17 00:00:00 2001 From: Daniel Bartholomae <3396992+dbartholomae@users.noreply.github.com> Date: Sun, 26 Jun 2022 14:13:57 +0200 Subject: [PATCH 1/2] Reduce default number of max install attempts to 1 Nowadays, most of the time when an install fails, it is due to a reason that won't be solved by just rerunning, but needs to be fixed by the dev. --- .../src/cli/test/__snapshots__/CommandLineHelp.test.ts.snap | 4 ++-- libraries/rush-lib/src/logic/RushConstants.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/rush-lib/src/cli/test/__snapshots__/CommandLineHelp.test.ts.snap b/libraries/rush-lib/src/cli/test/__snapshots__/CommandLineHelp.test.ts.snap index 1c17b6abbc..96e58e0ec5 100644 --- a/libraries/rush-lib/src/cli/test/__snapshots__/CommandLineHelp.test.ts.snap +++ b/libraries/rush-lib/src/cli/test/__snapshots__/CommandLineHelp.test.ts.snap @@ -589,7 +589,7 @@ Optional arguments: a file when using this command. --max-install-attempts NUMBER Overrides the default maximum number of install - attempts. The default value is 3. + attempts. The default value is 1. --ignore-hooks Skips execution of the \\"eventHooks\\" scripts defined in rush.json. Make sure you know what you are skipping. @@ -1135,7 +1135,7 @@ Optional arguments: a file when using this command. --max-install-attempts NUMBER Overrides the default maximum number of install - attempts. The default value is 3. + attempts. The default value is 1. --ignore-hooks Skips execution of the \\"eventHooks\\" scripts defined in rush.json. Make sure you know what you are skipping. diff --git a/libraries/rush-lib/src/logic/RushConstants.ts b/libraries/rush-lib/src/logic/RushConstants.ts index 2b0152be29..92e4acdb4d 100644 --- a/libraries/rush-lib/src/logic/RushConstants.ts +++ b/libraries/rush-lib/src/logic/RushConstants.ts @@ -73,7 +73,7 @@ export class RushConstants { /** * Number of installation attempts */ - public static readonly defaultMaxInstallAttempts: number = 3; + public static readonly defaultMaxInstallAttempts: number = 1; /** * The filename ("pnpm-lock.yaml") used to store an installation plan for the PNPM package manger From f045fa288fb585918cfd70c148cc2dbfb288622b Mon Sep 17 00:00:00 2001 From: Daniel Bartholomae <3396992+dbartholomae@users.noreply.github.com> Date: Sun, 26 Jun 2022 14:16:29 +0200 Subject: [PATCH 2/2] Add changelog --- ...ult_max-install-attempts_to_1_2022-06-26-12-16.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@microsoft/rush/set_default_max-install-attempts_to_1_2022-06-26-12-16.json diff --git a/common/changes/@microsoft/rush/set_default_max-install-attempts_to_1_2022-06-26-12-16.json b/common/changes/@microsoft/rush/set_default_max-install-attempts_to_1_2022-06-26-12-16.json new file mode 100644 index 0000000000..29f6c4969b --- /dev/null +++ b/common/changes/@microsoft/rush/set_default_max-install-attempts_to_1_2022-06-26-12-16.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Reduce default maxInstallAttempts to 1", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file