This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push: new 66f28f2fc9 Disable `uv` upgrade checks temporarily (#37996) 66f28f2fc9 is described below commit 66f28f2fc9622813ce8e70fd2c341d73e880c90c Author: Jarek Potiuk <ja...@potiuk.com> AuthorDate: Fri Mar 8 17:38:58 2024 +0100 Disable `uv` upgrade checks temporarily (#37996) Until https://github.com/astral-sh/uv/issues/2302 is solved we should disable UV upgrade check as 0.1.16 version of `uv` does not properly validate our pyproject.toml with Draft PEP-0639 extension (licence-files). --- .github/workflows/ci.yml | 2 ++ scripts/ci/pre_commit/pre_commit_update_installers.py | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bc5983872..d7a8fc5a05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -641,6 +641,8 @@ jobs: --hook-stage manual update-installers if: always() + env: + UPGRADE_UV: "false" - name: "Run automated upgrade for chart dependencies" run: > pre-commit run diff --git a/scripts/ci/pre_commit/pre_commit_update_installers.py b/scripts/ci/pre_commit/pre_commit_update_installers.py index 1efc899c80..3a44a3c494 100755 --- a/scripts/ci/pre_commit/pre_commit_update_installers.py +++ b/scripts/ci/pre_commit/pre_commit_update_installers.py @@ -17,6 +17,7 @@ # under the License. from __future__ import annotations +import os import re import sys from pathlib import Path @@ -46,6 +47,13 @@ PIP_PATTERN = re.compile(r"AIRFLOW_PIP_VERSION=[0-9.]+") UV_PATTERN = re.compile(r"AIRFLOW_UV_VERSION=[0-9.]+") UV_GREATER_PATTERN = re.compile(r'"uv>=[0-9]+[0-9.]+"') +# For now we temporarily disable upgrading uv in the pre-commit hook because the latest version (0.1.16) +# is not compatible with our pyproject.toml using Draft https://peps.python.org/pep-0639/ +# licence-files key (which hatchling backend already supports nicely) +# We will re-enable it once the problem is addressed: +# Issue: https://github.com/astral-sh/uv/issues/2302 +UPGRADE_UV: bool = os.environ.get("UPGRADE_UV", "true").lower() == "true" + if __name__ == "__main__": pip_version = get_latest_pypi_version("pip") console.print(f"[bright_blue]Latest pip version: {pip_version}") @@ -58,8 +66,9 @@ if __name__ == "__main__": file_content = file.read_text() new_content = file_content new_content = re.sub(PIP_PATTERN, f"AIRFLOW_PIP_VERSION={pip_version}", new_content, re.MULTILINE) - new_content = re.sub(UV_PATTERN, f"AIRFLOW_UV_VERSION={uv_version}", new_content, re.MULTILINE) - new_content = re.sub(UV_GREATER_PATTERN, f'"uv>={uv_version}"', new_content, re.MULTILINE) + if UPGRADE_UV: + new_content = re.sub(UV_PATTERN, f"AIRFLOW_UV_VERSION={uv_version}", new_content, re.MULTILINE) + new_content = re.sub(UV_GREATER_PATTERN, f'"uv>={uv_version}"', new_content, re.MULTILINE) if new_content != file_content: file.write_text(new_content) console.print(f"[bright_blue]Updated {file}")