Skip to content

Added proper default options for Azure connection#172

Merged
gbrueckl merged 2 commits intopaiqo:masterfrom
chrizonix:master
Oct 25, 2023
Merged

Added proper default options for Azure connection#172
gbrueckl merged 2 commits intopaiqo:masterfrom
chrizonix:master

Conversation

@chrizonix
Copy link
Copy Markdown

Hi @gbrueckl,

Thanks for this great extension, we use it daily in our company!

Recently we had to switch from PAT to Azure Login, and I encountered some errors with the Azure Login type, and was able to boil it down to the default options of the vscode.AuthenticationGetSessionOptions. I needed to set the createIfNone option to true, otherwise no session will be created in our case. I left all the other values set to their default value false. I think we can leave the option createIfNone on true since it seems like a sensible default value for everyone, but we can also create an option in the workspace settings.

Let me know what you think :)

Best regards
Chris

Comment thread src/vscode/treeviews/connections/DatabricksConnectionManagerAzure.ts Outdated
@gbrueckl
Copy link
Copy Markdown
Collaborator

Thansk for creating this PR and supporting our project.
Regarding the issue you mentioned, this was on my list to change in the next release but I am also happy to just take your PR.
some background information:
I initially used createIfNone = true but it kept prompting me for credentials each and every time I opened VSCode so I decided to not use it. However, I recently reviewed this in one of my other extensions and this seems to have been fixed and createIfNone = true is now the way to go

@chrizonix
Copy link
Copy Markdown
Author

Thansk for creating this PR and supporting our project. Regarding the issue you mentioned, this was on my list to change in the next release but I am also happy to just take your PR. some background information: I initially used createIfNone = true but it kept prompting me for credentials each and every time I opened VSCode so I decided to not use it. However, I recently reviewed this in one of my other extensions and this seems to have been fixed and createIfNone = true is now the way to go

I still get the little popup once in a while. I think it is controlled via the silent option, which is unfortunately unavailable if we want to create a new session, but in my opinion, I think it's a good user experience to see a little notification for the first time VSCode automatically creates a login for you and luckily this doesn't happen very often :)

         /**
         * Whether we should show the indication to sign in in the Accounts menu.
         *
         * If false, the user will be shown a badge on the Accounts menu with an option to sign in for the extension.
         * If true, no indication will be shown.
         *
         * Defaults to false.
         *
         * Note: you cannot use this option with any other options that prompt the user like {@link AuthenticationGetSessionOptions.createIfNone createIfNone}.
         */
        silent?: boolean;

Also I have seen, that you are also from Austria :)

Greetings from Vienna!
Chris

@gbrueckl
Copy link
Copy Markdown
Collaborator

to be honest i could not figure out yet when VSCode decides to show a pop or when it just uses the cached credentials. But as you say, it seems it is not prompting each and every time anymore

@gbrueckl gbrueckl merged commit ee1cfb1 into paiqo:master Oct 25, 2023
@gbrueckl
Copy link
Copy Markdown
Collaborator

we (paiqo) are also based in Vienna :)

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