Skip to content

HCK-14465: replace axios with @hackolade/fetch library#239

Merged
Vitalii4as merged 4 commits intodevelopfrom
fix/HCK-14465
Jan 23, 2026
Merged

HCK-14465: replace axios with @hackolade/fetch library#239
Vitalii4as merged 4 commits intodevelopfrom
fix/HCK-14465

Conversation

@Vitalii4as
Copy link
Contributor

@Vitalii4as Vitalii4as commented Jan 23, 2026

Sub-taskHCK-14465 Use @hackolade/fetch instead of Axios in Snowflake plugin

Content

In this PR the snowflake-sdk is upgraded to the latest library, and it is patched to use @hackolade/fetch. The axios in the plugin is replaced by the @hackolade/fetch as well.

NOTE: We patched only those parts of the snowflake-sdk, there are some functionality that still uses older approaches, like file transfer API. By changing it all we will create a very large patch file, so we decided to adapt only those parts that are used by the application.

@Vitalii4as Vitalii4as self-assigned this Jan 23, 2026
+ Response: null,
+ }
+});
const URL = require('node:url').URL;
Copy link
Contributor

Choose a reason for hiding this comment

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

@Vitalii4as i know that under certain condition the node protocol doesn't play well with our webpack. So just to make sure did you build it for browser and electron?

Comment on lines 89 to 92
.then(res => (res.ok ? res.json() : Promise.reject()))
.catch(err => {
return authToken ? {} : Promise.reject(oktaCredentialsError);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe it's just me but this looks like formatting glitch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The formatting is fine, it follow our rules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I manually fixed it

package.json Outdated
"description": "Hackolade plugin for Snowflake",
"disabled": false,
"dependencies": {
"@hackolade/fetch": "^1.3.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we have save-exact in npm config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In Studio - yes. In plugins - no. I'll add that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

minify: true,
logLevel: 'info',
external: ['lodash'],
external: ['lodash', '@hackolade/fetch'],
Copy link
Contributor

Choose a reason for hiding this comment

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

@Vitalii4as like for lodash if you put fetch as external you need to copy it into the node_modules (see below)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I forgot about that(

Copy link
Contributor

@bigorn0 bigorn0 left a comment

Choose a reason for hiding this comment

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

  • please use exact version in package.json
  • esbuild config is missing the copy of fetch into node_modules like lodash
  • check formatting (but not a real issue)

@sonarqubecloud
Copy link

@Vitalii4as Vitalii4as enabled auto-merge (squash) January 23, 2026 16:29
@Vitalii4as Vitalii4as disabled auto-merge January 23, 2026 16:46
@Vitalii4as Vitalii4as merged commit 29d2334 into develop Jan 23, 2026
3 of 8 checks passed
@Vitalii4as Vitalii4as deleted the fix/HCK-14465 branch January 23, 2026 16:46
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.

2 participants