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-1617095: changing default CLI connection requires using older connection. #1421

Open
sfc-gh-melnacouzi opened this issue Aug 7, 2024 · 1 comment
Labels
bug Something isn't working connections

Comments

@sfc-gh-melnacouzi
Copy link
Contributor

SnowCLI version

3.0.0.dev0

Python version

3.10.0

Platform

macOS-10.16-x86_64-i386-64bit

What happened

snow CLI uses the old connection when setting the default connection to something new.

Console output

No response

How to reproduce

Assume 2 connections in your config list:

connection1: {'account': 'x', 'user': 'x', 'host': 'x', 'port': x, 'role': 'x', 'authenticator': 'externalbrowser'}
connection2: {'account': 'x', 'user': 'x', 'password': 'x', 'host': 'x', 'warehouse': 'x', 'role': 'x', 'authenticator': 'SNOWFLAKE_JWT', 'private_key_path': 'x'}

Default connection is connection1.

I run the command:
snow connection set-default connection2.

Instead of switching connection2 to be the default, it tries to connect first to connection1 (through browser authentication) before it switches to connection2.

@github-actions github-actions bot changed the title changing default CLI connection requires using older connection. SNOW-1617095: changing default CLI connection requires using older connection. Aug 7, 2024
@sfc-gh-melnacouzi
Copy link
Contributor Author

I think this applies to other commands like 'snow --version'. We shouldn't be using the existing connection for these. If we do it for telemetry, then we should set some kind of strict/short timeout.

@sfc-gh-pczajka sfc-gh-pczajka added bug Something isn't working connections labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working connections
Projects
None yet
Development

No branches or pull requests

2 participants