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-1042432: Do not use com.amazonaws classes in core SF classes #1626

Closed
jtjeferreira opened this issue Feb 3, 2024 · 5 comments · Fixed by #1627
Closed

SNOW-1042432: Do not use com.amazonaws classes in core SF classes #1626

jtjeferreira opened this issue Feb 3, 2024 · 5 comments · Fixed by #1627
Labels
enhancement The issue is a request for improvement or a new feature feature status-merged

Comments

@jtjeferreira
Copy link
Contributor

What is the current behavior?

I was giving a try to the snowflake-jdbc-thin jar and it works fine. Thanks for that. Although I wanted to exclude some unnecessary dependencies for my application like:

  • com.amazonaws
  • com.google.cloud
  • com.microsoft.azure

I could exclude all those except com.amazonaws:aws-java-sdk-core because net.snowflake.client.core.HttpClientSettingsKey references com.amazonaws.Protocol and I got the exception java.lang.NoClassDefFoundError: com/amazonaws/Protocol

What is the desired behavior?

I would like my application to work even if I exclude all the above dependencies. I think this could be achieved by avoiding the use of com.amazonaws in core classes like net.snowflake.client.core.HttpClientSettingsKey

How would this improve snowflake-jdbc?

This would benefit users trying to create smaller apps, but also allow future modularization of snowflake-jdbc library

@github-actions github-actions bot changed the title Do not use com.amazonaws classes in core SF classes SNOW-1042432: Do not use com.amazonaws classes in core SF classes Feb 3, 2024
@sfc-gh-dprzybysz sfc-gh-dprzybysz added the enhancement The issue is a request for improvement or a new feature label Feb 5, 2024
@sfc-gh-dprzybysz
Copy link
Contributor

Thank you @jtjeferreira for the PR. I left one comment there.

The PR is a step in the right direction, but it won't solve all the problems. We are still using the com.amazonaws.http.apache.SdkProxyRoutePlanner in the core package

@jtjeferreira
Copy link
Contributor Author

We are still using the com.amazonaws.http.apache.SdkProxyRoutePlanner in the core package

Should I make a copy of that class (keeping the copyright header)?

@sfc-gh-dprzybysz
Copy link
Contributor

We should think about backward compatibility of our public classes - checkout my comments in PR

for SdkProxyRoutePlanner it needs more tests and planning to make it optional - it could be done but I would not put it in this PR and issue

@sfc-gh-dprzybysz
Copy link
Contributor

Thank you @jtjeferreira for the contribution, the change will be included in the next release of snowflake-jdbc

@jtjeferreira
Copy link
Contributor Author

Thank you @jtjeferreira for the contribution, the change will be included in the next release of snowflake-jdbc

I tried 3.15.0 and it works like a charm... Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is a request for improvement or a new feature feature status-merged
Projects
None yet
2 participants