jonasdedden opened a new pull request, #51012:
URL: https://github.com/apache/arrow/pull/51012

   ### Rationale for this change
   
   `arrow-gcsfs-test` fails on CI with `Could not start GCS emulator 
'storage-testbench' (failed to listen)` when the testbench is only slow to 
start. The message is wrong: the testbench listens immediately.
   
   `GcsTestbench` gives startup 10 seconds and hands that same duration to 
`LimitedTimeRetryPolicy`, so the loop makes one attempt rather than polling.
   
   That budget is tight because of how the testbench serves. Its entry point 
calls `run_simple(..., use_reloader=True)`, and Werkzeug binds the listening 
socket in the parent, then spawns a reloader child that re-imports grpcio, 
protobuf and
   flask before answering anything. Measured with werkzeug 3.0.4 and a 2.0s 
stand-in for those imports:
   
   ```
   use_reloader=1:  TCP accept at 2.10s   first HTTP response at 4.17s
   use_reloader=0:  TCP accept at 2.07s   first HTTP response at 2.07s
   ```
   
   `IgnoreStderr()` then discards Werkzeug's output, so the CI log cannot 
distinguish a slow start from a crash.
   
   See #51011.
   
   ### What changes are included in this PR?
   
   In `cpp/src/arrow/filesystem/gcsfs_test.cc`:
   
   * per-attempt retry budget of 5s, overall wait of 60s, so the loop polls
   * drop `IgnoreStderr()`, keeping the testbench's startup output in the test 
log
   * replace `(failed to listen)` with `(timed out waiting for it to become 
ready)`
   
   `util::Process::IgnoreStderr` now has no callers. Left in place to keep the 
diff small; happy to remove it if preferred.
   
   ### Are these changes tested?
   
   Covered by `arrow-gcsfs-test` itself, which is the thing that was failing.
   
   I could not build it locally, GCS needs google-cloud-cpp which is not 
available on this machine, so the change is unbuilt outside CI. The Werkzeug 
measurement above was run locally against the pinned werkzeug 3.0.4.
   
   I have not reproduced the CI failure on demand. It is a timing threshold, so 
this widens the margin and makes the next occurrence diagnosable rather than 
proving it gone.
   
   ### Are there any user-facing changes?
   
   No. Test-only.
   


-- 
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]

Reply via email to