-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
sequin config export produces auth_type: none for Elasticsearch sinks that have no authentication configured. However, sequin config apply (and CONFIG_FILE_PATH boot-time loading) fails because Sequin.Transforms.parse_auth_type/1 does not handle the "none" value.
Steps to Reproduce
- Create an Elasticsearch sink with no authentication (
auth_type: none) - Export config:
sequin config export > config.yaml - Apply to a fresh instance:
sequin config apply config.yaml
Error
(FunctionClauseError) no function clause matching in Sequin.Transforms.parse_auth_type/1
Sequin.Transforms.parse_auth_type("none")
lib/sequin/transforms/transforms.ex:1319: Sequin.Transforms.parse_sink/2
If auth_type is removed from the YAML entirely, it defaults to :api_key via parse_auth_type(nil), which then requires auth_value — so there's no way to import an Elasticsearch sink without authentication.
Root Cause
In lib/sequin/transforms/transforms.ex (lines 1622-1625):
defp parse_auth_type("api_key"), do: :api_key
defp parse_auth_type("basic"), do: :basic
defp parse_auth_type("bearer"), do: :bearer
defp parse_auth_type(nil), do: :api_keyMissing: defp parse_auth_type("none"), do: :none
The rest of the codebase correctly supports :none:
- Schema (
lib/sequin/consumers/elasticsearch_sink.ex:15):field :auth_type, Ecto.Enum, values: [:none, :api_key, :basic, :bearer] - Changeset (line 35-36):
if auth_type == :none do put_change(changeset, :auth_value, nil) - Client (
lib/sequin/sinks/elasticsearch/client.ex:131)::none -> [](no auth headers) - Export (
lib/sequin/transforms/transforms.ex:425): exportsauth_type: sink.auth_typewhich produces"none"
Proposed Fix
Add the missing clause:
defp parse_auth_type("none"), do: :none
defp parse_auth_type("api_key"), do: :api_key
defp parse_auth_type("basic"), do: :basic
defp parse_auth_type("bearer"), do: :bearer
defp parse_auth_type(nil), do: :api_keyEnvironment
- Sequin version: v0.14.6 (latest as of 2026-03-05)
- Docker image:
sequin/sequin:latest
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working