diff --git a/dogfood/main.tf b/dogfood/main.tf index 914e6c40ce..db3e5f6b3f 100644 --- a/dogfood/main.tf +++ b/dogfood/main.tf @@ -100,7 +100,7 @@ resource "coderd_template" "dogfood" { resource "coderd_template" "vscode_coder" { name = "vscode-coder" - display_name = "Write VS Code Extension on Coder" + display_name = "Write Coder VS Code Extension on Coder" description = "Develop the coder/vscode-coder VS Code extension on Coder." icon = "/icon/code.svg" organization_id = data.coderd_organization.default.id diff --git a/dogfood/vscode-coder/README.md b/dogfood/vscode-coder/README.md new file mode 100644 index 0000000000..d59dc0f887 --- /dev/null +++ b/dogfood/vscode-coder/README.md @@ -0,0 +1,35 @@ +# vscode-coder template + +This template is for developing the +[coder/vscode-coder](https://github.com/coder/vscode-coder) VS Code extension. + +## Personalization + +The template includes a `personalize` module that runs your `~/personalize` +file if it exists. + +## Testing + +The workspace comes with Playwright Chromium, GTK libraries, xauth, and a +D-Bus daemon pre-configured for running tests headlessly, the same way CI +does. + +Integration tests launch a real VS Code instance and require a virtual +framebuffer. Run them with `xvfb-run -a pnpm test:integration` to match +CI behavior. + +See the repo's +[AGENTS.md](https://github.com/coder/vscode-coder/blob/main/AGENTS.md) +for the full list of commands. + +## Hosting + +Coder dogfoods on a single Teraswitch bare metal machine for best-in-class +cost-to-performance. Workspaces run as Docker containers with regional +Tailscale endpoints for Pittsburgh, Falkenstein, Sydney, and Cape Town. + +## Provisioner Configuration + +The dogfood coderd box runs an SSH tunnel to the Docker host's socket, +mounted at `/var/run/dogfood-docker.sock`. The tunnel runs in a screen +session named `forward` and is owned by root. diff --git a/dogfood/vscode-coder/main.tf b/dogfood/vscode-coder/main.tf index 17c4316cc5..afef687b51 100644 --- a/dogfood/vscode-coder/main.tf +++ b/dogfood/vscode-coder/main.tf @@ -364,6 +364,18 @@ resource "coder_agent" "dev" { timeout = 60 } + metadata { + display_name = "Word of the Day" + key = "word" + order = 3 + script = <&1 | awk ' $0 ~ "Word of the Day: [A-z]+" { print $5; exit }' + EOT + interval = 86400 + timeout = 5 + } + resources_monitoring { memory { enabled = true @@ -551,6 +563,13 @@ locals { - Built-in tools for everything: (file operations, git commands, builds & installs, one-off shell commands) + -- Testing -- + Integration tests launch a real VS Code instance and require a + virtual framebuffer. Run them headlessly with: + xvfb-run -a pnpm test:integration + This matches how CI runs them. Unit tests do not need xvfb-run: + pnpm test + -- Workflow -- When starting new work: 1. If given a GitHub issue URL, use the `gh` CLI to read the full