From a8731c21b0048144d6bdb30a7522f57277a3e316 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 3 Jun 2026 13:39:16 -0700 Subject: [PATCH 1/5] Add victory-chart-renderer Linux binary to deploy releases Build the Bun-compiled Linux x64 CLI on every staging and production deploy and upload it to the GitHub Release as victory-chart-renderer-linux-x64. Co-authored-by: Cursor --- .../workflows/buildVictoryChartRenderer.yml | 48 +++++++++++++++++++ .github/workflows/deploy.yml | 9 ++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/buildVictoryChartRenderer.yml diff --git a/.github/workflows/buildVictoryChartRenderer.yml b/.github/workflows/buildVictoryChartRenderer.yml new file mode 100644 index 000000000000..598d2ff5a9f8 --- /dev/null +++ b/.github/workflows/buildVictoryChartRenderer.yml @@ -0,0 +1,48 @@ +name: Build victory-chart-renderer + +on: + workflow_call: + inputs: + ref: + description: Git ref to checkout and build + type: string + required: true + + outputs: + BINARY_FILENAME: + description: Filename of the compiled Linux x64 binary + value: ${{ jobs.build.outputs.BINARY_FILENAME }} + +jobs: + build: + name: Build victory-chart-renderer (Linux x64) + runs-on: blacksmith-8vcpu-ubuntu-2404 + outputs: + BINARY_FILENAME: victory-chart-renderer-linux-x64 + steps: + - name: Checkout + uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1 + with: + ref: ${{ inputs.ref }} + + - name: Setup Node + uses: ./.github/actions/composite/setupNode + + - name: Setup Bun + # v2.0.2 + uses: oven-sh/setup-bun@81fe9a935c4d9aed6ff8654c7e6e27f3df8dc3ae + with: + bun-version-file: .bun-version + + - name: Build victory-chart-renderer Linux x64 binary + run: npm run server:vcr:build:linux + + - name: Verify compiled binary is executable + run: test -x server/victory-chart-renderer/dist/victory-chart-renderer-linux-x64 + + - name: Upload victory-chart-renderer Linux x64 artifact + # v6 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f + with: + name: victory-chart-renderer-linux-x64-artifact + path: server/victory-chart-renderer/dist/victory-chart-renderer-linux-x64 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7aa44fc266ca..a8e6b3c234b9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -649,6 +649,14 @@ jobs: environment: ${{ needs.prep.outputs.DEPLOY_ENV }} secrets: inherit + victoryChartRendererBuild: + name: Build victory-chart-renderer (Linux x64) + needs: [prep] + uses: ./.github/workflows/buildVictoryChartRenderer.yml + with: + ref: ${{ needs.prep.outputs.DEPLOY_SHA }} + secrets: inherit + webDeploy: name: Deploy Web to S3 needs: [prep, webBuild, buildStorybook] @@ -944,6 +952,7 @@ jobs: ./web-sourcemaps-artifact/web-merged-source-map.js.map#web-sourcemap.js.map ./web-build-tar-gz-artifact/webBuild.tar.gz#web.tar.gz ./web-build-zip-artifact/webBuild.zip#web.zip + ./victory-chart-renderer-linux-x64-artifact/victory-chart-renderer-linux-x64#victory-chart-renderer-linux-x64 " # Loop through each file and upload individually (so if one fails, we still have other platforms uploaded) From 7c1d83c249b44cea0b3717cc601c9295ad620abc Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 3 Jun 2026 13:48:30 -0700 Subject: [PATCH 2/5] Gate createRelease on victory-chart-renderer build success Wait for the chart renderer artifact before creating or uploading the release, verify the binary exists after download, and upload it in a dedicated step without continue-on-error so missing binaries fail loudly. Co-authored-by: Cursor --- .github/workflows/deploy.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a8e6b3c234b9..24588b6d37b2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -875,8 +875,8 @@ jobs: createRelease: runs-on: blacksmith-2vcpu-ubuntu-2404 - if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) }} - needs: [prep, checkDeploymentSuccess] + if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) && needs.victoryChartRendererBuild.result == 'success' }} + needs: [prep, checkDeploymentSuccess, victoryChartRendererBuild] permissions: contents: write steps: @@ -884,6 +884,9 @@ jobs: - name: Download all workflow run artifacts uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e + - name: Verify victory-chart-renderer artifact + run: test -x ./victory-chart-renderer-linux-x64-artifact/victory-chart-renderer-linux-x64 + - name: Get last production release id: get_last_prod_version run: echo "LAST_PROD_VERSION=$(gh release list --repo ${{ github.repository }} --exclude-drafts --exclude-pre-releases --limit 1 --json tagName --jq '.[0].tagName')" >> "$GITHUB_OUTPUT" @@ -952,7 +955,6 @@ jobs: ./web-sourcemaps-artifact/web-merged-source-map.js.map#web-sourcemap.js.map ./web-build-tar-gz-artifact/webBuild.tar.gz#web.tar.gz ./web-build-zip-artifact/webBuild.zip#web.zip - ./victory-chart-renderer-linux-x64-artifact/victory-chart-renderer-linux-x64#victory-chart-renderer-linux-x64 " # Loop through each file and upload individually (so if one fails, we still have other platforms uploaded) @@ -967,6 +969,13 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} + - name: Upload victory-chart-renderer to GitHub Release + run: | + gh release upload "${{ needs.prep.outputs.TAG }}" --repo "${{ github.repository }}" --clobber \ + "./victory-chart-renderer-linux-x64-artifact/victory-chart-renderer-linux-x64#victory-chart-renderer-linux-x64" + env: + GITHUB_TOKEN: ${{ github.token }} + - name: Warn deployers if deploy failed if: ${{ failure() }} # v3 From afaa0ded00b8818ce4b1411d14607e071cca8492 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 3 Jun 2026 13:49:47 -0700 Subject: [PATCH 3/5] Create release when chart build fails; fail after upload Wait for victoryChartRendererBuild before createRelease, but do not skip release creation on chart failure. Upload the binary only when the build succeeds; fail the job afterward so a missing binary is not silent. Co-authored-by: Cursor --- .github/workflows/deploy.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 24588b6d37b2..2b662e79dc9a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -875,7 +875,7 @@ jobs: createRelease: runs-on: blacksmith-2vcpu-ubuntu-2404 - if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) && needs.victoryChartRendererBuild.result == 'success' }} + if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) }} needs: [prep, checkDeploymentSuccess, victoryChartRendererBuild] permissions: contents: write @@ -884,9 +884,6 @@ jobs: - name: Download all workflow run artifacts uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e - - name: Verify victory-chart-renderer artifact - run: test -x ./victory-chart-renderer-linux-x64-artifact/victory-chart-renderer-linux-x64 - - name: Get last production release id: get_last_prod_version run: echo "LAST_PROD_VERSION=$(gh release list --repo ${{ github.repository }} --exclude-drafts --exclude-pre-releases --limit 1 --json tagName --jq '.[0].tagName')" >> "$GITHUB_OUTPUT" @@ -970,12 +967,20 @@ jobs: GITHUB_TOKEN: ${{ github.token }} - name: Upload victory-chart-renderer to GitHub Release + if: ${{ needs.victoryChartRendererBuild.result == 'success' }} run: | + test -x ./victory-chart-renderer-linux-x64-artifact/victory-chart-renderer-linux-x64 gh release upload "${{ needs.prep.outputs.TAG }}" --repo "${{ github.repository }}" --clobber \ "./victory-chart-renderer-linux-x64-artifact/victory-chart-renderer-linux-x64#victory-chart-renderer-linux-x64" env: GITHUB_TOKEN: ${{ github.token }} + - name: Report victory-chart-renderer build failure + if: ${{ needs.victoryChartRendererBuild.result != 'success' }} + run: | + echo "::error::victory-chart-renderer build did not succeed (result: ${{ needs.victoryChartRendererBuild.result }}). GitHub Release was created without victory-chart-renderer-linux-x64." + exit 1 + - name: Warn deployers if deploy failed if: ${{ failure() }} # v3 From a85f5b3567deaad1af705907d57c6452d68f9ef2 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 3 Jun 2026 13:51:26 -0700 Subject: [PATCH 4/5] Announce chart build failure in Slack without failing deploy Log a workflow error and post to #announce when the chart renderer build does not succeed, without exiting non-zero from createRelease. Co-authored-by: Cursor --- .github/workflows/deploy.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2b662e79dc9a..cf561b0b1a57 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -975,11 +975,28 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} - - name: Report victory-chart-renderer build failure + - name: Log victory-chart-renderer build failure if: ${{ needs.victoryChartRendererBuild.result != 'success' }} run: | - echo "::error::victory-chart-renderer build did not succeed (result: ${{ needs.victoryChartRendererBuild.result }}). GitHub Release was created without victory-chart-renderer-linux-x64." - exit 1 + echo "::error::victory-chart-renderer build did not succeed (result: ${{ needs.victoryChartRendererBuild.result }}). GitHub Release ${{ needs.prep.outputs.TAG }} was created without victory-chart-renderer-linux-x64." + + - name: Announce victory-chart-renderer build failure in Slack + if: ${{ needs.victoryChartRendererBuild.result != 'success' }} + # v3 + uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e + with: + status: custom + custom_payload: | + { + channel: '#announce', + attachments: [{ + color: 'warning', + text: `⚠️ ${process.env.AS_REPO} created release without victory-chart-renderer-linux-x64 (build result: ${{ needs.victoryChartRendererBuild.result }}).`, + }] + } + env: + GITHUB_TOKEN: ${{ github.token }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - name: Warn deployers if deploy failed if: ${{ failure() }} From 3e2e61701e1b538f13bc2558491023a23fc1d5d5 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 3 Jun 2026 14:02:19 -0700 Subject: [PATCH 5/5] Move chart build failure Slack announce to build workflow Log ::error:: and post to #announce from buildVictoryChartRenderer when the build job fails or is cancelled; pass release-tag from deploy. Co-authored-by: Cursor --- .../workflows/buildVictoryChartRenderer.yml | 27 +++++++++++++++++++ .github/workflows/deploy.yml | 24 +---------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/.github/workflows/buildVictoryChartRenderer.yml b/.github/workflows/buildVictoryChartRenderer.yml index 598d2ff5a9f8..2650cf79b987 100644 --- a/.github/workflows/buildVictoryChartRenderer.yml +++ b/.github/workflows/buildVictoryChartRenderer.yml @@ -7,6 +7,10 @@ on: description: Git ref to checkout and build type: string required: true + release-tag: + description: GitHub Release tag for this deploy (used in failure notifications) + type: string + required: true outputs: BINARY_FILENAME: @@ -46,3 +50,26 @@ jobs: with: name: victory-chart-renderer-linux-x64-artifact path: server/victory-chart-renderer/dist/victory-chart-renderer-linux-x64 + + - name: Log victory-chart-renderer build failure + if: failure() || cancelled() + run: | + echo "::error::victory-chart-renderer Linux x64 build did not succeed for release ${{ inputs.release-tag }}. GitHub Release will not include victory-chart-renderer-linux-x64." + + - name: Announce victory-chart-renderer build failure in Slack + if: failure() || cancelled() + # v3 + uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e + with: + status: custom + custom_payload: | + { + channel: '#announce', + attachments: [{ + color: 'warning', + text: `⚠️ ${process.env.AS_REPO} failed for deploy release . victory-chart-renderer-linux-x64 will not be attached.`, + }] + } + env: + GITHUB_TOKEN: ${{ github.token }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cf561b0b1a57..a10d840e8c6f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -655,6 +655,7 @@ jobs: uses: ./.github/workflows/buildVictoryChartRenderer.yml with: ref: ${{ needs.prep.outputs.DEPLOY_SHA }} + release-tag: ${{ needs.prep.outputs.TAG }} secrets: inherit webDeploy: @@ -975,29 +976,6 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} - - name: Log victory-chart-renderer build failure - if: ${{ needs.victoryChartRendererBuild.result != 'success' }} - run: | - echo "::error::victory-chart-renderer build did not succeed (result: ${{ needs.victoryChartRendererBuild.result }}). GitHub Release ${{ needs.prep.outputs.TAG }} was created without victory-chart-renderer-linux-x64." - - - name: Announce victory-chart-renderer build failure in Slack - if: ${{ needs.victoryChartRendererBuild.result != 'success' }} - # v3 - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e - with: - status: custom - custom_payload: | - { - channel: '#announce', - attachments: [{ - color: 'warning', - text: `⚠️ ${process.env.AS_REPO} created release without victory-chart-renderer-linux-x64 (build result: ${{ needs.victoryChartRendererBuild.result }}).`, - }] - } - env: - GITHUB_TOKEN: ${{ github.token }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - - name: Warn deployers if deploy failed if: ${{ failure() }} # v3