Repository navigation
Description
Task Summary
Reduce CI log verbosity from per-worker / per-message amber engine logs. AmberLogging names loggers "<actorId>] [<ClassName>", so the org.apache=WARN rule in logback.xml never matches engine classes and they all emit at the root INFO level — flooding loop/integration CI runs with thousands of lines per job. Demote the chatty statements to DEBUG, quiet the amber CI steps with a WARN backstop wired to GitHub's Enable debug logging re-run toggle, and track the remaining hot-path candidates listed below.
Task Type
- Refactor / Cleanup
- DevOps / Deployment / CI
- Testing / QA
- Documentation
- Performance
- Other
Problem
CI logs — especially the amber integration specs (e.g. LoopIntegrationSpec) — are flooded with per-worker / per-message engine logs at INFO. A single loop run emits thousands of lines: two full ChannelIdentity dumps per embedded control message (ECM), plus per-worker lifecycle and per-region lines, repeated on every loop iteration because workers are recreated each iteration. This bloats log storage and scroll, slows the run, and buries genuine failures.
Root cause
AmberLogging names each logger "<actorId>] [<ClassName>" so the logback pattern [%logger] can render both the actor id and the class in one field. The side effect: these logger names start with the actor id (e.g. WF6-…, COORDINATOR), not org.apache…, so the
<logger name="org.apache" level="WARN"/>rule in amber/src/main/resources/logback.xml never matches the engine classes. They all fall through to the root logger (${TEXERA_SERVICE_LOG_LEVEL:-INFO}) and emit at INFO. Lowering the org.apache level does nothing for them.
Noise categories
| Volume | Message | Level | Source |
|---|---|---|---|
| Huge (3×/ECM, full URI dump) | receive / process / send ECM |
INFO | DataProcessor.scala, main_loop.py |
| High | register <id> -> Actor[…] |
INFO | PekkoActorRefMappingService.scala |
| High (misleading) | …is not reachable anymore, it might have crashed — fires on normal teardown |
WARN | PekkoActorRefMappingService.scala |
| High (race noise) | unknown identifier |
WARN | PekkoActorRefMappingService.scala |
| Per worker | worker replay log writing conf, DP thread started/exits, Starting the worker. |
INFO | WorkflowActor, DPThread, StartHandler |
| Per region | Region N successfully terminated. |
INFO | RegionExecutionManager.scala |
| Per operator | …completed, # of input ports… |
INFO | DataProcessor.scala |
| Per client msg | client actor cannot handle … |
WARN | ClientActor.scala |
Fix (this task)
- Demote the chatty per-message / per-worker-lifecycle / per-region logs to
DEBUGso they no longer print at the defaultINFOlevel (CI, local, and prod). This includes the misleadingWARNs that fire on normal operation (the teardown message — now reworded to state only what the mapping service knows — theunknown identifierregistration race, and theclient actor cannot handlefallthrough). Genuine fault paths are left untouched (DP Thread exists unexpectedlyERROR,Failed to fetch actorRefWARN,Error when terminating regionWARN). - CI backstop on the amber unit and integration steps in
build.yml, wired to GitHub's Enable debug logging toggle:${{ runner.debug == '1' && 'DEBUG' || … }}— a normal run pinsTEXERA_SERVICE_LOG_LEVEL=WARNandUDF_PYTHON_LOG_STREAMHANDLER_LEVEL=WARNING; a debug re-run flips both toDEBUGso the full engine trace comes back on demand. Mind the vocabularies: logback wantsWARN, while loguru andpekko.loglevelonly acceptWARNING(PekkoConfig.normalizePekkoLogLeveltranslates the logback spelling for pekko; the Python env var carriesWARNINGdirectly). timeout-minutes: 25on the amber-integration job: a Python UDF worker that fails to start leaves the JVM blocked on the proxy handshake with no internal timeout, which previously ran to GitHub's 6h cap (green runs take 9–17 min).
Follow-up candidates (not in the first PR)
An engine-wide sweep surfaced these additional hot-path logs that could be demoted in a later pass:
| Location | Level | Why noisy |
|---|---|---|
AsyncRPCClient.scala (receive reply: null …) |
INFO | Per control-reply; inconsistent sibling of the debug branch a few lines above |
range_based_shuffle_partitioner.py (got {partitioning}) |
INFO | Per-worker partition setup; outlier — no other partitioner logs at INFO in its constructor |
tuple.py (out-of-range / cast warnings) |
WARNING | Data-conditional per-tuple/per-field; can flood on a single bad column. Genuinely useful, so consider once-per-column dedupe rather than demotion |
ClientActor.scala (Amber Client received: …) |
INFO | Per-message fallback; low confidence it's a real flood |
fs/__init__.py pkg_resources is deprecated UserWarning |
stderr | Emitted at import time by the fs dependency in every spawned Python worker — it is a Python warnings emission, not a loguru log, so no log-level knob catches it; needs a targeted warnings filter (or PYTHONWARNINGS) before the core import |
EndHandler / RegionExecutionManager teardown retry storm |
ERROR+WARN | worker still has unprocessed messages + Failed to terminate region … attempt 1 of 150 with full stacks on an expected teardown race that succeeds on retry — behavioral fix, not just a level change |
Latent test note: PekkoConfigSpec asserts pekko.stdout-loglevel == "INFO" unguarded. It is safe today only because stdout-loglevel is hardcoded in cluster.conf. If a ${?TEXERA_SERVICE_LOG_LEVEL} override is ever added to that key, the assertion will start failing in the CI step that now sets WARN — either move it inside the sys.env/sys.props guard or add a comment noting the dependency.
Activity
chore(amber): reduce engine log verbosity and pin the CI log-level ba…