Ma77Ball opened a new issue, #5357:
URL: https://github.com/apache/texera/issues/5357
### What happened?
After #5077 untracked the generated Python betterproto bindings
(`amber/src/main/python/proto/`) and made them regenerate at build time, a
fresh checkout that has never generated the bindings fails to launch any Python
UDF worker. The worker exits at import with:
```
ModuleNotFoundError: No module named 'proto'
File ".../core/models/internal_queue.py", line 31, in <module>
from proto.org.apache.texera.amber.core import ChannelIdentity
```
This breaks every Python operator (a visualizer is just a common way to hit
it), not only visualizers.
The root cause is that the `genPythonProto` sbt task that used to regenerate
the bindings on `Compile / compile` was dropped before #5077 merged, leaving
`bin/python-proto-gen.sh` invoked only by CI/docker. A local `sbt` build never
regenerates the bindings, so a clean clone has no `proto/` package and the
worker cannot import it. The failure also surfaces only as a raw
`ModuleNotFoundError` with no hint that the bindings must be generated.
Expected: a local build regenerates the bindings so Python workers start,
and a missing `proto/` package produces an actionable error.
### How to reproduce?
1. Clone the repo fresh (or delete `amber/src/main/python/proto/`).
2. Build/run the engine without running `bin/python-proto-gen.sh`.
3. Run any workflow with a Python operator (e.g. a Python visualizer).
4. The Python worker fails at startup with `ModuleNotFoundError: No module
named 'proto'`.
### Branch
main
### Relevant log output
Traceback (most recent call last):
File ".../amber/src/main/python/texera_run_python_worker.py", line 21, in
<module>
from core.python_worker import PythonWorker
File ".../core/python_worker.py", line 21, in <module>
from core.models.internal_queue import InternalQueue
File ".../core/models/__init__.py", line 22, in <module>
from .internal_queue import InternalQueue
File ".../core/models/internal_queue.py", line 31, in <module>
from proto.org.apache.texera.amber.core import ChannelIdentity
ModuleNotFoundError: No module named 'proto'
--
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]