The GitHub Actions job "Required Checks" on texera.git/loop-feb has failed.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
f2113f500392b5e57c81ddbd6b2320ab2a212d9a / Xinyuan Lin <[email protected]>
fix(amber): loop expression scoping + fail loud on main-loop state errors

Two correctness fixes from a pre-merge review of the loop operators.

1. Loop expressions with generator expressions / comprehensions / lambdas
   NameError'd on their own loop variables. eval_output / run_update /
   eval_condition / the generated open() ran user code with
   `eval/exec(expr, {}, namespace)` -- an empty globals plus a locals-only
   mapping. A nested genexp/lambda scope resolves free names against globals,
   so `all(x > threshold for x in items)` raised NameError on `threshold`.
   Pass the namespace as globals instead; strip the `__builtins__` that exec
   injects so it never reaches the persisted loop state. Initialization now
   runs through a guarded `LoopStartOperator.run_initialization` helper,
   matching the eval_output / run_update / eval_condition pattern (generated
   open() is now a one-line delegate).

2. State serialization (state.to_tuple -> to_json) for a LoopStart's produced
   state runs on the main loop thread inside _emit_and_save_state, outside
   DataProcessor's guarded executor session. A non-JSON-serializable loop
   variable (e.g. a numpy array) raised a TypeError that propagated through
   run()'s @logger.catch(reraise=True), killing the thread and hanging the
   workflow with no operator-facing error. Report it like a UDF error
   (exception manager + ERROR console message + EXCEPTION_PAUSE) instead, and
   have _process_end_channel hold the region (skip port_completed / complete)
   when such an error is reported, so it surfaces rather than silently
   completing with single-iteration results.

Tests: TestLoopExpressionScoping (genexp/comprehension/lambda across
eval_output/run_update/eval_condition/run_initialization, plus no
`__builtins__` leak) and two main-loop tests (state-emit error is reported
not fatal; end channel holds the region on a reported error).

Report URL: https://github.com/apache/texera/actions/runs/29380872027

With regards,
GitHub Actions via GitBox

Reply via email to