From 5de2113de55c605892ddc836ecd742397c1b3fca Mon Sep 17 00:00:00 2001 From: Chad Carlson Date: Thu, 9 May 2024 10:22:33 -0400 Subject: [PATCH] Match Git 26 changes. (#235) * Match Git 26 changes. * Match detailed endpoints in instructions. * Bump to latest versions of all runtimes. * extend status sleep on each step. * Bump node * Bump pkgs. --- .github/workflows/project.yaml | 12 +++-- .github/workflows/test.yaml | 2 +- .upsun/config.yaml | 19 ++++---- backend/requirements.txt | 6 +-- frontend/package-lock.json | 87 +++++----------------------------- frontend/src/App.tsx | 5 +- 6 files changed, 37 insertions(+), 94 deletions(-) diff --git a/.github/workflows/project.yaml b/.github/workflows/project.yaml index ed66e907..3af4308b 100644 --- a/.github/workflows/project.yaml +++ b/.github/workflows/project.yaml @@ -36,6 +36,8 @@ env: STAGING_BRANCH: '${{ github.event.pull_request.head.ref }}$STAGING_SUFFIX' DEFAULT_BRANCH_CHAR_LIMIT: 28 + SLEEP: 5 + BACKEND_PATH: "api/v1/environment" BLACKFIRE_CLIENT_ID: '${{ secrets.DEVREL_USER_BLACKFIRE_CLIENT_ID }}' @@ -234,7 +236,7 @@ jobs: cmd=$(cat frontend/src/commands.json | jq -r ".first_deploy.user.get_url") eval "$cmd" URL=$(eval "$cmd --pipe") - sleep 2 + sleep $SLEEP blackfire-player run blackfire.yaml --endpoint="$URL" --variable step=branch -vvv ################################################################################################ @@ -256,7 +258,7 @@ jobs: working-directory: ${{ env.PROJECT_LOCALDIR }} run: | URL=$(upsun url --primary --pipe) - sleep 2 + sleep $SLEEP blackfire-player run blackfire.yaml --endpoint="$URL" --variable step=redis -vvv - name: "[environment_branch] 5. Update staging environment name." working-directory: ${{ env.PROJECT_LOCALDIR }} @@ -287,7 +289,7 @@ jobs: working-directory: ${{ env.PROJECT_LOCALDIR }} run: | URL=$(upsun url --primary --pipe) - sleep 2 + sleep $SLEEP blackfire-player run blackfire.yaml --endpoint="$URL" --variable step=merge-production -vvv ################################################################################################ @@ -330,7 +332,7 @@ jobs: git checkout ${{ steps.branch_names.outputs.default_branch }} git branch URL=$(upsun url -e ${{ steps.branch_names.outputs.default_branch }} --primary --pipe) - sleep 2 + sleep $SLEEP blackfire-player run blackfire.yaml --endpoint="$URL" --variable step=complete -vvv ################################################################################################ @@ -355,7 +357,7 @@ jobs: git checkout ${{ steps.branch_names.outputs.default_branch }} git branch URL=$(upsun url -e ${{ steps.branch_names.outputs.default_branch }} --primary --pipe) - sleep 2 + sleep $SLEEP blackfire-player run blackfire.yaml --endpoint="$URL" --variable step=scale -vvv ################################################################################################ diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a117101a..47180066 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, 21.x] + node-version: [18.x, 20.x, 22.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 93776aca..57f9a78c 100644 --- a/.upsun/config.yaml +++ b/.upsun/config.yaml @@ -9,10 +9,8 @@ applications: source: root: "frontend" - type: "nodejs:18" - - build: - flavor: none + stack: + - "nodejs@22" variables: env: @@ -28,7 +26,9 @@ applications: npm run build relationships: - api: "backend:http" + api: + service: "backend" + endpoint: "http" web: locations: @@ -49,10 +49,9 @@ applications: source: root: "backend" - type: "python:3.12" + stack: + - "python@3.12" - build: - flavor: none hooks: build: | set -eux @@ -72,7 +71,9 @@ applications: # # Step 3: Add a service. Uncomment this section. # ###################################################################################################################### # relationships: -# redis_session: "redis_service:redis" +# redis_session: +# service: "redis_service" +# endpoint: "redis" # services: # redis_service: diff --git a/backend/requirements.txt b/backend/requirements.txt index c9f335b2..d9f601e8 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -10,13 +10,13 @@ cyclonedx-python-lib==6.4.4 defusedxml==0.7.1 filelock==3.13.3 Flask==3.0.0 -Flask-Cors==4.0.0 +Flask-Cors==4.0.1 Flask-Session==0.5.0 gunicorn==22.0.0 html5lib==1.1 idna==3.7 itsdangerous==2.1.2 -Jinja2==3.1.3 +Jinja2==3.1.4 license-expression==30.3.0 markdown-it-py==3.0.0 MarkupSafe==2.1.3 @@ -39,6 +39,6 @@ sortedcontainers==2.4.0 toml==0.10.2 urllib3==2.1.0 webencodings==0.5.1 -Werkzeug==3.0.2 +Werkzeug==3.0.3 pylint==3.0.3 black==24.4.0 \ No newline at end of file diff --git a/frontend/package-lock.json b/frontend/package-lock.json index a66e495c..786921ab 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1233,17 +1233,6 @@ "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", @@ -2881,9 +2870,9 @@ } }, "node_modules/jest-watch-typeahead/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, "node_modules/didyoumean": { "version": "1.2.2", @@ -5998,18 +5987,6 @@ "@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", @@ -7517,14 +7494,14 @@ } }, "node_modules/mini-css-extract-plugin/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", + "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" }, "funding": { "type": "github", @@ -8232,14 +8209,6 @@ "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", @@ -8506,14 +8475,14 @@ "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" }, "node_modules/eslint-webpack-plugin/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", + "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" }, "funding": { "type": "github", @@ -9201,17 +9170,6 @@ "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", @@ -9235,14 +9193,6 @@ "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", @@ -15184,17 +15134,6 @@ "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", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 593a46c6..30c3dae1 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -55,8 +55,9 @@ function App() { # Step 3: Add a service. Uncomment this section. ############################################################### relationships: - redis_session: "redis_service:redis" - + redis_session: + service: "redis_service" + endpoint: "redis" services: redis_service: type: "redis:7.0"