- Notifications
You must be signed in to change notification settings - Fork16
fix: don't create new api keys each time we do workspace polling#568
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The default behavior for `coder login --token <token>` is to:- use the provided token temporarily to authenticate the login process- generate a new session token and stores that for future CLI use- the original token provided is not stored or reusedThe Coder `Recent projects` view polls every 5 seconds for workspaces frommultiple Coder deployment. The polling process also involves a callto the `cli.login`. The cli is later used start workspaces if user clicks ona project for which the workspace is stopped. Instead of generating a new tokeneach time we login we can use the `coder login --use-token-as-session --token <token>` which:- uses the provided token directly as the session token- stores the original token for future CLI commands- no new token is generated
The Coder `Recent projects` view polls every 5 seconds for workspaces frommultiple Coder deployment. The polling process also involves a callto the `cli.login`. The cli is later used to start workspaces if a user clicks ona project for which the workspace is stopped. The login can be called on demand, onlywhen a "recent" project is stopped and the user wants to start it. This commitreduces a lot of overhead associated with spawning cli commands every 5 seconds.
Qodana Community for JVM33 new problems were found
💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get -name:'Qodana Scan'uses:JetBrains/qodana-action@v2023.3.2with:upload-result:true Contact Qodana teamContact us atqodana-support@jetbrains.com
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fantastic!
66e470f
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
The default behavior for
coder login --token <token>
is to:The Coder
Recent projects
view polls every 5 seconds for workspaces from multiple Coder deployment. The polling process also involves a call to thecli.login
. The cli is later used to start workspaces if users click on a project for which the workspace is stopped. Instead of generating a new token each time we login we can use thecoder login --use-token-as-session --token <token>
which:Additionally the login can be called on demand, only when a "recent" project is stopped and the user wants to start it. This PR reduces a lot of overhead associated with spawning cli commands every 5 seconds.