apache / apache/texera

Flaky WorkerSpec: input-port AssignPortRequest violates addPort size invariant

Open
#6,036 0 comments 0 reactions 1 assignee Claimed by @Ma77Ball View on GitHub
Dominant language
Scala
Stars
314
Forks
187
Avg merge
1d 21h
Merged PRs (30d)
214

Description

### What happened?
`WorkerSpec` intermittently times out in the amber CI job; it was the lone failure on an unrelated PR's run (`Total 1078, Failed 1`). Root cause: `mkWorker` builds the input-port `AssignPortRequest` with `storageUris = List("")` (size 1) and `partitionings = List()` (size 0). `InputManager.addPort` asserts the two lists are equal length, so it throws `AssertionError` on every run. `AsyncRPCServer.invokeMethod` then swallows that error (its `throw err` is commented out), leaving the input port unregistered and the worker half-configured, so whether the expected tuples arrive within the test's 3s window is timing-dependent. Production never violates the invariant because `RegionExecutionCoordinator` derives both lists from the same `storagePairs`, so their sizes always match.
### How to reproduce?
Run `sbt "WorkflowExecutionService/testOnly *WorkerSpec"`. On every run the assertion fires (grep the test log for `assertion failed`, count = 3); the suite passes or times out depending on thread scheduling, which is why it is flaky rather than consistently red.
### Version/Branch
main (amber build / `WorkflowExecutionService` test job).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.