diff --git a/composer/blog/gcp-tech-blog/unit-test-dags-cloud-build/constraints.txt b/composer/blog/gcp-tech-blog/unit-test-dags-cloud-build/constraints.txt new file mode 100644 index 00000000000..5784f524232 --- /dev/null +++ b/composer/blog/gcp-tech-blog/unit-test-dags-cloud-build/constraints.txt @@ -0,0 +1 @@ +SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions) diff --git a/composer/blog/gcp-tech-blog/unit-test-dags-cloud-build/requirements.txt b/composer/blog/gcp-tech-blog/unit-test-dags-cloud-build/requirements.txt index 21322637097..689304bfbbd 100644 --- a/composer/blog/gcp-tech-blog/unit-test-dags-cloud-build/requirements.txt +++ b/composer/blog/gcp-tech-blog/unit-test-dags-cloud-build/requirements.txt @@ -1,3 +1,2 @@ apache-airflow[gcp]==1.10.14 -SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions) apache-airflow-backport-providers-google==2021.3.3 diff --git a/composer/workflows/constraints.txt b/composer/workflows/constraints.txt new file mode 100644 index 00000000000..ca0e831ad6a --- /dev/null +++ b/composer/workflows/constraints.txt @@ -0,0 +1,2 @@ +pandas-gbq==0.14.1 # must be under 0.15.0 until https://github.com/apache/airflow/issues/15113 is addressed +SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions) diff --git a/composer/workflows/requirements.txt b/composer/workflows/requirements.txt index 1339996914b..1d8d02bd845 100644 --- a/composer/workflows/requirements.txt +++ b/composer/workflows/requirements.txt @@ -1,5 +1,4 @@ apache-airflow[gcp]==1.10.14 -SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions) kubernetes==12.0.1 scipy==1.4.1; python_version > '3.0' scipy==1.2.3; python_version < '3.0' diff --git a/noxfile-template.py b/noxfile-template.py index 8d8d188229a..cdd2812a24c 100644 --- a/noxfile-template.py +++ b/noxfile-template.py @@ -175,14 +175,16 @@ def blacken(session: nox.sessions.Session) -> None: def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): - if os.path.exists("constraints.txt"): - session.install("-r", "requirements.txt", "-c", "constraints.txt") - session.install("-r", "requirements.txt") + if os.path.exists("constraints.txt"): + session.install("-r", "requirements.txt", "-c", "constraints.txt") + else: + session.install("-r", "requirements.txt") if os.path.exists("requirements-test.txt"): - if os.path.exists("constraints-test.txt"): - session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt") - session.install("-r", "requirements-test.txt") + if os.path.exists("constraints-test.txt"): + session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt") + else: + session.install("-r", "requirements-test.txt") if INSTALL_LIBRARY_FROM_SOURCE: session.install("-e", _get_repo_root())