Skip to content

Commit

Permalink
Constrain versions for Providers during docker build for 2.0.0
Browse files Browse the repository at this point in the history
Since we are planning to cut 2.0.0-3 we should release the same set of Providers except for few exceptions:

apache-airflow-providers-elasticsearch==1.0.1 -- contains our logging fix
apache-airflow-providers-cncf-kubernetes==1.0.1 -- contains a bug fix for K8s Operator
apache-airflow-providers-microsoft-azure==1.1.0 -- Will allow installing snowflake provider (includes apache/airflow#12188)

Since this constraints are only used in docker build time and not included in Dockerfile users are free to upgrade to a major version for providers like google.
  • Loading branch information
kaxil committed Feb 9, 2021
1 parent 969c0b0 commit ddab190
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
10 changes: 9 additions & 1 deletion 2.0.0/buster/Dockerfile
Expand Up @@ -115,8 +115,16 @@ ARG AIRFLOW_VERSION="2.0.0"
COPY include/pip.conf /etc/pip.conf
COPY include/pip-constraints.txt /usr/local/share/astronomer-pip-constraints.txt

# This constraints will be only used during docker-build
# and won't be included in the final image
# It is useful to install airflow-providers that work but still allow users to
# install providers of their choice (as opposed to entries in astronomer-pip-constraints.txt)
COPY build-time-pip-constraints.txt /tmp/build-time-pip-constraints.txt

# Pip install airflow and astro security manager
RUN pip install "${AIRFLOW_MODULE}" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.7.txt" \
RUN pip install "${AIRFLOW_MODULE}" \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.7.txt" \
--constraint /tmp/build-time-pip-constraints.txt \
&& pip install "https://github.com/astronomer/astronomer-airflow-scripts/releases/download/v0.0.5/astronomer_airflow_scripts-0.0.5-py3-none-any.whl" \
&& pip install "astronomer-fab-security-manager~=1.5"

Expand Down
17 changes: 17 additions & 0 deletions 2.0.0/buster/build-time-pip-constraints.txt
@@ -0,0 +1,17 @@
# Constraint the version pip will install during docker build

apache-airflow-providers-amazon==1.0.0
apache-airflow-providers-celery==1.0.0
apache-airflow-providers-cncf-kubernetes==1.0.1
apache-airflow-providers-elasticsearch==1.0.1
apache-airflow-providers-ftp==1.0.0
apache-airflow-providers-google==1.0.0
apache-airflow-providers-http==1.0.0
apache-airflow-providers-imap==1.0.0
apache-airflow-providers-microsoft-azure==1.1.0
apache-airflow-providers-mysql==1.0.0
apache-airflow-providers-postgres==1.0.0
apache-airflow-providers-redis==1.0.0
apache-airflow-providers-slack==1.0.0
apache-airflow-providers-sqlite==1.0.0
apache-airflow-providers-ssh==1.0.0

0 comments on commit ddab190

Please sign in to comment.