Yicong-Huang opened a new pull request, #4719: URL: https://github.com/apache/texera/pull/4719
### What changes were proposed in this PR? Adds pytest coverage for `ExecutorManager.update_executor` (extending the existing `test_executor_manager.py`) and the `UpdateExecutorHandler` that wraps it (new `test_update_executor_handler.py`). ### Any related issues, documentation, discussions? Closes #4718. Test-isolation note (not pinned by these tests): the existing `executor_manager` fixture has a buggy cleanup guard — `if hasattr(manager, "_fs"): manager.close()` checks for `_fs` but the `cached_property` actually stores under `fs`, so `close()` is never invoked. Combined with the fact that every fresh `ExecutorManager` resets `executor_version` to 0 and thus reuses the module name `udf-v1`, this leaves stale modules in `sys.modules` with paths that point at deleted tmp dirs from earlier tests. The new `TestUpdateExecutor` therefore avoids asserting on the *class* of the loaded executor and instead checks dict-state preservation via setattr/getattr, so it works regardless of which cached `udf-v1` happens to satisfy the import. A separate fix would untangle the cleanup guard and probably move version numbering off of the per-manager counter. ### How was this PR tested? ``` cd amber/src/main/python ruff check core/architecture/managers/test_executor_manager.py core/architecture/handlers/control/test_update_executor_handler.py ruff format --check core/architecture/managers/test_executor_manager.py core/architecture/handlers/control/test_update_executor_handler.py python -m pytest core/architecture/managers/test_executor_manager.py core/architecture/handlers/control/test_update_executor_handler.py ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-4-7) -- 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]
