jiangxt2 commented on code in PR #14206:
URL: https://github.com/apache/gravitino/pull/14206#discussion_r4548126613


##########
clients/client-python/requirements.txt:
##########
@@ -17,5 +17,7 @@
 
 
 # Runtime dependencies for the core metadata client.
-dataclasses-json==0.6.7
-simplejson==3.20.1
+# Keep the reviewed pre-1.0 API line used by the DTO serializers.
+dataclasses-json>=0.6.7,<0.7
+# Initial compatibility range is limited to reviewed releases.
+simplejson>=3.20.1,<=4.2.0

Review Comment:
   Thanks. I changed the bounds to `simplejson<5` and `pyarrow<27`, removed the 
outdated caps where there is no known incompatibility, and kept the dev pins. 
The new `ray-latest` CI case installs the latest compatible releases.
   



##########
clients/client-python/requirements-lance.txt:
##########
@@ -16,9 +16,9 @@
 # under the License.
 
 # Lance integration deps. `lance-ray` owns the compatible `lance-namespace`
-# dependency, so do not pin `lance-namespace` here separately.
+# dependency, so do not constrain `lance-namespace` here separately.
 # Installed via the `lance` extra (`pip install -e .[lance]`).
-# The same pins are also included in requirements-dev.txt so that the default
-# integration-test run works out of the box with `pip install -r 
requirements-dev.txt`.
-ray==2.55.1
-lance-ray==0.4.2
+# The default integration-test environment remains pinned independently in
+# requirements-dev.txt.
+ray>=2.55.1,<=2.59.0

Review Comment:
   Thanks. I removed the Ray upper bound; the Lance extra now declares 
`ray>=2.55.1`.
   



##########
clients/client-python/requirements-lance.txt:
##########
@@ -16,9 +16,9 @@
 # under the License.
 
 # Lance integration deps. `lance-ray` owns the compatible `lance-namespace`
-# dependency, so do not pin `lance-namespace` here separately.
+# dependency, so do not constrain `lance-namespace` here separately.
 # Installed via the `lance` extra (`pip install -e .[lance]`).
-# The same pins are also included in requirements-dev.txt so that the default
-# integration-test run works out of the box with `pip install -r 
requirements-dev.txt`.
-ray==2.55.1
-lance-ray==0.4.2
+# The default integration-test environment remains pinned independently in
+# requirements-dev.txt.
+ray>=2.55.1,<=2.59.0
+lance-ray>=0.3.0,<=0.5.0

Review Comment:
   Thanks. The Lance matrix and documentation now include lance-ray 0.5.0 with 
Ray 2.59.0 and lance-namespace 0.13.0, separately from the released 1.3.0 
matrix. A local REST write/read/filter run returned success, although its 
detailed unittest output was not captured.
   



##########
clients/client-python/scripts/run_core_compatibility_matrix.py:
##########
@@ -0,0 +1,462 @@
+# 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.
+
+"""Verify installed core SDK artifacts in isolated Ray dependency 
environments."""
+
+from __future__ import annotations
+
+import argparse
+import hashlib
+import json
+import os
+import shutil
+import subprocess
+import sys
+import socket
+import time
+from contextlib import contextmanager, nullcontext
+from dataclasses import dataclass
+from email.parser import Parser
+from pathlib import Path
+from tempfile import mkdtemp
+from urllib.parse import urlsplit
+from urllib.request import ProxyHandler, build_opener
+from zipfile import ZipFile
+
+CLIENT_ROOT = Path(__file__).resolve().parents[1]
+CORE_TESTS = (
+    "tests.unittests.test_gravitino_client",
+    "tests.unittests.test_metalake",
+    "tests.unittests.test_base_schema_catalog",
+    "tests.unittests.test_relational_catalog",
+    "tests.unittests.test_relational_table",
+    "tests.unittests.dto.semantic.test_semantic_wire_compatibility",
+    "tests.unittests.api.semantic.test_semantic_model_value_semantics",
+    "tests.unittests.api.semantic.test_semantic_model_supporting_types",
+    "tests.compatibility.test_core_metadata",
+)
+PROBE = """
+import importlib.metadata as metadata
+import json
+import sys
+from pathlib import Path
+import gravitino
+names = json.loads(sys.argv[1])
+print(json.dumps({
+    "python": list(sys.version_info[:2]),
+    "prefix": str(Path(sys.prefix).resolve()),
+    "sdk_path": str(Path(gravitino.__file__).resolve()),
+    "versions": {name: metadata.version(name) for name in names},
+}))
+"""
+
+
+@dataclass(frozen=True)
+class CompatibilityCase:
+    """One declared consumer environment and its exact dependency 
assertions."""
+
+    name: str
+    python_minor: tuple[int, int]
+    simplejson: str
+    arrow: str | None = None
+    pandas: str | None = None
+
+    def dependencies(self) -> dict[str, str]:
+        """Return only the versions whose compatibility this case claims."""
+        dependencies = {"dataclasses-json": "0.6.7", "simplejson": 
self.simplejson}
+        if self.arrow is not None:
+            if self.pandas is None:
+                raise ValueError("Ray cases require an explicit pandas 
version")
+            dependencies.update(
+                {
+                    "ray": "2.59.0",
+                    "pyarrow": self.arrow,
+                    "pandas": self.pandas,
+                }
+            )
+        return dependencies
+
+    def requirements(self) -> list[str]:
+        """Return normal pip requirements, with Ray's Data extra when 
needed."""
+        return [
+            f"{'ray[data]' if name == 'ray' else name}=={version}"
+            for name, version in self.dependencies().items()
+        ]
+
+
+CASES = (

Review Comment:
   Thanks for testing this. I added a Python 3.10 `storage-min` CI case with 
the storage lower bounds and the ten suggested test modules. The 71 tests 
passed locally with the installed SDK.
   



##########
clients/client-python/scripts/run_core_compatibility_matrix.py:
##########
@@ -0,0 +1,462 @@
+# 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.
+
+"""Verify installed core SDK artifacts in isolated Ray dependency 
environments."""
+
+from __future__ import annotations
+
+import argparse
+import hashlib
+import json
+import os
+import shutil
+import subprocess
+import sys
+import socket
+import time
+from contextlib import contextmanager, nullcontext
+from dataclasses import dataclass
+from email.parser import Parser
+from pathlib import Path
+from tempfile import mkdtemp
+from urllib.parse import urlsplit
+from urllib.request import ProxyHandler, build_opener
+from zipfile import ZipFile
+
+CLIENT_ROOT = Path(__file__).resolve().parents[1]
+CORE_TESTS = (
+    "tests.unittests.test_gravitino_client",
+    "tests.unittests.test_metalake",
+    "tests.unittests.test_base_schema_catalog",
+    "tests.unittests.test_relational_catalog",
+    "tests.unittests.test_relational_table",
+    "tests.unittests.dto.semantic.test_semantic_wire_compatibility",
+    "tests.unittests.api.semantic.test_semantic_model_value_semantics",
+    "tests.unittests.api.semantic.test_semantic_model_supporting_types",
+    "tests.compatibility.test_core_metadata",
+)
+PROBE = """
+import importlib.metadata as metadata
+import json
+import sys
+from pathlib import Path
+import gravitino
+names = json.loads(sys.argv[1])
+print(json.dumps({
+    "python": list(sys.version_info[:2]),
+    "prefix": str(Path(sys.prefix).resolve()),
+    "sdk_path": str(Path(gravitino.__file__).resolve()),
+    "versions": {name: metadata.version(name) for name in names},
+}))
+"""
+
+
+@dataclass(frozen=True)
+class CompatibilityCase:
+    """One declared consumer environment and its exact dependency 
assertions."""
+
+    name: str
+    python_minor: tuple[int, int]
+    simplejson: str
+    arrow: str | None = None
+    pandas: str | None = None
+
+    def dependencies(self) -> dict[str, str]:
+        """Return only the versions whose compatibility this case claims."""
+        dependencies = {"dataclasses-json": "0.6.7", "simplejson": 
self.simplejson}
+        if self.arrow is not None:
+            if self.pandas is None:
+                raise ValueError("Ray cases require an explicit pandas 
version")
+            dependencies.update(
+                {
+                    "ray": "2.59.0",
+                    "pyarrow": self.arrow,
+                    "pandas": self.pandas,
+                }
+            )
+        return dependencies
+
+    def requirements(self) -> list[str]:
+        """Return normal pip requirements, with Ray's Data extra when 
needed."""
+        return [
+            f"{'ray[data]' if name == 'ray' else name}=={version}"
+            for name, version in self.dependencies().items()
+        ]
+
+
+CASES = (
+    CompatibilityCase("core-min", (3, 10), "3.20.1"),
+    CompatibilityCase("ray-arrow17", (3, 12), "4.2.0", "17.0.0", "2.2.3"),
+    CompatibilityCase("ray-arrow23", (3, 12), "4.2.0", "23.0.1", "2.3.3"),
+    CompatibilityCase("ray-arrow26", (3, 12), "4.2.0", "26.0.0", "3.0.6"),
+)
+
+
+def clean_environment() -> dict[str, str]:
+    """Remove inherited source imports and version-check bypasses."""
+    environment = os.environ.copy()
+    for name in ("PYTHONPATH", "PYTHONHOME", 
"GRAVITINO_VERSION_CHECK_DISABLED"):
+        environment.pop(name, None)
+    environment["PYTHONNOUSERSITE"] = "1"
+    no_proxy = environment.get("no_proxy", environment.get("NO_PROXY", ""))
+    environment["NO_PROXY"] = ",".join(
+        value for value in (no_proxy, "localhost", "127.0.0.1", "::1") if value
+    )
+    environment["no_proxy"] = environment["NO_PROXY"]
+    return environment
+
+
+def run_command(
+    command: list[str], working_dir: Path, log: Path, environment: dict[str, 
str]
+) -> str:
+    """Run a command, preserve its output, and reject any nonzero result."""
+    result = subprocess.run(

Review Comment:
   Thanks. Commands now time out after 600 seconds and convert `TimeoutExpired` 
to `RuntimeError` so the case is recorded as failed. Environment creation has a 
separate 120-second timeout.
   



-- 
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]

Reply via email to