Conversation
Greptile SummaryThis PR improves workspace startup performance by baking bun, code-server, and common utilities into a custom Docker image, and updates both Coder templates to use it. It also adds hash-based VS Code extension caching and introduces a
Confidence Score: 4/5
Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: infra/docker/workspace/Dockerfile
Line: 19-21
Comment:
**`echo` produces invalid JSON in `settings.json`**
`echo` in `/bin/sh` (dash on Ubuntu) does **not** interpret `\n` as newlines unless `-e` is passed. As written, the file will literally contain `{\n "workbench...` — the `\` characters outside a JSON string value make this invalid JSON. Code-server will likely fail to parse the file and ignore or overwrite it, so the AI feature flags and sidebar settings won't actually be applied.
Use `printf` instead, which reliably interprets escape sequences across all POSIX shells:
```suggestion
RUN mkdir -p /home/coder/.local/share/code-server/User \
&& printf '{\n "workbench.secondarySideBar.defaultVisibility": "hidden",\n "chat.disableAIFeatures": true\n}\n' \
> /home/coder/.local/share/code-server/User/settings.json
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix: make workspace creation faster" | Re-trigger Greptile |
infra/docker/workspace/Dockerfile
Outdated
| RUN mkdir -p /home/coder/.local/share/code-server/User \ | ||
| && echo '{\n "workbench.secondarySideBar.defaultVisibility": "hidden",\n "chat.disableAIFeatures": true\n}' \ | ||
| > /home/coder/.local/share/code-server/User/settings.json |
There was a problem hiding this comment.
echo produces invalid JSON in settings.json
echo in /bin/sh (dash on Ubuntu) does not interpret \n as newlines unless -e is passed. As written, the file will literally contain {\n "workbench... — the \ characters outside a JSON string value make this invalid JSON. Code-server will likely fail to parse the file and ignore or overwrite it, so the AI feature flags and sidebar settings won't actually be applied.
Use printf instead, which reliably interprets escape sequences across all POSIX shells:
| RUN mkdir -p /home/coder/.local/share/code-server/User \ | |
| && echo '{\n "workbench.secondarySideBar.defaultVisibility": "hidden",\n "chat.disableAIFeatures": true\n}' \ | |
| > /home/coder/.local/share/code-server/User/settings.json | |
| RUN mkdir -p /home/coder/.local/share/code-server/User \ | |
| && printf '{\n "workbench.secondarySideBar.defaultVisibility": "hidden",\n "chat.disableAIFeatures": true\n}\n' \ | |
| > /home/coder/.local/share/code-server/User/settings.json |
Prompt To Fix With AI
This is a comment left during a code review.
Path: infra/docker/workspace/Dockerfile
Line: 19-21
Comment:
**`echo` produces invalid JSON in `settings.json`**
`echo` in `/bin/sh` (dash on Ubuntu) does **not** interpret `\n` as newlines unless `-e` is passed. As written, the file will literally contain `{\n "workbench...` — the `\` characters outside a JSON string value make this invalid JSON. Code-server will likely fail to parse the file and ignore or overwrite it, so the AI feature flags and sidebar settings won't actually be applied.
Use `printf` instead, which reliably interprets escape sequences across all POSIX shells:
```suggestion
RUN mkdir -p /home/coder/.local/share/code-server/User \
&& printf '{\n "workbench.secondarySideBar.defaultVisibility": "hidden",\n "chat.disableAIFeatures": true\n}\n' \
> /home/coder/.local/share/code-server/User/settings.json
```
How can I resolve this? If you propose a fix, please make it concise.| resource "kubernetes_deployment" "main" { | ||
| count = data.coder_workspace.me.start_count |
There was a problem hiding this comment.
Changing the resource type from kubernetes_deployment_v1 to kubernetes_deployment will cause Terraform to destroy and recreate the deployment on the next apply, resulting in workspace downtime. Terraform treats these as different resources in the state file.
Fix: Keep using kubernetes_deployment_v1 to maintain state continuity:
resource "kubernetes_deployment_v1" "main" {
count = data.coder_workspace.me.start_count| resource "kubernetes_deployment" "main" { | |
| count = data.coder_workspace.me.start_count | |
| resource "kubernetes_deployment_v1" "main" { | |
| count = data.coder_workspace.me.start_count | |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
Graphite Automations"Request reviewers once CI passes" took an action on this PR • (03/24/26)1 reviewer was added to this PR based on Arian Ahmadinejad's automation. |
1195eb8 to
73e1895
Compare
73e1895 to
0a12f77
Compare

TL;DR
Added a custom workspace Docker image with pre-installed dependencies and updated Coder templates to use it, improving workspace startup performance and reliability.
What changed?
codercom/enterprise-base:ubuntuwith pre-installed zip, unzip, curl, bun, and code-serverghcr.io/beanie-brick-band/leopard/workspace:latest) instead of the base Ubuntu imageHow to test?
infra/docker/workspace/**Why make this change?
This change significantly improves workspace startup time by pre-installing all required dependencies in a custom Docker image rather than installing them during each workspace initialization. It also enhances reliability by ensuring consistent environments and reduces network overhead during startup.
also fixes #320