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 478272a4cf8 Bump flit_core in the provider pyproject template on CI 
upgrades (#73649)
478272a4cf8 is described below

commit 478272a4cf865a60d66e9ac113b6c6c5a4313000
Author: Andrew Chang <[email protected]>
AuthorDate: Thu Sep 24 18:03:55 2026 +0800

    Bump flit_core in the provider pyproject template on CI upgrades (#73649)
    
    The CI upgrade bumps the flit_core pin in every provider
    pyproject.toml, but those files are generated from
    pyproject_TEMPLATE.toml.jinja2, which still pinned the old version.
    The update-providers-build-files hook then regenerated them back to
    the old pin, so static checks failed on every upgrade PR that moved
    flit_core.
---
 scripts/ci/prek/upgrade_important_versions.py      | 10 +++++++++
 .../ci/prek/test_upgrade_important_versions.py     | 25 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/scripts/ci/prek/upgrade_important_versions.py 
b/scripts/ci/prek/upgrade_important_versions.py
index e47849cd608..1124935d80c 100755
--- a/scripts/ci/prek/upgrade_important_versions.py
+++ b/scripts/ci/prek/upgrade_important_versions.py
@@ -80,6 +80,16 @@ FILES_TO_UPDATE: list[tuple[Path, bool]] = [
         / "release_management_commands.py",
         False,
     ),
+    (
+        AIRFLOW_ROOT_PATH
+        / "dev"
+        / "breeze"
+        / "src"
+        / "airflow_breeze"
+        / "templates"
+        / "pyproject_TEMPLATE.toml.jinja2",
+        False,
+    ),
     (AIRFLOW_ROOT_PATH / "dev" / "breeze" / "doc" / "ci" / "02_images.md", 
True),
     (AIRFLOW_ROOT_PATH / "docker-stack-docs" / "build-arg-ref.rst", True),
     (AIRFLOW_ROOT_PATH / "devel-common" / "pyproject.toml", True),
diff --git a/scripts/tests/ci/prek/test_upgrade_important_versions.py 
b/scripts/tests/ci/prek/test_upgrade_important_versions.py
index 556fdf72bc4..e82ae344cfa 100644
--- a/scripts/tests/ci/prek/test_upgrade_important_versions.py
+++ b/scripts/tests/ci/prek/test_upgrade_important_versions.py
@@ -211,3 +211,28 @@ def 
test_is_version_within_cooldown_uses_per_package_override():
     assert _is_version_within_cooldown(releases, "1.0.1") is True
     # 6-hour override → version is older than that → "outside cooldown".
     assert _is_version_within_cooldown(releases, "1.0.1", cooldown_hours=6) is 
False
+
+
+def test_flit_core_upgrade_updates_provider_pyproject_template(monkeypatch):
+    """Provider pyproject.toml files are regenerated from the template, so its 
pin must move with them."""
+    from ci.prek import upgrade_important_versions as uiv
+
+    monkeypatch.setattr(uiv, "UPGRADE_FLIT_CORE", True)
+    monkeypatch.setattr(uiv, "UPGRADE_PYTHON", False)
+    template = (
+        uiv.AIRFLOW_ROOT_PATH
+        / "dev"
+        / "breeze"
+        / "src"
+        / "airflow_breeze"
+        / "templates"
+        / "pyproject_TEMPLATE.toml.jinja2"
+    )
+    files_to_update = dict(uiv.FILES_TO_UPDATE)
+    assert template in files_to_update
+
+    new_content = uiv.update_file_with_versions(
+        template.read_text(), files_to_update[template], {"flit_core": 
"99.0.0"}, latest_python_versions={}
+    )
+
+    assert 'requires = ["flit_core==99.0.0"]' in new_content

Reply via email to