Skip to content

Commit

Permalink
fix: extend timeout length from 2 minutes to 5 minutes for npm install (
Browse files Browse the repository at this point in the history
#8297)

* extend timeout length from 2 minutes to 5 minuetus for npm install during build

* extract timeout to var
  • Loading branch information
benbrown committed Jul 8, 2021
1 parent e75e02a commit d9bc42f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extensions/runtimes/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { IFileStorage } from './interface';
const execAsync = promisify(exec);
const removeDirAndFiles = promisify(rimraf);

const execTimeout = 5 * 60 * 1000; // timeout after 5 minutes

/**
* Used to set values for Azure Functions runtime environment variables
* This is used to set the "sensitive values" when using Azure Functions
Expand Down Expand Up @@ -325,7 +327,7 @@ export default async (composer: any): Promise<void> => {
// install dev dependencies in production, make sure typescript is installed
const { stderr: installErr } = await execAsync('npm install && npm install --only=dev', {
cwd: runtimePath,
timeout: 120000,
timeout: execTimeout,
});
if (installErr) {
// in order to not throw warning, we just log all warning and error message
Expand Down Expand Up @@ -398,7 +400,7 @@ export default async (composer: any): Promise<void> => {
// install dev dependencies in production, make sure typescript is installed
const { stderr: installErr } = await execAsync('npm install && npm install --only=dev', {
cwd: runtimePath,
timeout: 120000,
timeout: execTimeout,
});
if (installErr) {
// in order to not throw warning, we just log all warning and error message
Expand Down

0 comments on commit d9bc42f

Please sign in to comment.