Follow-up to #4207.
We call
|
export async function connectAPIOptionsFromCredential( |
to convert a stored credential into
ConnectAPIOptions. This is a cheap transformation except in the case of Snowflake credentials. In that case it involves filesystem reads (to
look up the connection info) followed by API calls to Snowflake (to
get a token). This happens multiple times at extension launch and multiple times during a deployment. We should refactor this code to reduce the number of times we have to get a new token for sure, and ideally also reduce the number of filesystem reads.
This might also be a good opportunity to consolidate all of the snowflake auth options to use snowflake-sdk (like the externalbrowser option does), but that is technically separate work.
Follow-up to #4207.
We call
publisher/extensions/vscode/src/credentials/service.ts
Line 51 in bd358d5
ConnectAPIOptions. This is a cheap transformation except in the case of Snowflake credentials. In that case it involves filesystem reads (to look up the connection info) followed by API calls to Snowflake (to get a token). This happens multiple times at extension launch and multiple times during a deployment. We should refactor this code to reduce the number of times we have to get a new token for sure, and ideally also reduce the number of filesystem reads.This might also be a good opportunity to consolidate all of the snowflake auth options to use snowflake-sdk (like the externalbrowser option does), but that is technically separate work.