You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/11/14 00:40:00 UTC

[airflow] 16/16: Fix constraints generation script (#11412)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 612c69e9f701acd68ace438d1ebb89365463bae9
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Sun Oct 11 17:49:19 2020 +0200

    Fix constraints generation script (#11412)
    
    Constraints generation script was broken by recent changes
    in naming of constraints URL variables and moving generation
    of the link to the Dockerfile
    
    This change restores the script's behaviour.
    
    (cherry picked from commit ce2f19d30db32313fcee229561e05165144b446a)
---
 scripts/ci/libraries/_docker.env                 | 1 +
 scripts/in_container/run_generate_constraints.sh | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/ci/libraries/_docker.env b/scripts/ci/libraries/_docker.env
index 86461d0..3290f20 100644
--- a/scripts/ci/libraries/_docker.env
+++ b/scripts/ci/libraries/_docker.env
@@ -31,6 +31,7 @@ PRINT_INFO_FROM_SCRIPTS
 CI
 LOAD_DEFAULT_CONNECTIONS
 LOAD_EXAMPLES
+DEFAULT_CONSTRAINTS_BRANCH
 GITHUB_REGISTRY_PULL_IMAGE_TAG
 POSTGRES_VERSION
 MYSQL_VERSION
diff --git a/scripts/in_container/run_generate_constraints.sh b/scripts/in_container/run_generate_constraints.sh
index dabf698..2809c1f 100755
--- a/scripts/in_container/run_generate_constraints.sh
+++ b/scripts/in_container/run_generate_constraints.sh
@@ -27,7 +27,10 @@ CURRENT_CONSTRAINT_FILE="${CONSTRAINTS_DIR}/constraints-${PYTHON_MAJOR_MINOR_VER
 
 mkdir -pv "${CONSTRAINTS_DIR}"
 
-curl "${AIRFLOW_CONSTRAINTS_LOCATION}" --output "${LATEST_CONSTRAINT_FILE}"
+CONSTRAINTS_LOCATION="https://raw.githubusercontent.com/apache/airflow/${DEFAULT_CONSTRAINTS_BRANCH}/constraints-${PYTHON_MAJOR_MINOR_VERSION}.txt"
+readonly CONSTRAINTS_LOCATION
+
+curl "${CONSTRAINTS_LOCATION}" --output "${LATEST_CONSTRAINT_FILE}"
 
 echo
 echo "Freezing constraints to ${CURRENT_CONSTRAINT_FILE}"