From ba53973c2355512ff018392698c5f7f3c1936703 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 19 Jun 2025 10:27:17 +0000 Subject: [PATCH] fix(dogfood/coder): use fqdn for zed Previously our Zed app did not use the agent name as part of the hostname being accessed and would break in multi-agent environments. This change fixes it. --- dogfood/coder/main.tf | 9 +++++---- dogfood/coder/zed/main.tf | 13 ++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dogfood/coder/main.tf b/dogfood/coder/main.tf index 2db38c4c29218..c7d91088b8401 100644 --- a/dogfood/coder/main.tf +++ b/dogfood/coder/main.tf @@ -336,10 +336,11 @@ module "windsurf" { } module "zed" { - count = data.coder_workspace.me.start_count - source = "./zed" - agent_id = coder_agent.dev.id - folder = local.repo_dir + count = data.coder_workspace.me.start_count + source = "./zed" + agent_id = coder_agent.dev.id + agent_name = "dev" + folder = local.repo_dir } resource "coder_agent" "dev" { diff --git a/dogfood/coder/zed/main.tf b/dogfood/coder/zed/main.tf index c4210385bad93..96466ba258a1b 100644 --- a/dogfood/coder/zed/main.tf +++ b/dogfood/coder/zed/main.tf @@ -12,17 +12,28 @@ variable "agent_id" { type = string } +variable "agent_name" { + type = string + default = "" +} + variable "folder" { type = string } data "coder_workspace" "me" {} +locals { + workspace_name = lower(data.coder_workspace.me.name) + agent_name = lower(var.agent_name) + hostname = var.agent_name != "" ? "${local.agent_name}.${local.workspace_name}.me.coder" : "${local.workspace_name}.coder" +} + resource "coder_app" "zed" { agent_id = var.agent_id display_name = "Zed" slug = "zed" icon = "/icon/zed.svg" external = true - url = "zed://ssh/${lower(data.coder_workspace.me.name)}.coder/${var.folder}" + url = "zed://ssh/${local.hostname}/${var.folder}" } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy