diff --git a/.github/workflows/check_db_migration_confict.yml b/.github/workflows/check_db_migration_confict.yml index 8dc7ab088..85058c3cd 100644 --- a/.github/workflows/check_db_migration_confict.yml +++ b/.github/workflows/check_db_migration_confict.yml @@ -3,6 +3,12 @@ on: push: paths: - "superset/migrations/**" + branches: + - 'master' + pull_request: + paths: + - "superset/migrations/**" + types: [synchronize, opened, reopened, ready_for_review] jobs: check_db_migration_conflict: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b0d12be10..5aa2040c2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -33,6 +33,13 @@ jobs: matrix: target: ["dev", "lean", "lean310", "websocket", "dockerize"] platform: ["linux/amd64", "linux/arm64"] + exclude: + # disabling because slow! no python wheels for arm/py39 and + # QEMU is slow! + - target: "dev" + platform: "linux/arm64" + - target: "lean" + platform: "linux/arm64" fail-fast: false steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index 8e2b9bbed..e9b75a100 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -2,9 +2,10 @@ name: License Check on: push: - branches-ignore: - - "dependabot/**" + branches: + - 'master' pull_request: + types: [synchronize, opened, reopened, ready_for_review] jobs: config: diff --git a/.github/workflows/no-op.yml b/.github/workflows/no-op.yml new file mode 100644 index 000000000..835063640 --- /dev/null +++ b/.github/workflows/no-op.yml @@ -0,0 +1,54 @@ +# no-op.yml +# +# Purpose: +# This workflow provides a workaround for the "required status checks" feature in GitHub Actions +# when using path-specific conditions in other workflows. Required checks might remain in a "Pending" +# state if the conditions are not met, thus blocking pull requests from being merged. +# This no-op (no operation) workflow provides dummy success statuses for these required jobs when +# the real jobs do not run due to path-specific conditions. +# +# How it works: +# - It defines jobs with the same names as the required jobs in the main workflows. +# - These jobs simply execute a command (`exit 0`) to succeed immediately. +# - When a pull request is created or updated, both this no-op workflow and the main workflows are triggered. +# - If the main workflows' jobs don't run (due to path conditions), these no-op jobs provide successful statuses. +# - If the main workflows' jobs do run and fail, their failure statuses take precedence, +# ensuring that pull requests are not merged with failing checks. +# +# Usage: +# - Ensure that the job names in this workflow match exactly the names of the corresponding jobs in the main workflows. +# - This workflow should be kept as-is, without path-specific conditions. + +name: No Operation Checks +on: pull_request + +jobs: + frontend-build: + runs-on: ubuntu-latest + steps: + - name: No-op for frontend-build + run: | + echo "This is a no-op step for frontend-build to ensure a successful status." + exit 0 + + pre-commit: + strategy: + matrix: + python-version: ["3.9"] + runs-on: ubuntu-latest + steps: + - name: No-op for pre-commit + run: | + echo "This is a no-op step for pre-commit to ensure a successful status." + exit 0 + + python-lint: + strategy: + matrix: + python-version: ["3.9"] + runs-on: ubuntu-latest + steps: + - name: No-op for python-lint + run: | + echo "This is a no-op step for python-lint to ensure a successful status." + exit 0 diff --git a/.github/workflows/prefer-typescript.yml b/.github/workflows/prefer-typescript.yml index a1e75c73d..65fa8de11 100644 --- a/.github/workflows/prefer-typescript.yml +++ b/.github/workflows/prefer-typescript.yml @@ -2,10 +2,14 @@ name: Prefer TypeScript on: push: - branches-ignore: - - "dependabot/**" + branches: + - 'master' + paths: + - "superset-frontend/src/**" pull_request: - + types: [synchronize, opened, reopened, ready_for_review] + paths: + - "superset-frontend/src/**" jobs: prefer_typescript: if: github.ref == 'ref/heads/master' && github.event_name == 'pull_request' diff --git a/.github/workflows/superset-cli.yml b/.github/workflows/superset-cli.yml index faf6d7d0b..91be375b3 100644 --- a/.github/workflows/superset-cli.yml +++ b/.github/workflows/superset-cli.yml @@ -2,8 +2,8 @@ name: Superset CLI tests on: push: - branches-ignore: - - "dependabot/npm_and_yarn/**" + branches: + - 'master' pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-docs.yml b/.github/workflows/superset-docs.yml index 6a47df440..e1c2df7d1 100644 --- a/.github/workflows/superset-docs.yml +++ b/.github/workflows/superset-docs.yml @@ -4,9 +4,12 @@ on: push: paths: - "docs/**" + branches: + - 'master' pull_request: paths: - "docs/**" + types: [synchronize, opened, reopened, ready_for_review] jobs: config: diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index 5eb794a48..0f01a1be1 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -2,10 +2,8 @@ name: E2E on: push: - branches-ignore: - - "dependabot/**/docs/**" - paths-ignore: - - "docs/**" + branches: + - 'master' pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml index 35e1a989a..f48a65bd2 100644 --- a/.github/workflows/superset-frontend.yml +++ b/.github/workflows/superset-frontend.yml @@ -2,11 +2,14 @@ name: Frontend on: push: - branches-ignore: - - "dependabot/**/docs/**" - - "dependabot/**/cypress-base/**" + branches: + - "master" + paths: + - "superset-frontend/**" pull_request: types: [synchronize, opened, reopened, ready_for_review] + paths: + - "superset-frontend/**" jobs: frontend-build: diff --git a/.github/workflows/superset-helm-lint.yml b/.github/workflows/superset-helm-lint.yml index 4bb888e15..7ca8f1188 100644 --- a/.github/workflows/superset-helm-lint.yml +++ b/.github/workflows/superset-helm-lint.yml @@ -3,6 +3,8 @@ name: Lint and Test Charts on: pull_request: types: [opened, edited, reopened, synchronize] + paths: + - "helm/**" jobs: lint-test: diff --git a/.github/workflows/superset-python-integrationtest.yml b/.github/workflows/superset-python-integrationtest.yml index 655b5c85d..76187250f 100644 --- a/.github/workflows/superset-python-integrationtest.yml +++ b/.github/workflows/superset-python-integrationtest.yml @@ -3,8 +3,8 @@ name: Python-Integration on: push: - branches-ignore: - - "dependabot/npm_and_yarn/**" + branches: + - 'master' pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-python-misc.yml b/.github/workflows/superset-python-misc.yml index e42c743c9..58d49be52 100644 --- a/.github/workflows/superset-python-misc.yml +++ b/.github/workflows/superset-python-misc.yml @@ -3,10 +3,14 @@ name: Python Misc on: push: - branches-ignore: - - "dependabot/npm_and_yarn/**" + branches: + - 'master' + paths: + - "superset/**" pull_request: types: [synchronize, opened, reopened, ready_for_review] + paths: + - "superset/**" jobs: python-lint: diff --git a/.github/workflows/superset-python-presto-hive.yml b/.github/workflows/superset-python-presto-hive.yml index 7e326759e..8f71289b4 100644 --- a/.github/workflows/superset-python-presto-hive.yml +++ b/.github/workflows/superset-python-presto-hive.yml @@ -3,10 +3,14 @@ name: Python Presto/Hive on: push: - branches-ignore: - - "dependabot/npm_and_yarn/**" + branches: + - 'master' + paths: + - "superset/**" pull_request: types: [synchronize, opened, reopened, ready_for_review] + paths: + - "superset/**" jobs: test-postgres-presto: diff --git a/.github/workflows/superset-python-unittest.yml b/.github/workflows/superset-python-unittest.yml index 5f7639e67..401c6ad89 100644 --- a/.github/workflows/superset-python-unittest.yml +++ b/.github/workflows/superset-python-unittest.yml @@ -3,10 +3,14 @@ name: Python-Unit on: push: - branches-ignore: - - "dependabot/npm_and_yarn/**" + branches: + - 'master' + paths: + - "superset/**" pull_request: types: [synchronize, opened, reopened, ready_for_review] + paths: + - "superset/**" jobs: unit-tests: diff --git a/.github/workflows/superset-translations.yml b/.github/workflows/superset-translations.yml index e42a9ac9e..d3d957fde 100644 --- a/.github/workflows/superset-translations.yml +++ b/.github/workflows/superset-translations.yml @@ -2,8 +2,8 @@ name: Translations on: push: - branches-ignore: - - "dependabot/npm_and_yarn/**" + branches: + - 'master' pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-websocket.yml b/.github/workflows/superset-websocket.yml index 73a532cb9..345aa4ddf 100644 --- a/.github/workflows/superset-websocket.yml +++ b/.github/workflows/superset-websocket.yml @@ -1,11 +1,14 @@ name: WebSocket server on: push: + branches: + - 'master' paths: - "superset-websocket/**" pull_request: paths: - "superset-websocket/**" + types: [synchronize, opened, reopened, ready_for_review] jobs: app-checks: diff --git a/scripts/docker_build_push.sh b/scripts/docker_build_push.sh index 10737447e..5ad7d2d99 100755 --- a/scripts/docker_build_push.sh +++ b/scripts/docker_build_push.sh @@ -70,27 +70,31 @@ fi BUILD_ARG="3.9-slim-bookworm" +# Replace '/' with '-' in BUILD_PLATFORM +SAFE_BUILD_PLATFORM=$(echo "${BUILD_PLATFORM}" | sed 's/\//-/g') +MAIN_UNIQUE_TAG="${REPO_NAME}:${SHA}-${TARGET}-${SAFE_BUILD_PLATFORM}-${BUILD_ARG}" + case "${TARGET}" in "dev") - DOCKER_TAGS="-t ${REPO_NAME}:${SHA}-dev -t ${REPO_NAME}:${REFSPEC}-dev -t ${DEV_TAG}" + DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:${SHA}-dev -t ${REPO_NAME}:${REFSPEC}-dev -t ${DEV_TAG}" BUILD_TARGET="dev" ;; "lean") - DOCKER_TAGS="-t ${REPO_NAME}:${SHA} -t ${REPO_NAME}:${REFSPEC} -t ${REPO_NAME}:${LATEST_TAG}" + DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:${SHA} -t ${REPO_NAME}:${REFSPEC} -t ${REPO_NAME}:${LATEST_TAG}" BUILD_TARGET="lean" ;; "lean310") - DOCKER_TAGS="-t ${REPO_NAME}:${SHA}-py310 -t ${REPO_NAME}:${REFSPEC}-py310 -t ${REPO_NAME}:${LATEST_TAG}-py310" + DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:${SHA}-py310 -t ${REPO_NAME}:${REFSPEC}-py310 -t ${REPO_NAME}:${LATEST_TAG}-py310" BUILD_TARGET="lean" BUILD_ARG="3.10-slim-bookworm" ;; "websocket") - DOCKER_TAGS="-t ${REPO_NAME}:${SHA}-websocket -t ${REPO_NAME}:${REFSPEC}-websocket -t ${REPO_NAME}:${LATEST_TAG}-websocket" + DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:${SHA}-websocket -t ${REPO_NAME}:${REFSPEC}-websocket -t ${REPO_NAME}:${LATEST_TAG}-websocket" BUILD_TARGET="" DOCKER_CONTEXT="superset-websocket" ;; "dockerize") - DOCKER_TAGS="-t ${REPO_NAME}:dockerize" + DOCKER_TAGS="-t ${MAIN_UNIQUE_TAG} -t ${REPO_NAME}:dockerize" BUILD_TARGET="" DOCKER_CONTEXT="-f dockerize.Dockerfile ." ;; @@ -102,6 +106,7 @@ esac cat<