Skip to content

Add agent name in workspaces rows + Fetch workspaces resources from latestBuild instead of templateversions api #489

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

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add resources fallback if workspace latestBuild is empty
  • Loading branch information
cdosso committed Oct 2, 2024
commit e4c87692d9c6f04987c074808024c5ea4c77e05e
2 changes: 1 addition & 1 deletion src/main/kotlin/com/coder/gateway/sdk/CoderRestClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ open class CoderRestClient(
// It is possible for there to be resources with duplicate names so we
// need to use a set.
return workspaces.flatMap { ws ->
ws.latestBuild.resources.filter { it.agents != null }.flatMap { it.agents!! }.map {
ws.latestBuild.resources.ifEmpty { resources(ws) }.filter { it.agents != null }.flatMap { it.agents!! }.map {
"${ws.name}.${it.name}"
}
}.toSet()
Expand Down
Loading