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

Regions cache should only be filled for regional commands #447

Closed
EtienneM opened this issue Jul 16, 2019 · 2 comments · Fixed by #449
Closed

Regions cache should only be filled for regional commands #447

EtienneM opened this issue Jul 16, 2019 · 2 comments · Fixed by #449

Comments

@EtienneM
Copy link
Member

EtienneM commented Jul 16, 2019

And the --password-only flag is broken
And the help tries to login

This is because of this piece of code: https://github.com/Scalingo/cli/blob/master/cmd/commands.go#L32-L38

Before running any command, we fill the regions cache which requires to be logged in. And the call to session.Login do not use any flag on the command line.

@EtienneM EtienneM added the bug label Jul 16, 2019
@EtienneM
Copy link
Member Author

We should fill the regions cache only for regional commands

@EtienneM
Copy link
Member Author

Related to https://app.intercom.io/a/apps/w4oogu7s/inbox/inbox/conversation/22870997936#part_id=comment-22870997936-3400397128

This is because the user deleted the Scalingo token from his profile (https://my.agora-fr1.scalingo.com/profile). Then nothing works anymore :'(

To prevent that, we should be able to run scalingo logout && scalingo login. And this is achieved by only filling the cache for regional commands

@EtienneM EtienneM changed the title All commands run the authentication twice Regions cache should only be filled for regional commands Jul 16, 2019
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 a pull request may close this issue.

1 participant