vincbeck commented on code in PR #48223: URL: https://github.com/apache/airflow/pull/48223#discussion_r2021129400
########## kubernetes-tests/pyproject.toml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +[build-system] +requires = [ "hatchling==1.27.0" ] +build-backend = "hatchling.build" + +[project] +name = "apache-airflow-kubernetes-tests" +description = "Docker tests for Apache Airflow" Review Comment: ```suggestion description = "Kubernetes tests for Apache Airflow" ``` ########## contributing-docs/testing/unit_tests.rst: ########## @@ -1306,26 +1306,52 @@ downgraded dependencies will contain both Airflow and Google Provider dependenci + gcloud-aio-bigquery==6.1.2 - gcloud-aio-storage==9.2.0 +You can reproduce the same set of dependencies in your local virtual environment by: -How to fix failing lowest-direct dependency resolution tests -............................................................ +.. code-block:: bash -When your tests pass in regular test, but fail in "lowest-direct" dependency resolution tests, you need -to figure out the lower-bindings missing in ``hatch_build.py`` (for Airflow core dependencies) or -in the corresponding provider's ``provider.yaml`` file. This is usually a very easy thing that takes a little -bit of time to figure out especially if you just added new feature from a library that you use, just check in -the release notes what is the minimum version of the library that you can use and set it as the -``>=VERSION`` in the ``hatch_build.py`` or ``provider.yaml`` file. For ``hatch_build.py`` changes you do not -need to do anything else, for ``provider.yaml`` file you need to regenerate generated dependencies -by running ``pre-commit run`` in the provider directory after adding the file to git or just letting the -pre-commit to do it's job if you already has pre-commit installed via ``pre-commit install`` - then just -committing the change will regenerate the dependencies automatically. - -After that, re-run the ``breeze shell --force-lowest-dependencies`` command and see if the tests pass. + cd airflow-core + uv sync --resolution lowest-direct + +for airflow core, and .. code-block:: bash - breeze shell --force-lowest-dependencies --test-type "Providers[PROVIDER_ID]" + cd providers/provider_id + uv sync --resolution lowest-direct + +for the providers. + +How to fix failing lowest-direct dependency resolution tests +............................................................ + +When your tests pass in regular test, but fail in "lowest-direct" dependency resolution tests, you need +to figure out one of the problems: + +* lower-bindings missing in the ``pyproject.toml`` file (in ``airflow-core`` or corresponding provider). + This is usually a very easy thing that takes a little bit of time to figure out especially if yo Review Comment: ```suggestion This is usually a very easy thing that takes a little bit of time to figure out especially if you ``` ########## contributing-docs/testing/unit_tests.rst: ########## @@ -1336,8 +1362,8 @@ you to quickly figure out the right version without knowing the root cause of th Assume you suspect library "foo" that was downgraded from 1.0.0 to 0.1.0 is causing the problem. Bisecting technique looks like follows: -* enter breeze with ``--force-lowest-dependencies`` flag (the ``foo`` library is downgraded to 0.1.0). Your - test should fail. +* Run ``uv sync --resolution lowest-direct``(the ``foo`` library is downgraded to 0.1.0). Your test should Review Comment: Very nice!! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
