You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val resourcesResponse = retroRestClient.templateVersionResources(it.latestBuild.templateVersionID).execute()
178
-
if (!resourcesResponse.isSuccessful) {
179
-
throwWorkspaceResponseException("Unable to retrieve template resources for ${it.name} from $url: code ${resourcesResponse.code()}, reason: ${resourcesResponse.message().ifBlank { "no reason provided" }}")
180
-
}
181
-
it.toAgentModels(resourcesResponse.body()!!)
176
+
val resources = resources(it)
177
+
it.toAgentModels(resources)
178
+
}
179
+
}
180
+
181
+
/**
182
+
* Retrieves resources for the specified workspace. The workspaces response
183
+
* does not include agents when the workspace is off so this can be used to
184
+
* get them instead, just like `coder config-ssh` does (otherwise we risk
185
+
* removing hosts from the SSH config when they are off).
val resourcesResponse = retroRestClient.templateVersionResources(workspace.latestBuild.templateVersionID).execute()
189
+
if (!resourcesResponse.isSuccessful) {
190
+
throwWorkspaceResponseException("Unable to retrieve template resources for ${workspace.name} from $url: code ${resourcesResponse.code()}, reason: ${resourcesResponse.message().ifBlank { "no reason provided" }}")
0 commit comments