Skip to content

Commit 772f299

Browse files
committed
bump min agentapi_version to v0.3.3 assuming this is when support for AGENTAPI_CHAT_BASE_PATH will land
1 parent 307dea7 commit 772f299

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

registry/coder/modules/agentapi/main.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,28 +171,28 @@ describe("agentapi", async () => {
171171
const cases = [
172172
{
173173
moduleVariables: {
174-
agentapi_version: "v0.3.1",
174+
agentapi_version: "v0.3.3",
175175
agentapi_subdomain: "false",
176176
},
177177
shouldThrow: "",
178178
},
179179
{
180180
moduleVariables: {
181-
agentapi_version: "v0.3.1",
181+
agentapi_version: "v0.3.3",
182182
agentapi_subdomain: "true",
183183
},
184184
shouldThrow: "",
185185
},
186186
{
187187
moduleVariables: {
188-
agentapi_version: "v0.3.0",
188+
agentapi_version: "v0.3.2",
189189
agentapi_subdomain: "false",
190190
},
191-
shouldThrow: "Running with subdomain = false is only supported by agentapi >= v0.3.1.",
191+
shouldThrow: "Running with subdomain = false is only supported by agentapi >= v0.3.3.",
192192
},
193193
{
194194
moduleVariables: {
195-
agentapi_version: "v0.3.0",
195+
agentapi_version: "v0.3.3",
196196
agentapi_subdomain: "true",
197197
},
198198
shouldThrow: "",

registry/coder/modules/agentapi/main.tf

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ variable "install_agentapi" {
117117
variable "agentapi_version" {
118118
type = string
119119
description = "The version of AgentAPI to install."
120-
default = "v0.3.1"
120+
default = "v0.3.3"
121121
}
122122

123123
variable "agentapi_port" {
@@ -127,8 +127,10 @@ variable "agentapi_port" {
127127
}
128128

129129
locals {
130-
# agentapi_subdomain_false_min_version_expr matches a semantic version >= v0.3.1.
131-
agentapi_subdomain_false_min_version_expr = "^v(0\\.(3\\.[1-9]+|[4-9]+\\.\\d+)|[1-9]\\d*\\.\\d+\\.\\d+)$"
130+
# agentapi_subdomain_false_min_version_expr matches a semantic version >= v0.3.3.
131+
# Initial support was added in v0.3.1 but configuration via environment variable
132+
# was added in v0.3.3.
133+
agentapi_subdomain_false_min_version_expr = "^v(0\\.(3\\.[3-9]+|[4-9]+\\.\\d+)|[1-9]\\d*\\.\\d+\\.\\d+)$"
132134
}
133135

134136
variable "agentapi_subdomain" {
@@ -143,7 +145,7 @@ variable "agentapi_subdomain" {
143145
can(regex(local.agentapi_subdomain_false_min_version_expr, var.agentapi_version)) :
144146
true
145147
)
146-
error_message = "Running with subdomain = false is only supported by agentapi >= v0.3.1."
148+
error_message = "Running with subdomain = false is only supported by agentapi >= v0.3.3."
147149
}
148150
}
149151

@@ -163,7 +165,8 @@ locals {
163165
agentapi_wait_for_start_script_b64 = base64encode(file("${path.module}/scripts/agentapi-wait-for-start.sh"))
164166
// Chat base path is only set if not using a subdomain.
165167
// NOTE:
166-
// - This requires agentapi version >= v0.3.1.
168+
// - Initial support for --chat-base-path was added in v0.3.1 but configuration
169+
// via environment variable AGENTAPI_CHAT_BASE_PATH was added in v0.3.3.
167170
// - As CODER_WORKSPACE_AGENT_NAME is a recent addition we use agent ID
168171
// for backward compatibility.
169172
agentapi_chat_base_path = var.agentapi_subdomain ? "" : "/@${data.coder_workspace_owner.me.name}/${data.coder_workspace.me.name}.${var.agent_id}/apps/${var.web_app_slug}/chat"

0 commit comments

Comments
 (0)