This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-1-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 63879619d26d8a91765bcc6c95d0b6c322772101 Author: Jarek Potiuk <[email protected]> AuthorDate: Wed Jul 28 21:36:29 2021 +0200 Do not use constraints when preparing venv for k8s tests on CI (#17290) When k8s virtualenv is prepared to run k8s tests we are using constraints, this however might lead to a problem when we increase minimum version of an affected dependency and it conflicts with the constraints stored in main. Therefore in case we run tests in CI (which is indicated by specific pull tag that we use) we do not use constraints for installing the kubernetes venv. It should be fine, as we are pretty much running this only as a vehicle to run tests. (cherry picked from commit 96bd4a11689e2dca052ec642010fe19c1cc830a9) --- scripts/ci/kubernetes/ci_run_kubernetes_tests.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh b/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh index 6cab719..a97f692 100755 --- a/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh +++ b/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh @@ -89,11 +89,19 @@ function create_virtualenv() { pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}" - pip install pytest freezegun \ - --constraint "https://raw.githubusercontent.com/${CONSTRAINTS_GITHUB_REPOSITORY}/${DEFAULT_CONSTRAINTS_BRANCH}/constraints-${HOST_PYTHON_VERSION}.txt" + local constraints=( + --constraint + "https://raw.githubusercontent.com/${CONSTRAINTS_GITHUB_REPOSITORY}/${DEFAULT_CONSTRAINTS_BRANCH}/constraints-${HOST_PYTHON_VERSION}.txt" + ) + if [[ -n ${GITHUB_REGISTRY_PULL_IMAGE_TAG=} ]]; then + # Disable constraints when building in CI with specific version of sources + # In case there will be conflicting constraints + constraints=() + fi + + pip install pytest freezegun "${constraints[@]}" - pip install -e ".[cncf.kubernetes,postgres]" \ - --constraint "https://raw.githubusercontent.com/${CONSTRAINTS_GITHUB_REPOSITORY}/${DEFAULT_CONSTRAINTS_BRANCH}/constraints-${HOST_PYTHON_VERSION}.txt" + pip install -e ".[cncf.kubernetes,postgres]" "${constraints[@]}" } function run_tests() {
