-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add Snowflake SQL integration support #121
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
2a2b9d1
Add Snowflake SQL integration support
jankuca 795d710
improve styling of auth method select box
jankuca d664998
Refactor Snowflake integration to use discriminated union types
jankuca c9a64e4
test: add tests for snowflake integrations
jankuca 8960026
polish snowflake config placeholders
jankuca 2567e9c
consolidate snowflake types
jankuca 1811615
make snowflake url construction safer
jankuca 9dcb6cf
avoid white-space only input in snowflake config
jankuca 355959b
remove unnecesary snowflake null auth method check
jankuca 1ae2707
add accessibility attrs to snowflake form
jankuca 890665e
polish snowflake settings copy/placeholders
jankuca 9390478
rename snowflake auth method tests to resemble reality
jankuca d7248c2
consolidate supported snowflake auth method checks
jankuca d011224
join password and null auth method type
jankuca 3adb3ad
unify Name input label across integrations
jankuca b2ebadd
remove redundant placeholders from snowflake form
jankuca 8084a2f
split private keys strings in tests to avoid security flagging
jankuca af3ef77
mark private keys in tests as obviously fake
jankuca b6aeb42
make SnowflakeAuthMethod imports/exports type-only
jankuca 1ae43d1
unify password|null snowflake auth method typing
jankuca 5d8451f
conslidate unnamed integration strings
jankuca ef91e96
VSCode->VS Code
jankuca 0234368
Merge branch 'main' into jk/feat/snowflake
jankuca 38a36e5
fix snowflake private key handling
jankuca 8e78c67
fix opening of integration configuration from status bar
jankuca 56e9e91
Validate integration type before DEEPNOTE_TO_INTEGRATION_TYPE lookup
jankuca 31422bd
Replace local UnsupportedIntegrationError with shared error
jankuca 05d82e3
polish snowflake url test
jankuca 86529eb
replace buffer with btoa for snowflake private key encoding
jankuca 122e067
lint
jankuca 4072bfb
Merge branch 'main' into jk/feat/snowflake
jankuca 7cb3073
remove copyright header
jankuca ed9537b
add unsupported_integration error category
jankuca ffdb5ac
polish unsupported integration type handling
jankuca 5f4a284
localize errors in snowflake config
jankuca 1504827
use pyformat instead of format for snowflake
jankuca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { BaseError } from './types'; | ||
|
|
||
| /** | ||
| * Error thrown when an unsupported integration type is encountered. | ||
| * | ||
| * Cause: | ||
| * An integration configuration has a type that is not supported by the SQL integration system, | ||
| * or an integration uses an authentication method that is not supported in VSCode. | ||
| * | ||
| * Handled by: | ||
| * Callers should handle this error and inform the user that the integration type or | ||
| * authentication method is not supported. | ||
| */ | ||
| export class UnsupportedIntegrationError extends BaseError { | ||
| constructor(message: string) { | ||
| super('unsupported_integration', message); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /** | ||
| * Snowflake authentication methods | ||
| */ | ||
| export const SnowflakeAuthMethods = { | ||
| PASSWORD: 'PASSWORD', | ||
| OKTA: 'OKTA', | ||
| NATIVE_SNOWFLAKE: 'NATIVE_SNOWFLAKE', | ||
| AZURE_AD: 'AZURE_AD', | ||
| KEY_PAIR: 'KEY_PAIR', | ||
| SERVICE_ACCOUNT_KEY_PAIR: 'SERVICE_ACCOUNT_KEY_PAIR' | ||
| } as const; | ||
|
|
||
| export type SnowflakeAuthMethod = (typeof SnowflakeAuthMethods)[keyof typeof SnowflakeAuthMethods]; | ||
|
|
||
| /** | ||
| * Supported auth methods that we can configure in VSCode | ||
| */ | ||
| export const SUPPORTED_SNOWFLAKE_AUTH_METHODS = [ | ||
| null, // Legacy username+password (no authMethod field) | ||
| SnowflakeAuthMethods.PASSWORD, | ||
| SnowflakeAuthMethods.SERVICE_ACCOUNT_KEY_PAIR | ||
| ] as const; | ||
|
|
||
| export type SupportedSnowflakeAuthMethod = (typeof SUPPORTED_SNOWFLAKE_AUTH_METHODS)[number]; | ||
|
|
||
| /** | ||
| * Type guard to check if a value is a supported Snowflake auth method | ||
| * @param value The value to check | ||
| * @returns true if the value is one of the supported auth methods | ||
| */ | ||
| export function isSupportedSnowflakeAuthMethod(value: unknown): value is SupportedSnowflakeAuthMethod { | ||
| return (SUPPORTED_SNOWFLAKE_AUTH_METHODS as readonly unknown[]).includes(value); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.