Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged

Conversation

fioan89
Copy link
Collaborator

@fioan89fioan89 commentedSep 5, 2025
edited
Loading

The default behavior forcoder 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 reused

The CoderRecent 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:

  • uses the provided token directly as the session token
  • stores the original token for future CLI commands
  • no new token is generated

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.

github-actions[bot] reacted with thumbs up emoji
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.
@github-actionsGitHub Actions
Copy link
Contributor

Qodana Community for JVM

33 new problems were found

Inspection nameSeverityProblems
Usage of API marked for removal🔴 Failure13
Local 'var' is never modified and can be declared as 'val'🔶 Warning1
Incorrect string capitalization🔶 Warning1
Constant conditions🔶 Warning1
Usage of redundant or deprecated syntax or deprecated symbols🔶 Warning1
Throwable not thrown🔶 Warning1
Redundant nullable return type🔶 Warning1
Unused symbol🔶 Warning1
Convert 'object' to 'data object'◽️ Notice5
Class member can have 'private' visibility◽️ Notice3
String concatenation that can be converted to string template◽️ Notice2
Argument could be converted to 'Set' to improve performance◽️ Notice1
Return or assignment can be lifted out◽️ Notice1
Redundant lambda arrow◽️ Notice1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register atQodana Cloud andconfigure the action
  2. UseGitHub Code Scanning with Qodana
  3. HostQodana report at GitHub Pages
  4. Inspect and useqodana.sarif.json (seethe Qodana SARIF format for details)

To get*.log files or any other Qodana artifacts, run the action withupload-result option set totrue,
so that the action will upload the files as the job artifacts:

      -name:'Qodana Scan'uses:JetBrains/qodana-action@v2023.3.2with:upload-result:true
Contact Qodana team

Contact us atqodana-support@jetbrains.com

Copy link
Member

@code-ashercode-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Fantastic!

@fioan89fioan89 merged commit66e470f intomainSep 8, 2025
6 checks passed
@fioan89fioan89 deleted the fix-dont-create-new-api-keys-for-each-polling branchSeptember 8, 2025 16:13
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@code-ashercode-ashercode-asher approved these changes

@spikecurtisspikecurtisAwaiting requested review from spikecurtis

@f0sself0sselAwaiting requested review from f0ssel

@matifalimatifaliAwaiting requested review from matifali

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

JetBrains Gateway requests new API key every ~5 seconds
2 participants
@fioan89@code-asher

[8]ページ先頭

©2009-2025 Movatter.jp