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
Unify the JAR artifact naming strategy (#69114)
Nemanja Glumac8143e32165db
diff --git a/.github/actions/fetch-artifact/action.yml b/.github/actions/fetch-artifact/action.ymlindex ad0c943e1b8..c32605a21f1 100644--- a/.github/actions/fetch-artifact/action.yml+++ b/.github/actions/fetch-artifact/action.yml@@ -2,8 +2,11 @@ name: Fetch artifactdescription: Fetches a specific artifact and downloads it to the current directoryinputs:- name:- description: The name of the artifact to fetch+ commit:+ description: Commit SHA for the artifact+ required: true+ edition:+ description: Metabase edition (ee or oss)required: trueoutput-name:description: Optional custom name for the output jar file (defaults to metabase.jar)@@ -25,15 +28,18 @@ runs:script: | # jsconst fs = require('fs');+ const artifactName = `metabase-${{ inputs.edition }}-${{ inputs.commit }}-uberjar`;+ console.log(`Looking for artifact: ${artifactName}`);+const artifacts = await github.rest.actions.listArtifactsForRepo({owner: context.repo.owner,repo: context.repo.repo,- name: "${{ inputs.name }}",+ name: artifactName,per_page: 1,});if (!artifacts.data?.artifacts?.[0]?.id) {- throw new Error(`No artifacts found for ${{ inputs.name }}`);+ throw new Error(`No artifacts found for ${artifactName}`);}const artifact_id = artifacts.data.artifacts[0].id;diff --git a/.github/actions/prepare-uberjar-artifact/action.yml b/.github/actions/prepare-uberjar-artifact/action.ymlindex 5f4011a54ff..9e8be2de12f 100644--- a/.github/actions/prepare-uberjar-artifact/action.yml+++ b/.github/actions/prepare-uberjar-artifact/action.yml@@ -2,9 +2,10 @@ name: Prepare Uberjar Artifactdescription: Prepare and upload Metabase JAR as a GitHub artifact.inputs:- name:- required: true- description: Artifact name+ edition:+ required: false+ default: "ee"+ description: Metabase edition (ee or oss)runs:using: "composite"@@ -18,7 +19,7 @@ runs:- name: Upload JARs as artifactuses: actions/upload-artifact@v4with:- name: ${{ inputs.name }}+ name: metabase-${{ inputs.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjarpath: |./target/uberjar/metabase.jar./COMMIT-IDdiff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.ymlindex e0819d7d216..951e46ef85f 100644--- a/.github/workflows/e2e-test.yml+++ b/.github/workflows/e2e-test.yml@@ -79,7 +79,8 @@ jobs:- name: Retrieve uberjar artifact for ${{ inputs.edition }}uses: ./.github/actions/fetch-artifactwith:- name: metabase-${{ inputs.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar+ commit: ${{ github.event.pull_request.head.sha || github.sha }}+ edition: ${{ inputs.edition }}extract-path: "target/uberjar"output-name: "metabase.jar"diff --git a/.github/workflows/embedding-sdk-component-tests.yml b/.github/workflows/embedding-sdk-component-tests.ymlindex 3d755dd72e7..8412e753801 100644--- a/.github/workflows/embedding-sdk-component-tests.yml+++ b/.github/workflows/embedding-sdk-component-tests.yml@@ -45,7 +45,8 @@ jobs:- name: Retrieve uberjar artifact for eeuses: ./.github/actions/fetch-artifactwith:- name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar+ commit: ${{ github.event.pull_request.head.sha || github.sha }}+ edition: eeextract-path: "target/uberjar"output-name: "metabase.jar"@@ -194,7 +195,8 @@ jobs:id: download-uberjaruses: ./.github/actions/fetch-artifactwith:- name: metabase-ee-${{ steps.get-commit-sha.outputs.sha }}-uberjar+ commit: ${{ steps.get-commit-sha.outputs.sha }}+ edition: eeextract-path: "target/uberjar"output-name: "metabase.jar"continue-on-error: true # do not break the whole job if this step doesn't succeeddiff --git a/.github/workflows/embedding-sdk-host-sample-apps-tests.yml b/.github/workflows/embedding-sdk-host-sample-apps-tests.ymlindex 5547bfa56ad..b19000fb014 100644--- a/.github/workflows/embedding-sdk-host-sample-apps-tests.yml+++ b/.github/workflows/embedding-sdk-host-sample-apps-tests.yml@@ -137,7 +137,8 @@ jobs:- name: Retrieve uberjar artifact for eeuses: ./.github/actions/fetch-artifactwith:- name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar+ commit: ${{ github.event.pull_request.head.sha || github.sha }}+ edition: eeextract-path: "target/uberjar"output-name: "metabase.jar"@@ -252,7 +253,8 @@ jobs:- name: Retrieve uberjar artifact for eeuses: ./.github/actions/fetch-artifactwith:- name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar+ commit: ${{ github.event.pull_request.head.sha || github.sha }}+ edition: eeextract-path: "target/uberjar"output-name: "metabase.jar"diff --git a/.github/workflows/perf-test.yml b/.github/workflows/perf-test.ymlindex 51764f17101..655b3f17b22 100644--- a/.github/workflows/perf-test.yml+++ b/.github/workflows/perf-test.yml@@ -29,7 +29,8 @@ jobs:- name: Retrieve uberjar artifact for eeuses: ./.github/actions/fetch-artifactwith:- name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar+ commit: ${{ github.event.pull_request.head.sha || github.sha }}+ edition: eeextract-path: "target/uberjar"output-name: "metabase.jar"- name: Move uberjar to bin/dockerdiff --git a/.github/workflows/pr-env.yml b/.github/workflows/pr-env.ymlindex b36d6a90fab..d5cbe7ae192 100644--- a/.github/workflows/pr-env.yml+++ b/.github/workflows/pr-env.yml@@ -40,7 +40,8 @@ jobs:- name: Retrieve uberjar artifact for eeuses: ./.github/actions/fetch-artifactwith:- name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar+ commit: ${{ github.event.pull_request.head.sha || github.sha }}+ edition: eeextract-path: "target/uberjar"output-name: "metabase.jar"- name: Move uberjar to bin/dockerdiff --git a/.github/workflows/tag-for-release.yml b/.github/workflows/tag-for-release.ymlindex 18e4626660f..90efaf1837c 100644--- a/.github/workflows/tag-for-release.yml+++ b/.github/workflows/tag-for-release.yml@@ -156,7 +156,8 @@ jobs:- name: Retrieve test build uberjar artifact for ${{ matrix.edition }}uses: ./.github/actions/fetch-artifactwith:- name: metabase-${{ matrix.edition }}-${{ inputs.commit }}-uberjar+ commit: ${{ inputs.commit }}+ edition: ${{ matrix.edition }}- name: Update version.properties in jarrun: | # shdiff --git a/.github/workflows/uberjar.yml b/.github/workflows/uberjar.ymlindex 9a9a824f4dd..7fd1c502c00 100644--- a/.github/workflows/uberjar.yml+++ b/.github/workflows/uberjar.yml@@ -44,7 +44,8 @@ jobs:continue-on-error: trueuses: ./.github/actions/fetch-artifactwith:- name: metabase-ee-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar+ commit: ${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}+ edition: eeoutput-name: metabase-ee.jar- name: Try to fetch existing OSS artifact@@ -52,7 +53,8 @@ jobs:continue-on-error: trueuses: ./.github/actions/fetch-artifactwith:- name: metabase-oss-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar+ commit: ${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}+ edition: ossoutput-name: metabase-oss.jar- name: Decide if build is needed@@ -140,7 +142,7 @@ jobs:- name: Prepare uberjar artifactuses: ./.github/actions/prepare-uberjar-artifactwith:- name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar+ edition: ${{ matrix.edition }}check-jar-health:runs-on: ubuntu-22.04@@ -171,7 +173,8 @@ jobs:- name: Retrieve uberjar artifactuses: ./.github/actions/fetch-artifactwith:- name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar+ commit: ${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}+ edition: ${{ matrix.edition }}- name: Launch uberjarrun: >-java --add-opens java.base/java.nio=ALL-UNNAMED -jar ./metabase.jar &