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

Prompt use of personal CF CLI config if found #355

Open
andrew-woosnam opened this issue Jul 8, 2022 · 6 comments
Open

Prompt use of personal CF CLI config if found #355

andrew-woosnam opened this issue Jul 8, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@andrew-woosnam
Copy link
Contributor

Feature idea:
When the extension launches, it checks for the presence of a cf cli config.json file at the default installation directory (~/.cf). If found, a prompt could appear offering to use those values for the CF connection (e.g. copy the contents of the personal config.json into the vsix config.json), obviating the need to log in to CF manually.

@andrew-woosnam andrew-woosnam added the enhancement New feature or request label Jul 8, 2022
@ccheetham
Copy link
Contributor

@atwoosnam Does that imply keeping the 2 in synch? If not, could lead to unexpected-to-the-developer behavior.

@dtillman
Copy link
Contributor

dtillman commented Jul 8, 2022

I would find having to answer that question every time I started VS annoying ... I would prefer that the two environments be separate ...

@atwoosnam : If I start VS and login, and then terminate VS, and immediately restart it .. do I have to login again? If the tokens are still valid in the cf ".config" file used by VS plugin I shouldn't have to re login correct?

@andrew-woosnam
Copy link
Contributor Author

andrew-woosnam commented Jul 8, 2022

@ccheetham nah I was thinking this would just allow you to log in quickly the first time but then let the 2 stay separate afterward.
I can see what you mean, that choosing to use an existing CF connection when logging in might suggest to a user that the 2 environments will mirror each other going forward... 🤔
Maybe some careful messaging with this prompt could nip that assumption in the bud? Or maybe it'd still be confusing enough to make this feature not worth it 😄🤷

@andrew-woosnam
Copy link
Contributor Author

@dtillman correct - as long as the config.json file stays around between VS sessions there should be no need to reauthenticate (unless you purposefully log out of the CF env in VS)

@andrew-woosnam
Copy link
Contributor Author

You may have noticed that the CF connection does not persist between sessions when using the "experimental" VS instance (while debugging this VSIX e.g.) -- I don't remember exactly what causes this (I know I've looked into it and I think it's because the config.json gets wiped on every build), but @zzori-theoriginal and I have tested several times that it isn't the case for "real" VS instances.

@dtillman
Copy link
Contributor

dtillman commented Jul 8, 2022

@atwoosnam : I could see value in giving the user an option (i.e. yes/no dialog) to initialize the plugins "cf.config" file from the CLI's "cf.config" file only if the plugins file doesn't exist. Wording of the dialog would be important ... so not to infer they are kept in sync. I was thinking you would prompt every time... which I wouldn't like ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants