Skip to content

EvergreenService GitHub requests have no timeout and can hang the UI #11

Open

Description

@lgnap

Contexte

EvergreenService calls the GitHub API (latest release, announce commit, announce content) with Vert.x WebClient requests that have no timeout. If GitHub is slow or unreachable (firewalled network, captive portal), the Future never completes and the UI waits indefinitely for the version/announce check.

Description

Add a request timeout to each of the three webClient.get(443, ...) calls in EvergreenService and handle the timeout like any other failure: the announce path must fall back to the built-in announce (GITHUB_API_BUILTIN_ANNOUNCE_CONTENT_EN/FR) already present in the class, and the latest-release path must fail fast so the frontend can move on.

Fichiers concernes

  • web-ui/src/main/java/studio/webui/service/EvergreenService.java:62-65, 78-81, 93-96 — add .timeout(...) before each .send(...); extract a HTTP_TIMEOUT_MS constant
  • web-ui/src/test/java/studio/webui/service/EvergreenServiceTimeoutTest.java (new) — point the client at a local Vert.x HttpServer that never answers and assert the future fails within the bound

Plan d'implementation

  1. Check the exact Vert.x version in the root pom.xml and use the matching HttpRequest#timeout(long) API.
  2. Add a HTTP_TIMEOUT_MS constant (5000) and apply .timeout(HTTP_TIMEOUT_MS) to the three requests.
  3. Make the host/port injectable (package-private constructor or overridable fields) so a test can target a stalling local server without touching production behaviour.
  4. Write the test: stalling server → latest() and announce() fail (or fall back) in < timeout + margin.
  5. mvn -pl web-ui test green.

Criteres d'acceptation

  • All three GitHub requests carry a timeout
  • On timeout, announce() resolves with the built-in announce instead of hanging, latest() fails with a cause
  • Test proves the futures complete within the bound against a stalling server
  • mvn -pl web-ui test green on Ubuntu and Windows CI

Complexite

S

Activity

  1. lgnap commented on Sep 11, 2026

    @lgnap
    OwnerAuthor

    Prise en charge par Claude Code (instance tuxedo:40112:d397e957, branche fix/issue-11-evergreen-http-timeout).

  2. lgnap commented on Sep 11, 2026

    @lgnap
    OwnerAuthor

    Implemented in antoinevalentinHA#57 (branch fix/issue-11-evergreen-http-timeout).

    • HTTP_TIMEOUT_MS (5 s) on the three GitHub requests; package-private constructor as a test seam
    • EvergreenServiceTimeoutTest (5 tests): each request fails within a bound against a stalling server (second hop of announce() included) + nominal controls; verified red without the fix
    • Deviation from the ticket: no fallback to the built-in announce on timeout — it is the 2020 first-announce text and would pop an obsolete modal on every offline start; failing fast is what the existing controller/frontend error paths expect
    • CI green on Ubuntu, Windows and Web UI

    Awaiting review/merge by the upstream owner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions