Ruby provider: HTTP timeouts are not configurable (Net::HTTP 60s defaults apply)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start by locating the Ruby provider's APIClient#initialize and private build_agent, then inspect the existing APIError handling and README. The issue proposes configurable timeouts, timeout-error wrapping, validation, and documentation, but leaves the API shape and default behavior unresolved. Done means those decisions are settled and the options and error behavior are implemented and documented.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The Ruby OpenFeature provider (confidence-openfeature-provider, 0.2.0) has no way to configure HTTP timeouts. It is an online resolver that makes a HTTP call for every flag evaluation.
Current behavior
APIClient#initialize(client_secret:, region:, events_uri:)takes no timeout options.- The private
APIClient#build_agentcreates a freshNet::HTTPfor each request and sets onlyuse_ssl. Ruby's defaults therefore apply:open_timeout60s,read_timeout60s andwrite_timeout60s. - The events API (
track) goes through the samebuild_agent, so the same applies there. - When a timeout fires,
Net::OpenTimeoutorNet::ReadTimeoutis raised unwrapped, unlike HTTP-status and JSON errors, which are wrapped asAPIError. - The only workarounds are overriding the private
build_agentin a subclass, which is fragile, or wrapping calls inTimeout.timeout, which is unsafe.
Why it matters
Flags are often resolved inline in request handlers. Our case: A degraded Confidence API can stall sign-up requests for minutes and tie up web threads. We'd like roughly a 1s connect and 1s read limit, so that the worst case adds about 2s.
Prior art
The Java remote-resolver SDK already exposes this (README):
Confidence.builder("<CLIENT_SECRET>")
.resolveDeadlineMs(250) // default 10_000
.eventSenderDeadlineMs(...) // default 5_000
Proposed solution
- Add optional timeout keyword arguments to
APIClient.new, either per phase (open_timeout:,read_timeout:,write_timeout:) or per endpoint like Java (resolve_timeout:,events_timeout:). ExistingAPIClient.new(client_secret:, region:)calls keep working. - Apply them to each
Net::HTTPagent inbuild_agent, keeping the one-agent-per-request design. - Wrap
Net::OpenTimeout,Net::ReadTimeoutandNet::WriteTimeoutinAPIError, keeping the original ascause. Evaluations then return the default value with reasonERROR,trackstill never raises, andtrack!raisesAPIError. - Reject negative or non-numeric values with
ArgumentError. - Document the options and defaults in the README.
Note that Net::HTTP has no total-deadline option the way gRPC does, so the bound is per phase: connect plus read, not one overall limit.
Open questions
- Defaults: match Java (10s for resolve, 5s for events) for consistency, or use something lower such as 2s, since the Ruby provider always resolves over the network? Is lowering from 60s acceptable as a non-breaking change, or should the default stay as Net::HTTP's and only become configurable?
- API shape: per-phase options (closest to Net::HTTP), per-endpoint options (closest to Java), or both?
- Wrapping other transport errors: should errors such as
ECONNREFUSEDandSocketErroralso be wrapped asAPIErrorfor consistency?
- Lingua principale
- Rust
- Stelle
- 17
- Fork
- 18
- Merge medio
- 1h 25m
- PR unite (30g)
- 3
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di spotify/confidence-resolver
-
python provider: ETag is committed before the state installs, so a failed install is never retriedForse già presa @nicklasl l’ha presa 3 giorni fa. Aperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 22/100
spotify/confidence-resolver#675 ·
I maintainer di solito rispondono entro 1 giorno
-
Go provider: in-place state updates pin ~2.3× the WASM memory of the current stateForse già presa @sergeyevstifeev l’ha presa 8 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 18/100
spotify/confidence-resolver#665 ·
I maintainer di solito rispondono entro 1 giorno
-
Go: apply typed evaluations at an explicit timestamp without resolving twiceForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
spotify/confidence-resolver#653 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
spotify/confidence-resolver#336 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
spotify/confidence-resolver#297 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di spotify/confidence-resolver
Issue simili
-
A match arm above the largest i64 is compared as 0Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
DioxusLabs/dioxus#6063 ·
I maintainer di solito rispondono entro 1 giorno
-
`nsh-core` fails to compile when taffy's default `calc` feature is enabled elsewhere in the graphAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
longbridge/nsh#966 ·
I maintainer di solito rispondono entro 1 giorno
-
Windows docs: pin a tested ConPTY version for Kitty graphics; 1.25.260930003 corrupts large uploadsAperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
raphamorim/rio#2021 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
non7top/sigstore-shell#38 ·
I maintainer di solito rispondono entro 1 giorno