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

mruoss / kompost / d3d3b53dc1f761432ab8cd958b74b2b23b4427ad-PR-27

pending completion
d3d3b53dc1f761432ab8cd958b74b2b23b4427ad-PR-27

Pull #27

github

mruoss
fix ssl connection and add ca
Pull Request #27: SSL support

22 of 22 new or added lines in 3 files covered. (100.0%)

74 of 532 relevant lines covered (13.91%)

4.56 hits per line

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

0.0
/lib/kompost/kompo/temporal/controller/api_server_controller.ex
1
defmodule Kompost.Kompo.Temporal.Controller.APIServerController do
2
  use Bonny.ControllerV2
3

4
  require Logger
5

6
  alias Kompost.Kompo.Temporal.Conn
7

8
  step Bonny.Pluggable.SkipObservedGenerations
9

10
  step Kompost.Pluggable.InitConditions, conditions: ["Connected"]
11
  step :handle_event
12

13
  @spec handle_event(Bonny.Axn.t(), Keyword.t()) :: Bonny.Axn.t()
14
  def handle_event(%Bonny.Axn{action: action} = axn, _opts)
15
      when action in [:add, :modify, :reconcile] do
16
    id = Conn.get_id(axn.resource)
×
17
    addr = "#{axn.resource["spec"]["host"]}:#{axn.resource["spec"]["port"]}"
×
18

19
    case Conn.connect(id, addr) do
×
20
      {:ok, _} ->
21
        axn
22
        |> success_event(message: "gRPC connection to Temporal established successfully.")
23
        |> set_condition(
×
24
          "Connected",
25
          true,
26
          "gRPC connection to Temporal established successfully."
27
        )
28

29
      {:error, reason} ->
30
        message = "Could not connect to Temporal cluster: #{reason}"
×
31
        Logger.warning("#{axn.action} failed. #{message}")
×
32

33
        axn
34
        |> failure_event(message: message)
35
        |> set_condition("Connected", false, message)
×
36
    end
37
  end
38

39
  def handle_event(%Bonny.Axn{action: :delete} = axn, _opts) do
40
    axn.resource
×
41
    |> Conn.get_id()
42
    |> Conn.disconnect()
×
43

44
    success_event(axn)
×
45
  end
46
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

© 2026 Coveralls, Inc