carloea2 opened a new pull request, #8200:
URL: https://github.com/apache/texera/pull/8200

   ### What changes were proposed in this PR?
   
   Initialize output-port storage writers under the same first-registration 
guard that protects the port schema. Replaying an existing port assignment now 
leaves its original tracked writer pair intact.
   
   Before: one logical port remained registered, but each repeated assignment 
started another result and state writer pair.
   
   After: the first assignment initializes the port and its writers; repeated 
assignments do neither.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8199
   
   ### 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-duplicate-output-writers\amber\src\main\python',r'C:\Users\carlo\texera\texera\amber\src\main\python'];
 raise 
SystemExit(pytest.main([r'amber\src\test\python\core\architecture\packaging\test_output_manager.py','-q','-p','no:cacheprovider']))"
   
   Before the source change: 38 passed and 1 failed. The failure showed two 
setup calls for one registered port.
   
   After the fix, the OutputManager and port storage-writer lifecycle suites 
reported 44 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-duplicate-output-writers\amber\src\main\python',r'C:\Users\carlo\texera\texera\amber\src\main\python'];
 raise 
SystemExit(pytest.main([r'amber\src\test\python\core\architecture\packaging\test_output_manager.py',r'amber\src\test\python\core\storage\runnables\test_port_storage_writer.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.
   
   The production add_output_port probe now reports one registered port and one 
storage setup call after the assignment is repeated.
   
   ### 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]

Reply via email to