From c93beef23897a1a2fe689b99a6c243bdffcaefad Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Wed, 13 Nov 2024 12:36:39 +0100 Subject: [PATCH] [bitnami/airflow] Release airflow-2.10.3-debian-12-r5 (#74873) Signed-off-by: Bitnami Bot --- bitnami/airflow/2/debian-12/Dockerfile | 6 +++--- .../rootfs/opt/bitnami/scripts/airflow-env.sh | 2 ++ .../rootfs/opt/bitnami/scripts/libairflow.sh | 15 +++++++++------ bitnami/airflow/README.md | 3 ++- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/bitnami/airflow/2/debian-12/Dockerfile b/bitnami/airflow/2/debian-12/Dockerfile index dacbcb9ed470..f58e787d83a3 100644 --- a/bitnami/airflow/2/debian-12/Dockerfile +++ b/bitnami/airflow/2/debian-12/Dockerfile @@ -8,11 +8,11 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2024-11-09T20:21:42Z" \ + org.opencontainers.image.created="2024-11-13T10:28:35Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/airflow/README.md" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="2.10.3-debian-12-r4" \ + org.opencontainers.image.ref.name="2.10.3-debian-12-r5" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/airflow" \ org.opencontainers.image.title="airflow" \ org.opencontainers.image.vendor="Broadcom, Inc." \ @@ -69,7 +69,7 @@ ENV AIRFLOW_HOME="/opt/bitnami/airflow" \ NSS_WRAPPER_PASSWD="/opt/bitnami/airflow/nss-wrapper/nss_passwd" \ PATH="/opt/bitnami/common/bin:/opt/bitnami/python/bin:/opt/bitnami/airflow/venv/bin:$PATH" -EXPOSE 8080 8793 8794 +EXPOSE 8080 8125 8793 8794 USER 1001 ENTRYPOINT [ "/opt/bitnami/scripts/airflow/entrypoint.sh" ] diff --git a/bitnami/airflow/2/debian-12/rootfs/opt/bitnami/scripts/airflow-env.sh b/bitnami/airflow/2/debian-12/rootfs/opt/bitnami/scripts/airflow-env.sh index 655e2f59e74e..99870f4a1f2b 100644 --- a/bitnami/airflow/2/debian-12/rootfs/opt/bitnami/scripts/airflow-env.sh +++ b/bitnami/airflow/2/debian-12/rootfs/opt/bitnami/scripts/airflow-env.sh @@ -46,6 +46,7 @@ airflow_env_vars=( AIRFLOW_STANDALONE_DAG_PROCESSOR AIRFLOW_TRIGGERER_DEFAULT_CAPACITY AIRFLOW_WORKER_QUEUE + AIRFLOW_SKIP_DB_SETUP AIRFLOW_DATABASE_HOST AIRFLOW_DATABASE_PORT_NUMBER AIRFLOW_DATABASE_NAME @@ -130,6 +131,7 @@ export AIRFLOW_STANDALONE_DAG_PROCESSOR="${AIRFLOW_STANDALONE_DAG_PROCESSOR:-no} export AIRFLOW_TRIGGERER_DEFAULT_CAPACITY="${AIRFLOW_TRIGGERER_DEFAULT_CAPACITY:-1000}" AIRFLOW_WORKER_QUEUE="${AIRFLOW_WORKER_QUEUE:-"${AIRFLOW_QUEUE:-}"}" export AIRFLOW_WORKER_QUEUE="${AIRFLOW_WORKER_QUEUE:-}" +export AIRFLOW_SKIP_DB_SETUP="${AIRFLOW_SKIP_DB_SETUP:-no}" # Airflow database configuration export AIRFLOW_DATABASE_HOST="${AIRFLOW_DATABASE_HOST:-postgresql}" diff --git a/bitnami/airflow/2/debian-12/rootfs/opt/bitnami/scripts/libairflow.sh b/bitnami/airflow/2/debian-12/rootfs/opt/bitnami/scripts/libairflow.sh index 836dd421e745..fe708573e379 100644 --- a/bitnami/airflow/2/debian-12/rootfs/opt/bitnami/scripts/libairflow.sh +++ b/bitnami/airflow/2/debian-12/rootfs/opt/bitnami/scripts/libairflow.sh @@ -79,6 +79,7 @@ airflow_validate() { check_multi_value "AIRFLOW_COMPONENT_TYPE" "webserver scheduler worker triggerer dag-processor" check_empty_value "AIRFLOW_EXECUTOR" check_yes_no_value "AIRFLOW_STANDALONE_DAG_PROCESSOR" + check_yes_no_value "AIRFLOW_SKIP_DB_SETUP" # Check cryptography parameters if [[ -n "$AIRFLOW_RAW_FERNET_KEY" && -z "$AIRFLOW_FERNET_KEY" ]]; then @@ -170,13 +171,15 @@ airflow_initialize() { case "$AIRFLOW_COMPONENT_TYPE" in webserver) + # Remove pid file if exists to prevent error after WSL restarts + if [[ -f "${AIRFLOW_TMP_DIR}/airflow-webserver.pid" ]]; then + rm "${AIRFLOW_TMP_DIR}/airflow-webserver.pid" + fi + if is_boolean_yes "$AIRFLOW_SKIP_DB_SETUP"; then + info "Skipping database setup, waiting for db migrations to be completed" + airflow_wait_for_db_migrations # Check if the Airflow database has been already initialized - if ! airflow_execute db check-migrations; then - # Remove pid file if exists to prevent error after WSL restarts - if [[ -f "${AIRFLOW_TMP_DIR}/airflow-webserver.pid" ]]; then - rm "${AIRFLOW_TMP_DIR}/airflow-webserver.pid" - fi - + elif ! airflow_execute db check-migrations; then # Initialize database info "Populating database" airflow_execute db init diff --git a/bitnami/airflow/README.md b/bitnami/airflow/README.md index 82ae8eae081a..a9d0def5ef3c 100644 --- a/bitnami/airflow/README.md +++ b/bitnami/airflow/README.md @@ -29,7 +29,7 @@ Looking to use Apache Airflow in production? Try [VMware Tanzu Application Catal ## Supported tags and respective `Dockerfile` links -Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.vmware.com/en/VMware-Tanzu-Application-Catalog/services/tutorials/GUID-understand-rolling-tags-containers-index.html). +Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html). You can see the equivalence between the different tags by taking a look at the `tags-info.yaml` file present in the branch folder, i.e `bitnami/ASSET/BRANCH/DISTRO/tags-info.yaml`. @@ -325,6 +325,7 @@ This container supports the installation of additional python modules at start-u | `AIRFLOW_STANDALONE_DAG_PROCESSOR` | Enable running Dag Processor in standalone mode | `no` | | `AIRFLOW_TRIGGERER_DEFAULT_CAPACITY` | How many triggers a single Triggerer can run at once. | `1000` | | `AIRFLOW_WORKER_QUEUE` | A queue for the worker to pull tasks from. | `nil` | +| `AIRFLOW_SKIP_DB_SETUP` | Skip db init / db migrate actions during the setup | `no` | | `AIRFLOW_DATABASE_HOST` | Hostname for PostgreSQL server. | `postgresql` | | `AIRFLOW_DATABASE_PORT_NUMBER` | Port used by PostgreSQL server. | `5432` | | `AIRFLOW_DATABASE_NAME` | Database name that Airflow will use to connect with the database. | `bitnami_airflow` |