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

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-8238-b143a4fd72160f71ceb88fa80d790c5f8d146db6
in repository https://gitbox.apache.org/repos/asf/texera.git

commit 40b507df8a3d19ec0ed7bd169937b09e25d4f79d
Author: carloea2 <[email protected]>
AuthorDate: Wed Oct 7 20:34:32 2026 +0000

    feat(pyamber): align VFS resource wire values (#8238)
    
    ### What changes were proposed in this PR?
    
    Align the Python runtime statistics and console message resource values
    with the lowercase VFS wire format produced by Scala. The decoder keeps
    its existing case normalization.
    
    The regression test uses literal Scala wire values instead of values
    read from the Python enum.
    
    ### Any related issues, documentation, discussions?
    
    Closes #8237
    
    ### How was this PR tested?
    
    Retested on upstream main at b143a4fd7216. The new regression cases fail
    before the change: 2 failed, 34 passed. With the change, all 36 tests
    pass.
    
    ```powershell
    & 'C:/Users/carlo/texera/venv312/Scripts/python.exe' -m pytest -q -p 
no:cacheprovider amber/src/test/python/core/storage/test_vfs_uri_factory.py 
amber/src/test/python/core/storage/test_document_factory.py
    & 'C:/Users/carlo/texera/venv312/Scripts/python.exe' -m ruff check 
amber/src/main/python amber/src/test/python
    & 'C:/Users/carlo/texera/venv312/Scripts/python.exe' -m ruff format --check 
amber/src/main/python amber/src/test/python
    ```
    
    Lint and formatting pass for all Python source and test files.
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Codex
---
 amber/src/main/python/core/storage/vfs_uri_factory.py      |  4 ++--
 amber/src/test/python/core/storage/test_vfs_uri_factory.py | 11 +++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/amber/src/main/python/core/storage/vfs_uri_factory.py 
b/amber/src/main/python/core/storage/vfs_uri_factory.py
index 37a28cbbf0..a4e7899b07 100644
--- a/amber/src/main/python/core/storage/vfs_uri_factory.py
+++ b/amber/src/main/python/core/storage/vfs_uri_factory.py
@@ -33,8 +33,8 @@ from proto.org.apache.texera.amber.core import (
 
 class VFSResourceType(str, Enum):
     RESULT = "result"
-    RUNTIME_STATISTICS = "runtimeStatistics"
-    CONSOLE_MESSAGES = "consoleMessages"
+    RUNTIME_STATISTICS = "runtimestatistics"
+    CONSOLE_MESSAGES = "consolemessages"
     STATE = "state"
 
 
diff --git a/amber/src/test/python/core/storage/test_vfs_uri_factory.py 
b/amber/src/test/python/core/storage/test_vfs_uri_factory.py
index 24ad583ae6..25fd824976 100644
--- a/amber/src/test/python/core/storage/test_vfs_uri_factory.py
+++ b/amber/src/test/python/core/storage/test_vfs_uri_factory.py
@@ -113,6 +113,17 @@ class TestDecodeUriRoundTrip:
         assert components.global_port_id is None
         assert components.resource_type == VFSResourceType.RESULT
 
+    @pytest.mark.parametrize(
+        ("suffix", "resource_type"),
+        [
+            ("runtimestatistics", VFSResourceType.RUNTIME_STATISTICS),
+            ("consolemessages", VFSResourceType.CONSOLE_MESSAGES),
+        ],
+    )
+    def test_scala_resource_type_wire_format_decodes(self, suffix, 
resource_type):
+        uri = f"vfs:///wid/11/eid/22/{suffix}"
+        assert VFSURIFactory.decode_uri(uri).resource_type == resource_type
+
 
 class TestDecodeUriErrorPaths:
     def test_rejects_non_vfs_scheme(self):

Reply via email to