Skip to content

Conversation

@srebhan
Copy link
Member

@srebhan srebhan commented Jun 12, 2024

Summary

It seems that the Mysql driver now more strictly checks TLS configuration names when parsing the DSN. Therefore, our current strategy of parsing the DSN and then conveniently replace the TLS configuration name in the struct fails as the custom alias is not a registered configuration.

This PR literally replaces the tls=custom part of the configuration with the actual name using a regular expression. This circumvents the parsing issue. The PR also adds unit-test to make sure the regexp is safe.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15490

@telegraf-tiger telegraf-tiger bot added area/mysql fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jun 12, 2024
@srebhan srebhan self-assigned this Jun 12, 2024
@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jun 17, 2024
@srebhan srebhan assigned powersj and mstrandboge and unassigned srebhan Jun 17, 2024
@powersj powersj removed their assignment Jun 17, 2024
@mstrandboge mstrandboge merged commit 53ae984 into influxdata:master Jun 17, 2024
@github-actions github-actions bot added this to the v1.31.1 milestone Jun 17, 2024
srebhan added a commit that referenced this pull request Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/mysql fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

3 participants