From 242d7dda46221da729154dcf7955cdc0ca71b6ee Mon Sep 17 00:00:00 2001 From: Chad Carlson Date: Mon, 24 Jun 2024 12:56:09 -0400 Subject: [PATCH] Restore single runtime image (#309) * Restore single runtime image * Revert nodejs test versions * Update requirements.txt * Fix npm audit. * typo quote. * Remove ref * Update project.yaml * Disk now appears to be required. * Fix vulnerabilities. * knew it. --- .github/workflows/project.yaml | 2 +- .github/workflows/test.yaml | 2 +- .upsun/config.yaml | 6 +-- backend/requirements.txt | 6 +-- frontend/package-lock.json | 99 +++++++++++++++++++++++++++------- frontend/src/commands.json | 8 +-- 6 files changed, 91 insertions(+), 32 deletions(-) diff --git a/.github/workflows/project.yaml b/.github/workflows/project.yaml index 3af4308b..eb923c18 100644 --- a/.github/workflows/project.yaml +++ b/.github/workflows/project.yaml @@ -14,7 +14,7 @@ env: UPSUN_CLI_NO_INTERACTION: 1 UPSUN_CLI_TOKEN: ${{secrets.DEVREL_USER_UPSUN_TOKEN}} - PHP_VERSION: '8.2' + PHP_VERSION: '8.3' UPSUN_HOST_REGION: "ca-1" UPSUN_HOST_SUFFIX: "platform.sh" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 47180066..a117101a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,7 +18,7 @@ jobs: matrix: # These versions match Upsun support # Node.js: https://docs.upsun.com/languages/nodejs.html#supported-versions - node-version: [18.x, 20.x, 22.x] + node-version: [18.x, 20.x, 21.x] # Python: https://docs.upsun.com/languages/python.html#supported-versions python-version: ['3.9', '3.10', '3.11', '3.12'] diff --git a/.upsun/config.yaml b/.upsun/config.yaml index 57f9a78c..57d9c6c8 100644 --- a/.upsun/config.yaml +++ b/.upsun/config.yaml @@ -9,8 +9,7 @@ applications: source: root: "frontend" - stack: - - "nodejs@22" + type: "nodejs:18" variables: env: @@ -49,8 +48,7 @@ applications: source: root: "backend" - stack: - - "python@3.12" + type: "python:3.12" hooks: build: | diff --git a/backend/requirements.txt b/backend/requirements.txt index d9f601e8..79f6cfc5 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -32,13 +32,13 @@ Pygments==2.17.2 pyparsing==3.1.1 python-dotenv==1.0.1 redis==4.5.4 -requests==2.31.0 +requests==2.32.0 rich==13.7.0 six==1.16.0 sortedcontainers==2.4.0 toml==0.10.2 -urllib3==2.1.0 +urllib3==2.2.2 webencodings==0.5.1 Werkzeug==3.0.3 pylint==3.0.3 -black==24.4.0 \ No newline at end of file +black==24.4.0 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 786921ab..357c289d 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1233,6 +1233,17 @@ "set-function-name": "^2.0.1" } }, + "node_modules/@jest/core/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -5987,6 +5998,18 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/static-eval/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/@types/bonjour": { "version": "3.5.13", "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", @@ -7494,9 +7517,9 @@ } }, "node_modules/mini-css-extract-plugin/node_modules/ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -8209,6 +8232,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/@jest/reporters/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/workbox-build/node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -8475,9 +8506,9 @@ "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" }, "node_modules/eslint-webpack-plugin/node_modules/ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -9170,6 +9201,17 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/postcss-svgo/node_modules/csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dependencies": { + "css-tree": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", @@ -9193,6 +9235,14 @@ "node": ">=8" } }, + "node_modules/@jest/core/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/postcss-loader/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -11180,9 +11230,9 @@ } }, "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { "node": ">=10.0.0" }, @@ -14439,9 +14489,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -15134,6 +15184,17 @@ "node": ">=8" } }, + "node_modules/@jest/reporters/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -17617,11 +17678,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -19446,9 +19507,9 @@ ] }, "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "engines": { "node": ">=8.3.0" }, diff --git a/frontend/src/commands.json b/frontend/src/commands.json index 9e4ab5e7..6f94fa11 100644 --- a/frontend/src/commands.json +++ b/frontend/src/commands.json @@ -39,20 +39,20 @@ "merge_production": { "user": { "merge": "upsun merge staging", - "resources_set": "upsun resources:set \\\n\t--count backend:2 \\\n\t--size redis_service:0.5 \\\n\t-e main", + "resources_set": "upsun resources:set \\\n\t--count backend:2 \\\n\t--size redis_service:0.5 \\\n\t--disk backend:0,frontend:0 \\\n\t-e main", "get_url": "upsun url --primary -e main" }, "test": { "merge": "upsun merge $STAGING_BRANCH", - "resources_set": "upsun resources:set \\\n\t--count backend:2 \\\n\t--size redis_service:0.5 \\\n\t-e $DEFAULT_BRANCH" + "resources_set": "upsun resources:set \\\n\t--count backend:2 \\\n\t--size redis_service:0.5 \\\n\t--disk backend:0,frontend:0 \\\n\t-e $DEFAULT_BRANCH" } }, "scale": { "user": { - "resources_set": "upsun resources:set \\\n\t--size redis_service:0.1 \\\n\t-e main" + "resources_set": "upsun resources:set \\\n\t--size redis_service:0.1 \\\n\t--disk backend:0,frontend:0 \\\n\t-e main" }, "test": { - "resources_set": "upsun resources:set \\\n\t--size redis_service:0.1 \\\n\t-e $DEFAULT_BRANCH" + "resources_set": "upsun resources:set \\\n\t--size redis_service:0.1 \\\n\t--disk backend:0,frontend:0 \\\n\t-e $DEFAULT_BRANCH" } }, "complete": {