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

SNOW-1814669: Publishing as SingleFile breaks the Snowflake connector #1062

Open
hasnik opened this issue Nov 19, 2024 · 4 comments
Open

SNOW-1814669: Publishing as SingleFile breaks the Snowflake connector #1062

hasnik opened this issue Nov 19, 2024 · 4 comments
Assignees
Labels
bug status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team

Comments

@hasnik
Copy link

hasnik commented Nov 19, 2024

  1. What version of .NET driver are you using?
    4.2.0

  2. What operating system and processor architecture are you using?
    Windows 11 23H2 (build 22631.4460)
    x86_64

  3. What version of .NET framework are you using?
    net9.0

  4. What did you do?
    Run the app published with dotnet publish --configuration Release --runtime win-x64 --self-contained true -p:PublishSingleFile=true

  5. What did you expect to see?
    The app is working the same way as if it is published with dotnet publish --configuration Release --runtime win-x64 --self-contained true

  6. What is the actual result?

The path is empty. (Parameter 'path')
   at System.IO.Path.GetFullPath(String path)
   at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
   at Snowflake.Data.Core.Tools.Diagnostics.AppendAssemblyInfo(StringBuilder info, Assembly assembly, String assemblyTag)
   at Snowflake.Data.Core.Tools.Diagnostics.GetDiagnosticInfo()
   at Snowflake.Data.Core.Tools.Diagnostics.LogDiagnostics()
   at Snowflake.Data.Client.SnowflakeDbConnectionPool.SetConnectionPoolVersion(ConnectionPoolType requestedPoolType, Boolean force)
   at Snowflake.Data.Client.SnowflakeDbConnectionPool.get_ConnectionManager()
   at Snowflake.Data.Client.SnowflakeDbConnectionPool.GetSessionAsync(String connectionString, SecureString password, CancellationToken cancellationToken)
   at Snowflake.Data.Client.SnowflakeDbConnection.OpenAsync(CancellationToken cancellationToken)
  1. Problem description
    Snowflake.Data relies on the fact that it is able to locate an assembly and if the app is packaged as a single file it is unable to do so. Is there a way I can pass required information to Snowflake.Data so that it will work when published as a single file?
@hasnik hasnik added the bug label Nov 19, 2024
@github-actions github-actions bot changed the title Publishing as SingleFile breaks the Snowflake connector SNOW-1814669: Publishing as SingleFile breaks the Snowflake connector Nov 19, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Nov 20, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage Issue is under initial triage and removed bug labels Nov 20, 2024
@sfc-gh-dszmolka
Copy link
Contributor

sfc-gh-dszmolka commented Nov 20, 2024

hello - i'm not sure we intended to support single-file deployment. Let me research on this a bit.

edit: per initial analysis it looks like this is a bug, without workarounds for the moment. We'll look into it.

@hasnik
Copy link
Author

hasnik commented Nov 20, 2024

Hi! Sure thing, take your time. If your research concludes that you do not intend to support single-file deployment I believe it's a good idea to communicate it explicitly in the documentation.

@sfc-gh-dszmolka sfc-gh-dszmolka added bug status-triage_done Initial triage done, will be further handled by the driver team and removed status-triage Issue is under initial triage labels Nov 20, 2024
@sfc-gh-dszmolka
Copy link
Contributor

Team started to look into this, and there's already a PR #1063 with a fix

@sfc-gh-dszmolka sfc-gh-dszmolka added the status-pr_pending_merge A PR is made and is under review label Nov 20, 2024
@sfc-gh-dszmolka
Copy link
Contributor

PR merged and will be part of the next upcoming release cycle

@sfc-gh-dszmolka sfc-gh-dszmolka added status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. and removed status-pr_pending_merge A PR is made and is under review labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

3 participants