-
Notifications
You must be signed in to change notification settings - Fork 16
Support agent ID parameter #312
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
Conversation
b421edc
to
00231a3
Compare
00231a3
to
a13c2ef
Compare
Qodana Community for JVM53 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.2.6
with:
upload-result: true Contact Qodana teamContact us at qodana-support@jetbrains.com
|
src/main/kotlin/com/coder/gateway/CoderGatewayConnectionProvider.kt
Outdated
Show resolved
Hide resolved
It should omit agent information when the workspace specifies no agents and the name should combine the workspace and agent names.
This generates agent models, not workspaces. Renaming opens the way for generating random workspaces.
2c52d1a
to
3b1804b
Compare
I also made a tweak to check that the agent ID is not null since toAgentModels() will return the workspace without any agent bits set if there are no agents. And the wrong error message would show when either the id or name were missing. I also flipped them around while fixing this to match the order above it.
3b1804b
to
691c276
Compare
// TODO: Maybe better to randomly generate the workspace and then call | ||
// toAgentModels() on it. Also the way an "agent" model can have no | ||
// agent in it seems weird; can we refactor to remove | ||
// WorkspaceAgentModel and use the original structs from the API? |
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.
👍 to this, I'm assuming we auto-generate the API? I wonder if we could gen the field values from the spec.
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.
Oh that would be absolutely wonderful. The API types appear to be hand-written at the moment.
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.
Part of #292
This will let you set the agent by either ID or name. If both are set then the name is ignored.