Eliaaazzz opened a new pull request, #39367: URL: https://github.com/apache/beam/pull/39367
Fixes #39364. On Windows, `StoreArtifact.call()` fails in its first statement with an unchecked `InvalidPathException`, because the staged filename embeds the environment id and Java environment ids contain colons (`beam:env:embedded:v1`). The catch block only handled `IOException | InterruptedException`, so the failure was never reported anywhere: the queue consumer died silently, the gRPC `onNext` thread eventually blocked forever in `OverflowingSemaphore.aquire` (or in `currentOutput.put` once the 100-slot chunk queue filled), the reverse-retrieval stream was neither completed nor errored, and the submitting client waited forever in `ArtifactStagingService.offer`. This is what makes every portable Java ValidatesRunner test on Windows hang for its full 1200s JUnit timeout during pipeline submission. This PR makes any artifact storage failure fail fast and reach the client: * `StoreArtifact.call()` reports every exception to `totalPendingBytes`, including unchecked ones, before rethrowing. * `OverflowingSemaphore.aquire` observes a set exception even when permits are still available, instead of only after the 100 MB budget is exhausted. * The chunk producer no longer does an unconditional `BlockingQueue.put`; it polls with a timeout and rechecks the semaphore's exception, so a dead consumer cannot strand it. * The `GETCHUNK` error handler terminates the stream with `Status.INTERNAL` carrying the root cause description, instead of only flipping internal state, so `offer` completes exceptionally with the actual error. The regression test injects a destination provider that throws `InvalidPathException` (as `LocalResourceId.resolve` does on Windows) and streams an artifact in more chunks than the service buffers, so staging cannot run to completion before the failure is observed. Without the main change the test hangs and fails by timeout, reproducing the reported bug; with it, `offer` fails within seconds and the client sees the root cause. #39363 complements this fix by sanitizing the Windows-illegal characters out of the generated filenames. With both, portable Java pipelines can stage artifacts on Windows, and any future staging failure will surface immediately instead of hanging the submission. Tested with `gradlew :runners:java-fn-execution:test --tests "*ArtifactStagingServiceTest*"`: both tests pass, and with the main change reverted the new test fails by timeout as described in the issue. -- 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]
