• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supavisor / 19370957114

14 Nov 2025 04:30PM UTC coverage: 62.682% (+1.4%) from 61.246%
19370957114

Pull #744

github

web-flow
Merge fd252a012 into 0224a24c8
Pull Request #744: fix(defrag): improve statems, caching, logs, circuit breaking

592 of 785 new or added lines in 22 files covered. (75.41%)

18 existing lines in 5 files now uncovered.

1809 of 2886 relevant lines covered (62.68%)

4508.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/supavisor/client_handler/proxy.ex
1
defmodule Supavisor.ClientHandler.Proxy do
2
  @moduledoc """
3
  Handles proxy connection logic for ClientHandler.
4

5
  This module prepares proxy connections and database handler arguments
6
  while leaving socket operations and process management to ClientHandler.
7
  """
8

9
  @spec prepare_proxy_connection(map()) ::
10
          {:ok, map()} | {:error, term()}
11
  def prepare_proxy_connection(data) do
NEW
12
    case Supavisor.get_pool_ranch(data.id) do
×
13
      {:ok, %{port: port, host: host}} ->
NEW
14
        updated_auth =
×
NEW
15
          Map.merge(data.auth, %{
×
16
            port: port,
17
            host: to_charlist(host),
18
            ip_version: :inet,
19
            upstream_ssl: false,
20
            upstream_tls_ca: nil,
21
            upstream_verify: nil
22
          })
23

24
        {:ok, %{data | auth: updated_auth}}
25

NEW
26
      error ->
×
27
        {:error, error}
28
    end
29
  end
30

31
  @spec build_db_handler_args(map()) :: map()
32
  def build_db_handler_args(data) do
NEW
33
    %{
×
NEW
34
      id: data.id,
×
NEW
35
      auth: data.auth,
×
NEW
36
      user: data.user,
×
NEW
37
      tenant: {:single, data.tenant},
×
NEW
38
      tenant_feature_flags: data.tenant_feature_flags,
×
39
      replica_type: :write,
40
      mode: :proxy,
41
      proxy: true,
42
      log_level: nil,
43
      caller: self(),
NEW
44
      client_sock: data.sock
×
45
    }
46
  end
47
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc