The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Fix unsafe inline expression interpolation in CI workflows (#71991)
Nemanja Glumac69fad10cdae6
diff --git a/.github/workflows/athena.yml b/.github/workflows/athena.ymlindex e75a0400cc7..08948f7f5e8 100644--- a/.github/workflows/athena.yml+++ b/.github/workflows/athena.yml@@ -33,9 +33,13 @@ jobs:aws-region: ${{ vars.AWS_REGION }}- name: Deploy Athena JDBC driver- run: ./bin/athena.bb ${{ github.event.inputs.version }} --deploy+ run: ./bin/athena.bb "${VERSION}" --deploy+ env:+ VERSION: ${{ github.event.inputs.version }}- name: Verify deployment+ env:+ VERSION: ${{ github.event.inputs.version }}run: |- aws s3 ls s3://metabase-maven-downloads/com/metabase/athena-jdbc/${{ github.event.inputs.version }}/- echo "Athena JDBC driver version ${{ github.event.inputs.version }} has been deployed"+ aws s3 ls s3://metabase-maven-downloads/com/metabase/athena-jdbc/"${VERSION}"/+ echo "Athena JDBC driver version ${VERSION} has been deployed"diff --git a/.github/workflows/drivers.yml b/.github/workflows/drivers.ymlindex 0f9cfaae9ff..5313a2704db 100644--- a/.github/workflows/drivers.yml+++ b/.github/workflows/drivers.yml@@ -72,8 +72,8 @@ jobs:# All decision logic is in mage - it analyzes module dependencies,# branch context, labels, and file changes to decide what runs.MAGE_ARGS=(- --git-ref="${{ github.event.pull_request.base.ref || github.ref_name }}"- --is-master-or-release="${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release-') }}"+ --git-ref="${BASE_REF}"+ --is-master-or-release="${IS_MASTER_OR_RELEASE}"--pr-labels="${{ join(github.event.pull_request.labels.*.name, ',') }}"--skip="${{ inputs.skip }}")@@ -87,6 +87,9 @@ jobs:echo "Run './bin/mage -driver-decisions -h' locally for the full list of drivers and labels."# Second call: output only key=value lines for GITHUB_OUTPUT./bin/mage -driver-decisions "${MAGE_ARGS[@]}" --github-output-only >> $GITHUB_OUTPUT+ env:+ BASE_REF: ${{ github.event.pull_request.base.ref || github.ref_name }}+ IS_MASTER_OR_RELEASE: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release-') }}shell: bashbe-tests-athena-ee:diff --git a/.github/workflows/e2e-stress-test-flake-fix.yml b/.github/workflows/e2e-stress-test-flake-fix.ymlindex 97bf06b45bd..6a07425a4c0 100644--- a/.github/workflows/e2e-stress-test-flake-fix.yml+++ b/.github/workflows/e2e-stress-test-flake-fix.yml@@ -151,10 +151,12 @@ jobs:GREP: ${{ github.event.inputs.grep }}CYPRESS_BROWSER: ${{ steps.cypress-prep.outputs.chrome-path }}FAIL_FAST: ${{ inputs.fail_fast }}+ SPEC: ${{ github.event.inputs.spec }}+ BURN_IN: ${{ github.event.inputs.burn_in }}run: |node e2e/runner/run_cypress_ci.js ${{ needs.determine-test-type.outputs.type }} \- --spec '${{ github.event.inputs.spec }}' \- --env burn=${{ github.event.inputs.burn_in }} \+ --spec "${SPEC}" \+ --env burn="${BURN_IN}" \--config-file e2e/support/cypress-stress-test.config.js- name: Upload Cypress Artifacts upon failurediff --git a/.github/workflows/frontend-unit-test-stress-test-flake-fix.yml b/.github/workflows/frontend-unit-test-stress-test-flake-fix.ymlindex 91b46312e89..2f5f80bb83e 100644--- a/.github/workflows/frontend-unit-test-stress-test-flake-fix.yml+++ b/.github/workflows/frontend-unit-test-stress-test-flake-fix.yml@@ -47,11 +47,16 @@ jobs:run: bun run build:cljs- name: Stress-test ${{ github.event.inputs.spec }} ${{ github.event.inputs.burn_in }} timesrun: |- for i in {1..${{ github.event.inputs.burn_in }}}; do+ for ((i=1; i<=BURN_IN; i++)); dobun run jest --runInBand --ci --silent --no-cache \- --testPathPatterns '${{ github.event.inputs.spec }}' \- --testNamePattern '${{ github.event.inputs.grep }}'+ --testPathPatterns "${SPEC}" \+ --testNamePattern "${GREP}"if [[ "$?" != 0 ]]; thenecho "Failed after $i attempts" && break;fidone++ env:+ BURN_IN: ${{ github.event.inputs.burn_in }}+ SPEC: ${{ github.event.inputs.spec }}+ GREP: ${{ github.event.inputs.grep }}diff --git a/.github/workflows/perf-test.yml b/.github/workflows/perf-test.ymlindex 062073ba496..f5bb2e18a74 100644--- a/.github/workflows/perf-test.yml+++ b/.github/workflows/perf-test.yml@@ -67,10 +67,12 @@ jobs:id: create-oidc-tokenshell: bashrun: |- export OIDC_URL_WITH_AUDIENCE="$ACTIONS_ID_TOKEN_REQUEST_URL&audience=${{ secrets.PR_ENV_K8S_AUDIENCE }}"+ export OIDC_URL_WITH_AUDIENCE="$ACTIONS_ID_TOKEN_REQUEST_URL&audience=${PR_ENV_K8S_AUDIENCE}"IDTOKEN=$(curl -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" -H "Accept: application/json; api-version=2.0" "$OIDC_URL_WITH_AUDIENCE" | jq -r .value)echo "::add-mask::${IDTOKEN}"echo "idToken=${IDTOKEN}" >>$GITHUB_OUTPUT+ env:+ PR_ENV_K8S_AUDIENCE: ${{ secrets.PR_ENV_K8S_AUDIENCE }}- name: Setup Kube Contextuses: azure/k8s-set-context@0b53301dcc7ddd3f6d35f97fb67228ac4e5ab2fd # v2with:diff --git a/.github/workflows/pr-env-destroy.yml b/.github/workflows/pr-env-destroy.ymlindex ac8062282f5..b443803ed33 100644--- a/.github/workflows/pr-env-destroy.yml+++ b/.github/workflows/pr-env-destroy.yml@@ -39,10 +39,12 @@ jobs:id: create-oidc-tokenshell: bashrun: |- export OIDC_URL_WITH_AUDIENCE="$ACTIONS_ID_TOKEN_REQUEST_URL&audience=${{ secrets.PR_ENV_K8S_AUDIENCE }}"+ export OIDC_URL_WITH_AUDIENCE="$ACTIONS_ID_TOKEN_REQUEST_URL&audience=${PR_ENV_K8S_AUDIENCE}"IDTOKEN=$(curl -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" -H "Accept: application/json; api-version=2.0" "$OIDC_URL_WITH_AUDIENCE" | jq -r .value)echo "::add-mask::${IDTOKEN}"echo "idToken=${IDTOKEN}" >>$GITHUB_OUTPUT+ env:+ PR_ENV_K8S_AUDIENCE: ${{ secrets.PR_ENV_K8S_AUDIENCE }}- name: Setup Kube Contextuses: azure/k8s-set-context@0b53301dcc7ddd3f6d35f97fb67228ac4e5ab2fd # v2with:@@ -87,9 +89,15 @@ jobs:sudo apt-get install -y postgresql-client- name: Drop app database if existsrun: |- PGPASSWORD='${{ secrets.PR_ENV_DB_PASSWORD }}' \+ PGPASSWORD="${PR_ENV_DB_PASSWORD}" \psql \- -h ${{ secrets.PR_ENV_DB_HOST }} \- -U ${{ secrets.PR_ENV_DB_USER }} \- -d ${{ secrets.PR_ENV_DB_NAME }} \+ -h "${PR_ENV_DB_HOST}" \+ -U "${PR_ENV_DB_USER}" \+ -d "${PR_ENV_DB_NAME}" \-c "DROP DATABASE IF EXISTS hosting_pr${{ env.PR_NUMBER }};"++ env:+ PR_ENV_DB_PASSWORD: ${{ secrets.PR_ENV_DB_PASSWORD }}+ PR_ENV_DB_HOST: ${{ secrets.PR_ENV_DB_HOST }}+ PR_ENV_DB_USER: ${{ secrets.PR_ENV_DB_USER }}+ PR_ENV_DB_NAME: ${{ secrets.PR_ENV_DB_NAME }}diff --git a/.github/workflows/pr-env.yml b/.github/workflows/pr-env.ymlindex c482e5eab29..ce888c8d971 100644--- a/.github/workflows/pr-env.yml+++ b/.github/workflows/pr-env.yml@@ -78,10 +78,12 @@ jobs:id: create-oidc-tokenshell: bashrun: |- export OIDC_URL_WITH_AUDIENCE="$ACTIONS_ID_TOKEN_REQUEST_URL&audience=${{ secrets.PR_ENV_K8S_AUDIENCE }}"+ export OIDC_URL_WITH_AUDIENCE="$ACTIONS_ID_TOKEN_REQUEST_URL&audience=${PR_ENV_K8S_AUDIENCE}"IDTOKEN=$(curl -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" -H "Accept: application/json; api-version=2.0" "$OIDC_URL_WITH_AUDIENCE" | jq -r .value)echo "::add-mask::${IDTOKEN}"echo "idToken=${IDTOKEN}" >>$GITHUB_OUTPUT+ env:+ PR_ENV_K8S_AUDIENCE: ${{ secrets.PR_ENV_K8S_AUDIENCE }}- name: Setup Kube Contextuses: azure/k8s-set-context@0b53301dcc7ddd3f6d35f97fb67228ac4e5ab2fd # v2with:@@ -117,13 +119,18 @@ jobs:sudo apt-get install -y postgresql-client- name: Create app database if not existsrun: |- export PGPASSWORD='${{ secrets.PR_ENV_DB_PASSWORD }}'- export PGUSER=${{ secrets.PR_ENV_DB_USER }}- export PGHOST=${{ secrets.PR_ENV_DB_HOST }}- export PGDATABASE=${{ secrets.PR_ENV_DB_NAME }}+ export PGPASSWORD="${PR_ENV_DB_PASSWORD}"+ export PGUSER="${PR_ENV_DB_USER}"+ export PGHOST="${PR_ENV_DB_HOST}"+ export PGDATABASE="${PR_ENV_DB_NAME}"psql -tc "SELECT 1 FROM pg_database WHERE datname = 'hosting_pr${{ github.event.number }}'" \| grep -q 1 \|| psql -c "CREATE DATABASE hosting_pr${{ github.event.number }}"+ env:+ PR_ENV_DB_PASSWORD: ${{ secrets.PR_ENV_DB_PASSWORD }}+ PR_ENV_DB_USER: ${{ secrets.PR_ENV_DB_USER }}+ PR_ENV_DB_HOST: ${{ secrets.PR_ENV_DB_HOST }}+ PR_ENV_DB_NAME: ${{ secrets.PR_ENV_DB_NAME }}- name: Download Deployment YAML templateif: ${{ !inputs.self_hosting }}run: aws s3 cp s3://metabase-pr-env/metabase.yml.tmpl ./metabase.yml.tmpl@@ -175,8 +182,11 @@ jobs:if: ${{ inputs.self_hosting }}run: |helm registry login quay.io \- --username ${{ secrets.QUAY_USERNAME }} \- --password ${{ secrets.QUAY_PASSWORD }}+ --username "${QUAY_USERNAME}" \+ --password "${QUAY_PASSWORD}"+ env:+ QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}+ QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}- name: Deploy PR Review ENV (self-hosting)if: ${{ inputs.self_hosting }}run: |diff --git a/.github/workflows/release-embedding-sdk.yml b/.github/workflows/release-embedding-sdk.ymlindex dfe0fc0d11a..12524da1cf9 100644--- a/.github/workflows/release-embedding-sdk.yml+++ b/.github/workflows/release-embedding-sdk.yml@@ -383,12 +383,14 @@ jobs:- name: Publish to NPMworking-directory: sdkrun: |- echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_RELEASE_TOKEN }} > .npmrc+ echo //registry.npmjs.org/:_authToken="${NPM_RELEASE_TOKEN}" > .npmrcTAG="${{ steps.compute-tag.outputs.masterTag }}"echo "Resolved npm tag: $TAG"npm publish --tag "$TAG"+ env:+ NPM_RELEASE_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}# ⚠️ This step should only be executed on the latest stable (gold) release branch.# Only uncomment this when the new release branch becomes stable (gold).# - name: Add `latest` tag to the latest release branch (`release-x.55.x`) deploymentdiff --git a/.github/workflows/repro-bot.yml b/.github/workflows/repro-bot.ymlindex 685338bf608..7deece666dc 100644--- a/.github/workflows/repro-bot.yml+++ b/.github/workflows/repro-bot.yml@@ -33,13 +33,15 @@ jobs:id: issuerun: |if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then- ISSUE_NUMBER="${{ github.event.inputs.issue_number }}"+ ISSUE_NUMBER="${DISPATCH_ISSUE_NUMBER}"elseISSUE_NUMBER="${{ github.event.issue.number }}"fiecho "number=$ISSUE_NUMBER" >> $GITHUB_OUTPUTecho "Issue: https://github.com/${{ github.repository }}/issues/$ISSUE_NUMBER"+ env:+ DISPATCH_ISSUE_NUMBER: ${{ github.event.inputs.issue_number }}- uses: actions/checkout@v4- uses: ./.github/actions/prepare-backend- uses: ./.github/actions/prepare-frontenddiff --git a/.github/workflows/tag-for-release.yml b/.github/workflows/tag-for-release.ymlindex ade4aad374a..99d155bab66 100644--- a/.github/workflows/tag-for-release.yml+++ b/.github/workflows/tag-for-release.yml@@ -231,8 +231,10 @@ jobs:return version_path;- name: Upload to S3run: |- aws s3 cp ./metabase.jar s3://${{ secrets.AWS_S3_CLOUD_DEPLOY_BUCKET }}/${{ steps.version_path.outputs.result }}/metabase.jar+ aws s3 cp ./metabase.jar s3://"${AWS_S3_CLOUD_DEPLOY_BUCKET}"/${{ steps.version_path.outputs.result }}/metabase.jar+ env:+ AWS_S3_CLOUD_DEPLOY_BUCKET: ${{ secrets.AWS_S3_CLOUD_DEPLOY_BUCKET }}run-pre-release-tests:name: Run pre-release tests for ${{ inputs.version }}needs: tag-uberjar-for-release