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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dns names with underscore #834

Closed

Conversation

sfc-gh-bculberson
Copy link
Contributor

Description

DNS names with underscores are not valid in the .net framework. This will construct a working HOST name by replacing with - which is how Snowflake solves for this use case, but users had to manually set HOST.

Checklist

  • Code compiles correctly
  • Code is formatted according to Coding Conventions
  • Created tests which fail without the change (if possible)
  • All tests passing (dotnet test)
  • Extended the README / documentation, if necessary
  • Provide JIRA issue id (if possible) or GitHub issue id in PR name

@sfc-gh-bculberson sfc-gh-bculberson requested a review from a team as a code owner December 14, 2023 17:42
@gboucher90
Copy link

Hey,

We just encountered this issue in Production. Indeed it seems OpenSSL which is used by the .Net Core runtime implementation doesn't handle well underscores:
dotnet/runtime#58722
https://mta.openssl.org/pipermail/openssl-dev/2015-August/002411.html

Would it be possible to have this code released?

Thank you!

@sfc-gh-knozderko
Copy link
Collaborator

We are planning to release it in the nearest release.

@@ -260,7 +260,8 @@ internal static SFSessionProperties parseConnectionString(String connectionStrin
if (!properties.ContainsKey(SFSessionProperty.HOST) ||
(0 == properties[SFSessionProperty.HOST].Length))
{
string hostName = String.Format("{0}.snowflakecomputing.com", properties[SFSessionProperty.ACCOUNT]);
string compliantAccountName = properties[SFSessionProperty.ACCOUNT].Replace('_','-');
Copy link
Collaborator

Choose a reason for hiding this comment

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

We require a possibility to disable the replacement by the parameter in a connection string similar to JDBC to mitigate the risk of privatelink connections not working: Reasoning for JDBC

@sfc-gh-pbulawa
Copy link
Collaborator

PR #848 implements the feature. Thanks for the contribution.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants