Skip to content

Commit b7d7c2d

Browse files
committed
feat: airflow 3.0 upgrade
1 parent 8de4ebb commit b7d7c2d

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

airflow_services/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM --platform=linux/amd64 apache/airflow:slim-2.10.5-python3.11
1+
FROM --platform=linux/amd64 apache/airflow:slim-3.0.2-python3.12
22

3-
ARG AIRFLOW_VERSION=2.10.5
3+
ARG AIRFLOW_VERSION=3.0.2
44

55
USER root
66
# `apt-get autoremove` is used to remove packages that were automatically installed to satisfy
@@ -19,7 +19,7 @@ COPY --chown=airflow:airflow airflow_services/requirements-in.txt "${AIRFLOW_HOM
1919
USER airflow
2020

2121
RUN uv pip install virtualenv\
22-
&& uv pip install --no-cache-dir -r requirements.txt -c "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.11.txt"\
22+
&& uv pip install --no-cache-dir -r requirements.txt -c "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.12.txt"\
2323
&& uv pip install --no-cache-dir -r requirements-in.txt apache-airflow==${AIRFLOW_VERSION}
2424

2525
ENV PATH=".venv/bin:$PATH"

airflow_worker/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM --platform=linux/amd64 ghcr.io/osgeo/gdal:ubuntu-small-3.6.4
22
COPY --from=ghcr.io/astral-sh/uv:0.7.3 /uv /uvx /bin/
33

4-
ARG AIRFLOW_VERSION=2.10.5
4+
ARG AIRFLOW_VERSION=3.0.2
55
ARG UNAME=airflow
66
ARG UID=50000
77
ARG GID=0
@@ -15,7 +15,7 @@ WORKDIR /opt/airflow
1515
RUN chown $UNAME:$GID /opt/airflow
1616

1717
RUN apt-get -y update \
18-
&& apt-get install -y --no-install-recommends gcc libc6-dev libcurl4-openssl-dev libssl-dev python3.11 python3.11-venv python3.11-dev git \
18+
&& apt-get install -y --no-install-recommends gcc libc6-dev libcurl4-openssl-dev libssl-dev git \
1919
&& apt-get autoremove -yqq --purge \
2020
&& apt-get clean \
2121
&& rm -rf /var/lib/apt/lists/*
@@ -25,10 +25,11 @@ USER airflow
2525
COPY --chown=airflow:airflow airflow_worker/requirements.txt "${AIRFLOW_HOME}/requirements.txt"
2626
COPY --chown=airflow:airflow airflow_worker/requirements-in.txt "${AIRFLOW_HOME}/requirements-in.txt"
2727

28-
RUN uv venv --python python3.11
28+
RUN uv python install 3.12
29+
RUN uv venv --python 3.12
2930
RUN uv pip install virtualenv\
30-
&& uv pip install "apache-airflow[celery,amazon]==${AIRFLOW_VERSION}" -c "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.11.txt"\
31-
&& uv pip install --no-cache-dir -r requirements.txt -c "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.11.txt"\
31+
&& uv pip install "apache-airflow[celery,amazon]==${AIRFLOW_VERSION}" -c "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.12.txt"\
32+
&& uv pip install --no-cache-dir -r requirements.txt -c "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.12.txt"\
3233
&& uv pip install --no-cache-dir -r requirements-in.txt apache-airflow==${AIRFLOW_VERSION}
3334

3435
ENV PATH=".venv/bin:$PATH"

infrastructure/configuration/airflow.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ client_secret = 8cbd483d2cb4e73599dffba93dbd0295ef0830c5
2525
oauth_callback_route = /home
2626
allowed_teams = VEDA
2727

28-
[webserver]
28+
[api_server]
2929
authenticate = True
30-
auth_backends = airflow.contrib.auth.backends.github_enterprise_auth
3130
dag_default_view = grid
3231
expose_config = true
3332
dag_orientation = TB

infrastructure/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module "rds_backups" {
2626

2727

2828
module "sma-base" {
29-
source = "https://github.com/NASA-IMPACT/self-managed-apache-airflow/releases/download/v1.1.15/self-managed-apache-airflow.zip"
29+
source = "https://github.com/NASA-IMPACT/self-managed-apache-airflow/releases/download/v1.2.0-rc1/self-managed-apache-airflow.zip"
3030
project = var.project_name
3131
airflow_db = var.airflow_db
3232
fernet_key = var.fernet_key

0 commit comments

Comments
 (0)