Skip to content

Fix parse_auth_type missing "none" clause for Elasticsearch sinks#2124

Open
juanherrera-jpy wants to merge 2 commits intosequinstream:mainfrom
juanherrera-jpy:fix/parse-auth-type-none
Open

Fix parse_auth_type missing "none" clause for Elasticsearch sinks#2124
juanherrera-jpy wants to merge 2 commits intosequinstream:mainfrom
juanherrera-jpy:fix/parse-auth-type-none

Conversation

@juanherrera-jpy
Copy link
Copy Markdown

@juanherrera-jpy juanherrera-jpy commented Mar 6, 2026

Summary

  • Add missing parse_auth_type("none") clause in Sequin.Transforms that caused config apply to fail with a FunctionClauseError when importing Elasticsearch sinks with no authentication
  • Add test for creating an Elasticsearch sink consumer with auth_type: "none" via YAML config

Closes #2123

Test plan

  • Run mix test test/sequin/yaml_loader_test.exs — new test for auth_type: "none" should pass
  • Verify existing Elasticsearch sink tests still pass
  • Manual: export an Elasticsearch sink with auth_type: none, then re-import — should succeed without errors

🤖 Generated with Claude Code

Config export produces `auth_type: none` for Elasticsearch sinks without
authentication, but config import fails because parse_auth_type/1 doesn't
handle the "none" value. Add the missing clause.

Closes sequinstream#2123

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Mar 6, 2026
Comment thread lib/sequin/transforms/transforms.ex Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering if we should change nil to map to :none as well - though that is a breaking change

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nil does auth_type none as well, it needs to be pointed out that this might breaking some setups.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 23, 2026
When parse_auth_type is nil do authorization type none as well.
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parse_auth_type missing "none" clause causes config import to fail for Elasticsearch sinks

2 participants