This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-4-test by this push:
     new 81dad40784d [v3-4-test] Run the lang-SDK conformance serializer in its 
own virtualenv (#75085) (#75111)
81dad40784d is described below

commit 81dad40784db9c97b337358cdbd5d9bb1454d592
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Oct 19 17:48:28 2026 +0200

    [v3-4-test] Run the lang-SDK conformance serializer in its own virtualenv 
(#75085) (#75111)
    
    The Python side of the SDK serialization conformance checks ran in the
    workspace .venv. prek runs the chart's kubeconform hook at the same time,
    and it syncs that .venv to the kubernetes-tests packages through
    `breeze k8s setup-env`. When the cncf.kubernetes provider landed there
    after the serializer's Python had started, provider discovery found the
    provider's entry point but not its sources on sys.path, and the check
    failed with "No module named 'airflow.providers.cncf'".
    
    Point uv at a dedicated .build/lang-sdk-serialization-venv instead.
    (cherry picked from commit d2a8457e768e1d4ac5b1dd52ba330945c0174d0d)
    
    
    Generated-by: Claude Opus 5
    
    Co-authored-by: Jarek Potiuk <[email protected]>
---
 scripts/ci/lang_sdk_serialization/compare.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/scripts/ci/lang_sdk_serialization/compare.py 
b/scripts/ci/lang_sdk_serialization/compare.py
index e6fbab441c8..ecb27acb733 100644
--- a/scripts/ci/lang_sdk_serialization/compare.py
+++ b/scripts/ci/lang_sdk_serialization/compare.py
@@ -45,6 +45,7 @@ from __future__ import annotations
 
 import argparse
 import json
+import os
 import re
 import shutil
 import subprocess
@@ -57,6 +58,11 @@ HERE = Path(__file__).resolve().parent
 REPO_ROOT = HERE.parents[2]
 TEST_DAGS = HERE / "test_dags.yaml"
 SCHEMA = REPO_ROOT / "airflow-core" / "src" / "airflow" / "serialization" / 
"schema.json"
+# Not the workspace's .venv: prek runs other projects' hooks at the same time, 
and some of them sync
+# that .venv to another set of packages (the chart's kubeconform hook installs 
the cncf.kubernetes
+# provider there through `breeze k8s setup-env`). A provider that lands there 
after Python started
+# has its entry point found but its sources off sys.path, and loading the 
config then fails.
+PYTHON_SERIALIZER_VENV = REPO_ROOT / ".build" / "lang-sdk-serialization-venv"
 
 # The features that a Dag of test_dags.yaml may require of an SDK. The comment 
at the top of
 # test_dags.yaml says what each one adds to a Dag.
@@ -139,8 +145,8 @@ def filter_cases(text: str, supported: frozenset[str]) -> 
tuple[str, list[str]]:
     return "".join(kept), ids
 
 
-def run(command: list[str]) -> None:
-    if subprocess.run(command, cwd=REPO_ROOT, check=False).returncode:
+def run(command: list[str], env: dict[str, str] | None = None) -> None:
+    if subprocess.run(command, cwd=REPO_ROOT, check=False, env=env).returncode:
         raise SystemExit(f"`{' '.join(command)}` failed")
 
 
@@ -297,7 +303,8 @@ def main(argv: list[str] | None = None) -> int:
             "--receive",
             str(sdk_output),
             str(received_output),
-        ]
+        ],
+        env={**os.environ, "UV_PROJECT_ENVIRONMENT": 
str(PYTHON_SERIALIZER_VENV)},
     )
 
     python = json.loads(python_output.read_text())

Reply via email to