Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[pull] main from coder:main #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 156 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
5a890c4
test: fix TestUploadFileLargeModuleFiles flake, context to subtest (#…
Emyrk Jun 16, 2025
eff2174
fix: prevent badge text wrapping (#18396)
aslilac Jun 16, 2025
5df70a6
feat: add organization scope for shared ports (#18314)
aslilac Jun 16, 2025
cda9208
test: add ReconcileAll tests for multiple actions on expired prebuild…
ssncferreira Jun 17, 2025
97474bb
feat: support devcontainer agents in ui and unify backend (#18332)
mafredri Jun 17, 2025
d6df1f2
fix(agent/agentcontainers): update sub agent client on reconnect (#18…
mafredri Jun 17, 2025
ebc769f
chore: make has_ai_task fields on workspace builds and template versi…
hugodutka Jun 17, 2025
b9ac16c
test(testutil): improve chan.go error visibility (#18406)
mafredri Jun 17, 2025
1a69338
chore: update Go version to 1.24.4 (#18408)
blink-so[bot] Jun 17, 2025
7e9a9e0
chore: update Terraform to 1.12.2 (#18407)
blink-so[bot] Jun 17, 2025
7fa1ad8
fix(agent/agentcontainers): reduce need to recreate sub agents (#18402)
mafredri Jun 17, 2025
aee96c9
fix: set fileSize to full length instead of unread portion (#18409)
Emyrk Jun 17, 2025
82c14e0
feat: add csp headers for embedded apps (#18374)
code-asher Jun 17, 2025
1672eeb
chore: add dynamic parameter template value to telemetry (#18414)
Emyrk Jun 17, 2025
9cbe02e
docs: update ai agents with module links (#18368)
matifali Jun 17, 2025
44d4646
fix: defensively handle nil maps and slices in marshaling (#18418)
angrycub Jun 17, 2025
5e3a225
feat: add stop workspace button with confirmation dialog (#18372)
blink-so[bot] Jun 18, 2025
529fb50
feat(agent/agentcontainers): support apps for dev container agents (#…
DanielleMaywood Jun 18, 2025
98a9aa1
docs: fix swagger documentation for DELETE port share endpoint (#18426)
blink-so[bot] Jun 18, 2025
2f59cd0
fix: improve JetBrains error message to mention Toolbox requirement (…
blink-so[bot] Jun 18, 2025
56ff0fb
fix(agent/agentcontainers): make sure arch is set for sub agents (#18…
mafredri Jun 18, 2025
591f5db
feat: add has-ai-task filters to the /workspaces and /templates endpo…
hugodutka Jun 18, 2025
8f6a5af
feat: add backend logic for determining tasks tab visibility (#18401)
hugodutka Jun 18, 2025
1357a3a
chore: improve logging and x11 handler call (#18422)
spikecurtis Jun 18, 2025
de07351
fix: access the templateVersion.HasAITask field properly (#18434)
hugodutka Jun 18, 2025
7849794
chore: change feature stage badge from early access to beta (#18435)
jaaydenh Jun 18, 2025
4039327
chore: check version.Err() after version.Next() in ConnectToPostgres …
hugodutka Jun 18, 2025
04d202a
chore: file cache Release tied 1:1 with an acquire (#18410)
Emyrk Jun 18, 2025
b0fa327
fix: increase TestAcquireJob_LongPoll timeout to prevent flakiness (#…
sreya Jun 19, 2025
8b27983
fix: fix TestAcquireJobWithCancel_Cancel flake (#18441)
sreya Jun 19, 2025
118bf98
chore(agent): add workspace owner env var and log dev container app f…
DanielleMaywood Jun 19, 2025
884ad39
fix(dogfood/coder): use agent name for zed app (#18450)
mafredri Jun 19, 2025
a04268a
feat(agent/agentcontainers): support agent name in customization (#18…
DanielleMaywood Jun 19, 2025
3ad842b
feat(dogfood/coder): add devcontainer-cli module (#18456)
mafredri Jun 19, 2025
68f21fa
feat(dogfood/coder): add docker volume for... docker (#18455)
mafredri Jun 19, 2025
511fd09
fix(coderd): mark sub agent deletion via boolean instead of delete (#…
mafredri Jun 19, 2025
0f6ca55
feat: implement scheduling mechanism for prebuilds (#18126)
evgeniy-scherbina Jun 19, 2025
9e7b7f2
feat(dogfood/coder): add devcontainer autostart parameter (#18459)
mafredri Jun 19, 2025
b49e62f
fix(agent/agentcontainers): ensure agent name env var is correct (#18…
DanielleMaywood Jun 19, 2025
63b5f0b
feat: add app iframe controls (#18421)
code-asher Jun 19, 2025
bacdc28
fix(cli)!: enforce selection for multiple agents rather than use rand…
mafredri Jun 19, 2025
d788ab9
feat: improve AppLink error message for coder:// URLs (#18444)
matifali Jun 20, 2025
32239b2
chore: add AI-tasks-specific fields to codersdk.WorkspaceBuild (#18436)
hugodutka Jun 20, 2025
4ceb549
chore: close db properly in early exit paths in ConnectToPostgres (#1…
hugodutka Jun 20, 2025
da5d5ba
fix: implement prebuild schedules methods for dbmem (#18469)
evgeniy-scherbina Jun 20, 2025
8e3022e
docs: add documentation for prebuild scheduling feature (#18462)
evgeniy-scherbina Jun 20, 2025
9c1feff
docs: add troubleshooting section to JetBrains Toolbox docs (#18394)
matifali Jun 20, 2025
d61353f
fix(agent/agentcontainers): read WorkspaceFolder from config (#18467)
DanielleMaywood Jun 20, 2025
72f7d70
feat: allow TemplateAdmin to delete prebuilds via auth layer (#18333)
ssncferreira Jun 20, 2025
9b5d499
chore: refactor dynamic parameters into dedicated package (#18420)
Emyrk Jun 20, 2025
556b095
chore: add cacheCloser to cleanup all opened files (#18473)
Emyrk Jun 20, 2025
4fe0a4b
feat: add ephemeral parameter dialog for workspace start/restart (#18…
blink-so[bot] Jun 20, 2025
fae30a0
chore: remove unnecessary redeclarations in for loops (#18440)
aslilac Jun 20, 2025
6e4508e
chore: assume template versions without tf values to be empty (#18479)
Emyrk Jun 20, 2025
cbe4627
docs: document how to tag coder users in dx data cloud (#17805)
EdwardAngert Jun 20, 2025
579c851
chore: update template opt-in checkbox (#18481)
jaaydenh Jun 20, 2025
0258f1d
docs: update Railway.com installation link (#18484)
matifali Jun 20, 2025
0a483ea
feat: add idle app status (#18415)
code-asher Jun 20, 2025
738442b
chore: add amazon-q icon SVG to static icons (#18295)
DevelopmentCats Jun 21, 2025
725bc37
fix: restrict database access from outside in docker compose installa…
jabacrack Jun 21, 2025
49fcffc
fix!: stop workspace before update (#18425)
johnstcn Jun 23, 2025
66e8dbb
feat: persist generated `coder_app` id (#18487)
dannykopping Jun 23, 2025
0a12ec5
fix(enterprise/coderd): skip org membership check for prebuilds user …
johnstcn Jun 23, 2025
c3bc1e7
feat(agent/agentcontainers): fall back to workspace folder name (#18466)
DanielleMaywood Jun 23, 2025
2f55e29
fix: complete job and mark workspace as deleted when no provisioners …
johnstcn Jun 23, 2025
183eaa2
ci: bump the github-actions group with 5 updates (#18497)
dependabot[bot] Jun 23, 2025
ba08d38
chore: bump github.com/coder/terraform-provider-coder/v2 from 2.6.0 t…
dependabot[bot] Jun 23, 2025
659b787
chore: set wsbuilder to use preview parameters (#18474)
Emyrk Jun 23, 2025
c1b35bf
chore: use database in current context for file cache (#18490)
Emyrk Jun 23, 2025
7254c08
chore: remove parallel queries in the same transaction (#18489)
Emyrk Jun 23, 2025
82af2e0
feat: implement dynamic parameter validation (#18482)
Emyrk Jun 23, 2025
4699393
fix: upsert `coder_app` resources in case they are persistent (#18509)
dannykopping Jun 23, 2025
7dd90f3
chore: show iframe controls on preview slug only (#18480)
code-asher Jun 23, 2025
6877142
feat: create experimental template embed page for dynamic params (#17…
jaaydenh Jun 23, 2025
f6e4ba6
chore: remove per request dynamic parameters opt in and rely on templ…
Emyrk Jun 23, 2025
5ed0c7a
chore: improve dynamic parameter validation errors (#18501)
Emyrk Jun 23, 2025
796dc7a
chore: ignore splunk.com in linkspector (#18502)
dannykopping Jun 24, 2025
4f98fd4
fix: fix validation error during workspace creation without preset (#…
SasSwart Jun 24, 2025
d892427
fix: do not warn on valid known experiments (#18514)
johnstcn Jun 24, 2025
9d148e9
chore: fix wsproxy flakes (#18522)
deansheather Jun 24, 2025
2afd1a2
chore: disable devtunnel tests on windows (#18521)
deansheather Jun 24, 2025
7c40f86
feat(cli): include license status in support bundle (#18472)
kacpersaw Jun 24, 2025
3fb5d0b
fix(agent/agentcontainers): use correct env for execer commands (#18508)
mafredri Jun 24, 2025
6cc4cfa
feat: allow for default presets (#18445)
dannykopping Jun 24, 2025
0238f29
feat: persist AI task state in template imports & workspace builds (#…
dannykopping Jun 24, 2025
670fa4a
feat: add the /aitasks/prompts endpoint (#18464)
hugodutka Jun 24, 2025
b091b99
chore: update VPN proto to match additional types used by Coder Deskt…
ibetitsmike Jun 24, 2025
4066785
fix: agentcontainers: fix flake when ctx cancelled while running dock…
johnstcn Jun 24, 2025
7b152cd
chore: increase fileCache hit rate in autobuilds lifecycle (#18507)
Emyrk Jun 24, 2025
bca5c35
fix: remove notifications for hard-limited prebuilds (#18528)
evgeniy-scherbina Jun 24, 2025
31d0c6f
feat: add better error display for workspace builds (#18518)
jaaydenh Jun 24, 2025
403f1c3
fix: add bottom padding back (#18476)
jaaydenh Jun 24, 2025
45ab265
chore: add permissions to autobuilder & prebuilder to run wsbuild (#1…
Emyrk Jun 24, 2025
4ff2254
chore: remove ai tasks from experiment (#18511)
hugodutka Jun 24, 2025
1d2b96b
feat: implement efficient backend querying on the tasks page (#18488)
hugodutka Jun 24, 2025
a4f1c64
fix: allow dynamic parameters to consider the prebuilds user an owner…
SasSwart Jun 24, 2025
5816455
fix: remove reference to a deleted variable (#18532)
hugodutka Jun 24, 2025
341b54e
fix: allow dynamic parameters without requiring org membership (#18531)
Emyrk Jun 24, 2025
f44969b
chore: reorder prebuilt workspace authorization logic (#18506)
ssncferreira Jun 24, 2025
dc24922
fix: use the correct key for tasks tab visibility in embedded metadat…
hugodutka Jun 24, 2025
cd484db
fix: only override img size for direct button children (#18540)
BrunoQuaresma Jun 24, 2025
e5eb2a8
fix: prebuild user without ssh key when fetching owner ctx (#18541)
Emyrk Jun 24, 2025
ccf294e
chore: improve visuals of dynamic parameters (#18537)
jaaydenh Jun 24, 2025
b2009b2
chore: add a claude.md markdown file focusing on the frontend (#18510)
jaaydenh Jun 24, 2025
b6c493d
fix: correct hasAITaskResources logic for child modules (#18542)
hugodutka Jun 24, 2025
64a2214
fix(agent/agentcontainers): remove shellquote in favor of %q (#18544)
mafredri Jun 24, 2025
4fd0312
feat: use backend-supplied sidebar app id on the /task/$id page (#18458)
hugodutka Jun 24, 2025
fcf9371
feat(agent/agentcontainers): retry with longer name on failure (#18513)
DanielleMaywood Jun 24, 2025
99d124e
feat(agent): enable devcontainers by default (#18533)
mafredri Jun 24, 2025
7070e47
fix: update workspace table icons in WorkspacesTable (#18525)
johnstcn Jun 24, 2025
b9e32c8
refactor: remove unused enterprise prebuilds id.go (#18543)
ssncferreira Jun 24, 2025
06c997a
chore: make telemetry use_classic_parameter_flow nullable (#18547)
Emyrk Jun 24, 2025
e443f86
feat(agent/agentcontainers): implement ignore customization for devco…
mafredri Jun 24, 2025
b93db1c
fix: site: replace CirclePlayIcon with PlayIcon (#18549)
johnstcn Jun 24, 2025
6ed2204
chore: use pause icon for app idle state (#18546)
code-asher Jun 24, 2025
25f1b76
fix: handle empty strings for Select component (#18553)
jaaydenh Jun 24, 2025
fe22b2c
chore: update coder/preview dependency to v1.0.1 (#18550)
Emyrk Jun 24, 2025
a8e2c75
chore: update Coder icons to reflect new branding (#18517)
Parkreiner Jun 24, 2025
288ec77
feat: add workspace build status to task page (#18520)
code-asher Jun 24, 2025
79c666b
fix(vpn): avoid setting session token header twice (#18524)
ethanndickson Jun 25, 2025
312d2a4
docs: update Claude's guide (#18523)
emmanuel-ferdman Jun 25, 2025
b5316d2
docs: fix a warning alert type on toolbox docs (#18560)
matifali Jun 25, 2025
f6d9765
fix(site): storybook: move spyOn to beforeEach (#18559)
mtojek Jun 25, 2025
c4e4fe8
fix(agent): start devcontainers through agentcontainers package (#18471)
DanielleMaywood Jun 25, 2025
42fd1c1
ci: cache embedded postgres downloaded binaries (#18477)
johnstcn Jun 25, 2025
434b546
fix(agent/agentcontainers): filter out "is test run" devcontainers (#…
mafredri Jun 25, 2025
9fde835
test(agent/agentcontainers): add is a test ignore label to integratio…
mafredri Jun 25, 2025
688d2ee
chore: remove chats experiment (#18535)
dannykopping Jun 25, 2025
3c4d920
feat(agent/agentcontainers): add feature options as envs (#18576)
mafredri Jun 25, 2025
072c81c
docs: remove nested alerts (#18580)
EdwardAngert Jun 25, 2025
e396b06
feat: allow new immutable parameters for existing workspaces (#18579)
Emyrk Jun 25, 2025
8e0b6f8
chore: upgrade aisdk-go lib, remove vestigial code (#18577)
dannykopping Jun 25, 2025
9d2f8dc
chore: bump github.com/openai/openai-go from 0.1.0-beta.10 to 1.6.0 (…
dependabot[bot] Jun 25, 2025
aef101f
chore: bump google.golang.org/genai from 0.7.0 to 1.12.0 (#18496)
dependabot[bot] Jun 25, 2025
6c713d5
fix(coderd/agentapi): make sub agent slugs more unique (#18581)
DanielleMaywood Jun 25, 2025
48bb534
chore: fix idle state icon when disabled (#18554)
code-asher Jun 25, 2025
09e1a8a
feat(.devcontainer): add code-server feature to `devcontainer.json` (…
mafredri Jun 25, 2025
fdf458e
refactor: remove beta label from 'select a preset' menu (#18538)
BrunoQuaresma Jun 25, 2025
fb0e7a2
docs: add Coder Desktop to remote desktop docs (#18326)
matifali Jun 26, 2025
634144f
fix: hide the preset parameter visibility switch when it has no effec…
SasSwart Jun 26, 2025
eca6381
feat(agent/agentcontainers): add more envs to readconfig for app URL …
mafredri Jun 26, 2025
f2d229e
fix!: use devcontainer ID when rebuilding a devcontainer (#18604)
DanielleMaywood Jun 26, 2025
872aef3
feat(.devcontainer): install dotfiles if present (#18606)
mafredri Jun 26, 2025
c6e0ba1
feat: graduate prebuilds to general availability (#18607)
SasSwart Jun 26, 2025
87d052e
feat(.devcontainer): add cursor, filebrowser, windsurf and zed (#18608)
mafredri Jun 26, 2025
5ae320e
fix(agent/agentcontainers): chown coder binary (#18611)
DanielleMaywood Jun 26, 2025
98c77fe
fix(agent/agentcontainers): stop logging empty lines (#18605)
DanielleMaywood Jun 26, 2025
1b1d091
fix: pin Nix version to 2.28.4 to avoid JSON type error (#18612)
ThomasK33 Jun 26, 2025
e03d132
test(agent): fix TestAgent_DevcontainerRecreate (#18618)
mafredri Jun 26, 2025
09cc906
chore: remove unnecessary redeclarations in for loops (part 2) (#18593)
aslilac Jun 26, 2025
4f44dd0
fix(agent/agentcontainers): prevent reassigning proc.agent until succ…
mafredri Jun 26, 2025
7a3a6d4
chore: update README logos (#18619)
sreya Jun 26, 2025
7387905
fix(agent/agentcontainers): refresh containers before status change (…
mafredri Jun 26, 2025
7b0b649
fix(.devcontainer): start docker and install devcontainer CLI (#18621)
mafredri Jun 26, 2025
d5e3419
revert: fix(agent/agentcontainers): refresh containers before status …
mafredri Jun 26, 2025
05f6d69
chore: parse app status link (#18439)
code-asher Jun 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
53 changes: 48 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,61 @@
{
"name": "Development environments on your infrastructure",
"image": "codercom/oss-dogfood:latest",

"features": {
// See all possible options here https://github.com/devcontainers/features/tree/main/src/docker-in-docker
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": "false"
}
},
"ghcr.io/coder/devcontainer-features/code-server:1": {
"auth": "none",
"port": 13337
},
"./filebrowser": {}
},
// SYS_PTRACE to enable go debugging
"runArgs": ["--cap-add=SYS_PTRACE"],
"runArgs": [
"--cap-add=SYS_PTRACE"
],
"customizations": {
"vscode": {
"extensions": ["biomejs.biome"]
"extensions": [
"biomejs.biome"
]
},
"coder": {
"apps": [
{
"slug": "cursor",
"displayName": "Cursor Desktop",
"url": "cursor://coder.coder-remote/openDevContainer?owner=${localEnv:CODER_WORKSPACE_OWNER_NAME}&workspace=${localEnv:CODER_WORKSPACE_NAME}&agent=${localEnv:CODER_WORKSPACE_PARENT_AGENT_NAME}&url=${localEnv:CODER_URL}&token=$SESSION_TOKEN&devContainerName=${localEnv:CONTAINER_ID}&devContainerFolder=${containerWorkspaceFolder}",
"external": true,
"icon": "/icon/cursor.svg",
"order": 1
},
{
"slug": "windsurf",
"displayName": "Windsurf Editor",
"url": "windsurf://coder.coder-remote/openDevContainer?owner=${localEnv:CODER_WORKSPACE_OWNER_NAME}&workspace=${localEnv:CODER_WORKSPACE_NAME}&agent=${localEnv:CODER_WORKSPACE_PARENT_AGENT_NAME}&url=${localEnv:CODER_URL}&token=$SESSION_TOKEN&devContainerName=${localEnv:CONTAINER_ID}&devContainerFolder=${containerWorkspaceFolder}",
"external": true,
"icon": "/icon/windsurf.svg",
"order": 4
},
{
"slug": "zed",
"displayName": "Zed Editor",
"url": "zed://ssh/${localEnv:CODER_WORKSPACE_AGENT_NAME}.${localEnv:CODER_WORKSPACE_NAME}.${localEnv:CODER_WORKSPACE_OWNER_NAME}.coder/${containerWorkspaceFolder}",
"external": true,
"icon": "/icon/zed.svg",
"order": 5
}
]
}
}
},
"mounts": [
// Mount the entire home because conditional mounts are not supported.
// See: https://github.com/devcontainers/spec/issues/132
"source=${localEnv:HOME},target=/mnt/home/coder,type=bind,readonly"
],
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
"postStartCommand": "sudo service docker start"
}
50 changes: 50 additions & 0 deletions .devcontainer/filebrowser/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"id": "filebrowser",
"version": "0.0.1",
"name": "File Browser",
"description": "A web-based file browser for your development container",
"options": {
"port": {
"type": "string",
"default": "13339",
"description": "The port to run filebrowser on"
},
// "folder": {
// "type": "string",
// "default": "${containerWorkspaceFolder}",
// "description": "The root directory for filebrowser to serve"
// },
"auth": {
"type": "string",
"enum": [
"none",
"password"
],
"default": "none",
"description": "Authentication method (none or password)"
}
},
"entrypoint": "/usr/local/bin/filebrowser-entrypoint",
"dependsOn": {
"ghcr.io/devcontainers/features/common-utils:2": {}
},
"customizations": {
"coder": {
"apps": [
{
"slug": "filebrowser",
"displayName": "File Browser",
"url": "http://localhost:${localEnv:FEATURE_FILEBROWSER_OPTION_PORT:13339}",
"icon": "/icon/filebrowser.svg",
"order": 3,
"subdomain": true,
"healthcheck": {
"url": "http://localhost:${localEnv:FEATURE_FILEBROWSER_OPTION_PORT:13339}/health",
"interval": 5,
"threshold": 6
}
}
]
}
}
}
56 changes: 56 additions & 0 deletions .devcontainer/filebrowser/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash

set -euo pipefail

BOLD='\033[0;1m'

printf "%sInstalling filebrowser\n\n" "${BOLD}"

# Check if filebrowser is installed.
if ! command -v filebrowser &>/dev/null; then
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
fi

printf "πŸ₯³ Installation complete!\n\n"

# Create run script.
cat >/usr/local/bin/filebrowser-entrypoint <<EOF
#!/bin/bash

printf "πŸ› οΈ Configuring filebrowser\n\n"

AUTH="${AUTH}"
PORT="${PORT}"
FOLDER="$(pwd)"
LOG_PATH=/tmp/filebrowser.log
export FB_DATABASE="/tmp/filebrowser.db"

# Check if filebrowser db exists.
if [[ ! -f "\${FB_DATABASE}" ]]; then
filebrowser config init
if [[ "\$AUTH" == "password" ]]; then
filebrowser users add admin admin --perm.admin=true --viewMode=mosaic
fi
fi

# Configure filebrowser.
if [[ "\$AUTH" == "none" ]]; then
filebrowser config set --port="\${PORT}" --auth.method=noauth --root="\${FOLDER}"
else
filebrowser config set --port="\${PORT}" --auth.method=json --root="\${FOLDER}"
fi

set -euo pipefail

printf "πŸ‘· Starting filebrowser...\n\n"
printf "πŸ“‚ Serving \${FOLDER} at http://localhost:\${PORT}\n\n"

filebrowser >>\${LOG_PATH} 2>&1 &

printf "πŸ“ Logs at \${LOG_PATH}\n\n"
EOF

chmod +x /usr/local/bin/filebrowser-entrypoint

printf "βœ… File Browser installed!\n\n"
printf "πŸš€ Run 'filebrowser-entrypoint' to start the service\n\n"
59 changes: 59 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/sh

install_devcontainer_cli() {
npm install -g @devcontainers/cli
}

install_ssh_config() {
echo "πŸ”‘ Installing SSH configuration..."
rsync -a /mnt/home/coder/.ssh/ ~/.ssh/
chmod 0700 ~/.ssh
}

install_git_config() {
echo "πŸ“‚ Installing Git configuration..."
if [ -f /mnt/home/coder/git/config ]; then
rsync -a /mnt/home/coder/git/ ~/.config/git/
elif [ -d /mnt/home/coder/.gitconfig ]; then
rsync -a /mnt/home/coder/.gitconfig ~/.gitconfig
else
echo "⚠️ Git configuration directory not found."
fi
}

install_dotfiles() {
if [ ! -d /mnt/home/coder/.config/coderv2/dotfiles ]; then
echo "⚠️ Dotfiles directory not found."
return
fi

cd /mnt/home/coder/.config/coderv2/dotfiles || return
for script in install.sh install bootstrap.sh bootstrap script/bootstrap setup.sh setup script/setup; do
if [ -x $script ]; then
echo "πŸ“¦ Installing dotfiles..."
./$script || {
echo "❌ Error running $script. Please check the script for issues."
return
}
echo "βœ… Dotfiles installed successfully."
return
fi
done
echo "⚠️ No install script found in dotfiles directory."
}

personalize() {
# Allow script to continue as Coder dogfood utilizes a hack to
# synchronize startup script execution.
touch /tmp/.coder-startup-script.done

if [ -x /mnt/home/coder/personalize ]; then
echo "🎨 Personalizing environment..."
/mnt/home/coder/personalize
fi
}

install_devcontainer_cli
install_ssh_config
install_dotfiles
personalize
1 change: 1 addition & 0 deletions .github/.linkspector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ ignorePatterns:
- pattern: "mutagen.io"
- pattern: "docs.github.com"
- pattern: "claude.ai"
- pattern: "splunk.com"
aliveStatusCodes:
- 200
47 changes: 47 additions & 0 deletions .github/actions/embedded-pg-cache/download/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Download Embedded Postgres Cache"
description: |
Downloads the embedded postgres cache and outputs today's cache key.
A PR job can use a cache if it was created by its base branch, its current
branch, or the default branch.
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
outputs:
cache-key:
description: "Today's cache key"
value: ${{ steps.vars.outputs.cache-key }}
inputs:
key-prefix:
description: "Prefix for the cache key"
required: true
cache-path:
description: "Path to the cache directory"
required: true
runs:
using: "composite"
steps:
- name: Get date values and cache key
id: vars
shell: bash
run: |
export YEAR_MONTH=$(date +'%Y-%m')
export PREV_YEAR_MONTH=$(date -d 'last month' +'%Y-%m')
export DAY=$(date +'%d')
echo "year-month=$YEAR_MONTH" >> $GITHUB_OUTPUT
echo "prev-year-month=$PREV_YEAR_MONTH" >> $GITHUB_OUTPUT
echo "cache-key=${{ inputs.key-prefix }}-${YEAR_MONTH}-${DAY}" >> $GITHUB_OUTPUT

# By default, depot keeps caches for 14 days. This is plenty for embedded
# postgres, which changes infrequently.
# https://depot.dev/docs/github-actions/overview#cache-retention-policy
- name: Download embedded Postgres cache
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{ inputs.cache-path }}
key: ${{ steps.vars.outputs.cache-key }}
# > If there are multiple partial matches for a restore key, the action returns the most recently created cache.
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
# The second restore key allows non-main branches to use the cache from the previous month.
# This prevents PRs from rebuilding the cache on the first day of the month.
# It also makes sure that once a month, the cache is fully reset.
restore-keys: |
${{ inputs.key-prefix }}-${{ steps.vars.outputs.year-month }}-
${{ github.ref != 'refs/heads/main' && format('{0}-{1}-', inputs.key-prefix, steps.vars.outputs.prev-year-month) || '' }}
18 changes: 18 additions & 0 deletions .github/actions/embedded-pg-cache/upload/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Upload Embedded Postgres Cache"
description: Uploads the embedded Postgres cache. This only runs on the main branch.
inputs:
cache-key:
description: "Cache key"
required: true
cache-path:
description: "Path to the cache directory"
required: true
runs:
using: "composite"
steps:
- name: Upload Embedded Postgres cache
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}
33 changes: 33 additions & 0 deletions .github/actions/setup-embedded-pg-cache-paths/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Setup Embedded Postgres Cache Paths"
description: Sets up a path for cached embedded postgres binaries.
outputs:
embedded-pg-cache:
description: "Value of EMBEDDED_PG_CACHE_DIR"
value: ${{ steps.paths.outputs.embedded-pg-cache }}
cached-dirs:
description: "directories that should be cached between CI runs"
value: ${{ steps.paths.outputs.cached-dirs }}
runs:
using: "composite"
steps:
- name: Override Go paths
id: paths
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
with:
script: |
const path = require('path');

// RUNNER_TEMP should be backed by a RAM disk on Windows if
// coder/setup-ramdisk-action was used
const runnerTemp = process.env.RUNNER_TEMP;
const embeddedPgCacheDir = path.join(runnerTemp, 'embedded-pg-cache');
core.exportVariable('EMBEDDED_PG_CACHE_DIR', embeddedPgCacheDir);
core.setOutput('embedded-pg-cache', embeddedPgCacheDir);
const cachedDirs = `${embeddedPgCacheDir}`;
core.setOutput('cached-dirs', cachedDirs);

- name: Create directories
shell: bash
run: |
set -e
mkdir -p "$EMBEDDED_PG_CACHE_DIR"
2 changes: 1 addition & 1 deletion .github/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: |
inputs:
version:
description: "The Go version to use."
default: "1.24.2"
default: "1.24.4"
use-preinstalled-go:
description: "Whether to use preinstalled Go."
default: "false"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-tf/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ runs:
- name: Install Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: 1.11.4
terraform_version: 1.12.2
terraform_wrapper: false
Loading
Loading