Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bridge): ensure the username of pgsql must exists #11225

Merged
merged 2 commits into from Jul 7, 2023

Conversation

lafirest
Copy link
Member

@lafirest lafirest commented Jul 7, 2023

Fixes EMQX-10382

Summary

馃 Generated by Copilot at 8cee751

Fixed a PostgreSQL connector bug and added a helper function. The bug prevented connecting to PostgreSQL with empty username fields, and the helper function adjust_fields in emqx_connector_pgsql.erl handles this case.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Changed lines covered in coverage report
  • Change log has been added to changes/{ce,ee}/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • If there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow up
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

@lafirest lafirest marked this pull request as ready for review July 7, 2023 10:31
@lafirest lafirest requested review from a team and JimMoen as code owners July 7, 2023 10:31
emqx_connector_schema_lib:ssl_fields() ++
emqx_connector_schema_lib:prepare_statement_fields().

server() ->
Meta = #{desc => ?DESC("server")},
emqx_schema:servers_sc(Meta, ?PGSQL_HOST_OPTIONS).

adjust_fields(Fields) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
adjust_fields(Fields) ->
adjust_username_field(Fields) ->

@lafirest lafirest merged commit 70bd7a5 into emqx:master Jul 7, 2023
136 of 138 checks passed
@lafirest lafirest deleted the fix/pgsql_function_clause branch July 7, 2023 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants