Skip to content

cache/memoize snowflake connections #4208

Description

@christierney

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions