carloea2 opened a new pull request, #8192:
URL: https://github.com/apache/texera/pull/8192
### What changes were proposed in this PR?
Preserve the canonical VFS resource suffix when the Python decoder looks it
up. This lets Python decode the runtimeStatistics and consoleMessages URIs that
Texera already produces and that Scala accepts.
Before: both camel-case resource suffixes were lowercased and rejected.
After: all canonical resource suffixes decode, while the existing
unknown-resource check still rejects invalid suffixes.
### Any related issues, documentation, discussions?
Closes #8191
### How was this PR tested?
Regression test first:
$env:PYTHONDONTWRITEBYTECODE='1';
C:\Users\carlo\texera\texera\.venv312\Scripts\python.exe -c "import sys,pytest;
sys.path[:0]=[r'C:\Users\carlo\texera\texera-worktrees\fix-pyamber-vfs-resource-case\amber\src\main\python',r'C:\Users\carlo\texera\texera\amber\src\main\python'];
raise
SystemExit(pytest.main([r'amber\src\test\python\core\storage\test_vfs_uri_factory.py','-q','-p','no:cacheprovider']))"
Before the source change: 19 passed and 2 failed. Both failures were the
newly covered valid camel-case resource types.
After the fix, the VFS URI and document factory suites reported 32 passed:
$env:PYTHONDONTWRITEBYTECODE='1';
C:\Users\carlo\texera\texera\.venv312\Scripts\python.exe -c "import sys,pytest;
sys.path[:0]=[r'C:\Users\carlo\texera\texera-worktrees\fix-pyamber-vfs-resource-case\amber\src\main\python',r'C:\Users\carlo\texera\texera\amber\src\main\python'];
raise
SystemExit(pytest.main([r'amber\src\test\python\core\storage\test_vfs_uri_factory.py',r'amber\src\test\python\core\storage\test_document_factory.py','-q','-p','no:cacheprovider']))"
C:\Users\carlo\texera\texera\.venv312\Scripts\ruff.exe check
amber/src/main/python amber/src/test/python
C:\Users\carlo\texera\texera\.venv312\Scripts\ruff.exe format --check
amber/src/main/python amber/src/test/python
Result: all checks passed and 213 files were already formatted.
A live production decoder probe confirmed runtimeStatistics,
consoleMessages, result, and state all decode to their canonical resource types
after the fix.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex, GPT-5
--
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]