Skip to content

Commit

Permalink
Feature/upgrade function extensions (#2028)
Browse files Browse the repository at this point in the history
* [func-consumption] update extensions]

* [func-throttled] update extensions

* [misc] fix scripts to work on linux

* extensions.csproj is no longer required

This also means that $functionRoot/bin and $functionRoot/obj are no longer required, and func extensions install is a no-op as the functions will dynamically download and install the required extensions.

* fix path

* asset version bump

* Mod .gitignore to ignore backup env files
  • Loading branch information
jon-shipley authored Nov 8, 2021
1 parent 4da201c commit 00f9723
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ test-output/*/*
*.log

.env*
*.env

/test-output

Expand Down
2 changes: 1 addition & 1 deletion admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"watch:integration": "yarn jest --watch --coverage=no --config ./tests-integration/jest.integration.config.js"
},
"mtc": {
"assets-version": "e93c2fae4e22b00c9e51494b9880f452"
"assets-version": "41e081a4cc897a5542bd9223d2e114c7"
},
"engines": {
"node": ">= 12"
Expand Down
2 changes: 0 additions & 2 deletions func-consumption/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,3 @@ __pycache__/
*.py[cod]
*$py.class

# azure functions auto generated binding extensions project file
/extensions.csproj
4 changes: 4 additions & 0 deletions func-consumption/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
"X-DNS-Prefetch-Control": "off"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
}
}
2 changes: 1 addition & 1 deletion func-consumption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": ">= 10.14.1"
},
"scripts": {
"build": "yarn sync && yarn run gulp && func extensions install",
"build": "yarn sync && yarn run gulp",
"prod:clean": "rm -rf ./node_modules && yarn install --frozen-lockfile --production",
"rebuild": "yarn clean && yarn build",
"sync": "node ./sync-tslib-deps.js && yarn install",
Expand Down
3 changes: 0 additions & 3 deletions func-throttled/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ csx
.vs
edge
Publish
extensions.csproj

*.user
*.suo
Expand Down Expand Up @@ -45,5 +44,3 @@ __pycache__/
*.py[cod]
*$py.class

# azure functions auto generated binding extensions project file
/extensions.csproj
20 changes: 12 additions & 8 deletions func-throttled/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@
"serviceBus": {
"prefetchCount": 100,
"messageHandlerOptions": {
"autoComplete": true,
"maxConcurrentCalls": 1,
"maxAutoRenewDuration": "00:05:00"
"autoComplete": true,
"maxConcurrentCalls": 1,
"maxAutoRenewDuration": "00:05:00"
},
"sessionHandlerOptions": {
"autoComplete": false,
"messageWaitTimeout": "00:00:30",
"maxAutoRenewDuration": "00:55:00",
"maxConcurrentSessions": 16
"autoComplete": false,
"messageWaitTimeout": "00:00:30",
"maxAutoRenewDuration": "00:55:00",
"maxConcurrentSessions": 16
}
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
}
}
2 changes: 1 addition & 1 deletion func-throttled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": ">= 10.14.1"
},
"scripts": {
"build": "yarn sync && yarn run gulp && func extensions install",
"build": "yarn sync && yarn run gulp",
"prod:clean": "rm -rf ./node_modules && yarn install --frozen-lockfile --production",
"rebuild": "yarn clean && yarn build",
"sync": "node ./sync-tslib-deps.js && yarn install",
Expand Down
2 changes: 1 addition & 1 deletion pupil-spa/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gulp.task('setRuntimeConfigURL', () => {
})

gulp.task('setSecretEnvVars', () => {
return gulp.src('src/public/config.json', { base: './' })
return gulp.src('src/assets/config.json', { base: './' })
.pipe(replace('testPupilConnectionQueueUrlValue', process.env.TEST_PUPIL_CONNECTION_QUEUE_URL || ''))
.pipe(replace('testPupilConnectionQueueTokenValue', process.env.TEST_PUPIL_CONNECTION_QUEUE_TOKEN || ''))
.pipe(gulp.dest('./'))
Expand Down
4 changes: 3 additions & 1 deletion restart.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -e
# Stop and start the MTC infrastructure in a new docker container with a fresh DB and purged queues

echo "Restarting all infrastructure"
scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
${scriptDir}/stop.sh && ${scriptDir}/start.sh
${scriptDir}/stop.sh
${scriptDir}/start.sh
3 changes: 2 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash -eu
#!/usr/bin/env bash
set -eu

scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
currentDir=`pwd`
Expand Down

0 comments on commit 00f9723

Please sign in to comment.