httpoison to req - #3928
Conversation
Soffi AI SummaryThis PR migrates the Elixir server's HTTP client layer from HTTPoison to Req across all call sites in the codebase. The motivation is to standardize on a single, modern HTTP library — Req is more idiomatic in recent Elixir, has built-in retry/decode options, and eliminates the HTTPoison dependency. The change touches every module that previously called Key mechanical differences between the old and new call patterns:
Commits
Updated: 2026-07-29 15:14 UTC |
| defp http_opts, | ||
| do: | ||
| Application.get_env(:console, :httpoison_azure_devops_options, []) ++ [recv_timeout: 60_000] | ||
| Application.get_env(:console, :req_azure_devops_options, []) ++ [receive_timeout: 60_000, decode_body: false, retry: false] |
There was a problem hiding this comment.
Legacy SCM options are dropped
When a deployment supplies proxy, TLS, or timeout settings through the previously supported :httpoison_*_options keys, these clients now read only the renamed :req_*_options keys, causing required connection settings to disappear and the affected SCM integrations to fail.
Greptile SummaryThis PR migrates Console’s direct HTTP calls from HTTPoison to Req.
Confidence Score: 4/5The SCM option-key compatibility break should be fixed before merging because configured proxy and TLS settings can disappear after an upgrade. Four workbench SCM clients stop reading their previously supported application environment keys without a fallback or translation path, causing deployment-specific HTTP settings to be silently omitted. Files Needing Attention: lib/console/ai/tools/workbench/integration/azure_devops/client.ex, lib/console/ai/tools/workbench/integration/bitbucket/client.ex, lib/console/ai/tools/workbench/integration/bitbucket_datacenter/client.ex, lib/console/ai/tools/workbench/integration/gitlab/client.ex
|
| Filename | Overview |
|---|---|
| lib/console/utils/http.ex | Adds centralized translation of legacy proxy, timeout, TLS, and redirect options into Req-compatible options. |
| lib/console/logs/stream/exec.ex | Correctly migrates the Victoria Metrics streaming state machine to Req asynchronous responses and handles all documented message forms. |
| lib/console_web/controllers/ai_controller.ex | Migrates the streaming AI reverse proxy to Req while filtering hop-by-hop response headers and cancelling timed-out streams. |
| lib/console/ai/tools/workbench/integration/azure_devops/client.ex | Migrates requests to Req but drops compatibility with the existing HTTP option configuration key. |
| lib/console/ai/tools/workbench/integration/github/client.ex | Migrates GitHub workbench requests and pagination headers to Req while translating Tentacat’s legacy request options. |
| lib/console/clients/prometheus/client.ex | Migrates instant and range Prometheus queries to Req form encoding with equivalent connection and receive timeouts. |
| lib/console/clients/hydra/client.ex | Migrates Hydra administration and OAuth request handling to Req without changing the decoded response contracts. |
Reviews (1): Last reviewed commit: "httpoison to req" | Re-trigger Greptile
michaeljguarino
left a comment
There was a problem hiding this comment.
this generally makes sense. Have you done any e2e testing, certainly with things like elasticsearch/prometheus queries, and others that route through workbenches
use req instead of httpoison
Test Plan
Test environment: https://console.your-env.onplural.sh/
Checklist
Plural Flow: console