Skip to content

[pull] main from coder:main #52

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 199 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
118f12a
feat: implement claiming of prebuilt workspaces (#17458)
evgeniy-scherbina Apr 24, 2025
fc921a5
chore(docs): update release calendar dates and next release calculati…
matifali Apr 24, 2025
e562e3c
chore: mark parameters as required (#17551)
jaaydenh Apr 24, 2025
08ad910
feat: add prebuilds configuration & bootstrapping (#17527)
dannykopping Apr 25, 2025
b47d54d
chore: cache terraform providers between CI test runs (#17373)
hugodutka Apr 28, 2025
e0483e3
feat: add prebuilds metrics collector (#17547)
dannykopping Apr 28, 2025
cabfc98
chore: bump github.com/mark3labs/mcp-go from 0.22.0 to 0.23.1 (#17576)
dependabot[bot] Apr 28, 2025
42e91de
chore: bump google.golang.org/api from 0.229.0 to 0.230.0 (#17578)
dependabot[bot] Apr 28, 2025
38e7793
chore: bump github.com/gohugoio/hugo from 0.146.3 to 0.147.0 (#17577)
dependabot[bot] Apr 28, 2025
b299ebe
chore: bump github.com/valyala/fasthttp from 1.60.0 to 1.61.0 (#17575)
dependabot[bot] Apr 28, 2025
0a26eee
ci: bump the github-actions group with 7 updates (#17581)
dependabot[bot] Apr 28, 2025
5ca90ae
fix: handle null value for experiments (#17584)
BrunoQuaresma Apr 28, 2025
3ab3ef8
feat: add link to provisioner jobs and daemons (#17509)
BrunoQuaresma Apr 28, 2025
9167cbf
refactor: claim prebuilt workspace tests (#17567)
evgeniy-scherbina Apr 28, 2025
37c5e7c
chore: return safe copy of string slice in 'ParseStringSliceClaim' (#…
Emyrk Apr 28, 2025
b9177ef
chore: update guts to latest, using mutations to prevent diffs (#17588)
Emyrk Apr 28, 2025
14105ff
test: do not run memory race test in parallel (#17582)
Emyrk Apr 28, 2025
df47c30
fix: fix script timings spam in the workspace UI (#17590)
BrunoQuaresma Apr 28, 2025
1da27a1
fix: handle missed actions in workspace timings (#17593)
BrunoQuaresma Apr 28, 2025
a78f0fc
refactor: use specific error for agpl and prebuilds (#17591)
evgeniy-scherbina Apr 28, 2025
1258902
chore: update error message for duplicate organization members (#17594)
aslilac Apr 28, 2025
b6146df
chore: remove circular dependencies (#17585)
brettkolodny Apr 28, 2025
268a50c
feat(agent/agentcontainers): add file watcher and dirty status (#17573)
mafredri Apr 29, 2025
02b2de9
refactor: skip reconciliation for some presets (#17595)
evgeniy-scherbina Apr 29, 2025
22b932a
fix(cli): fix prompt issue in mcp configure claude-code (#17599)
johnstcn Apr 29, 2025
1fc74f6
refactor(agent): update agentcontainers api initialization (#17600)
mafredri Apr 29, 2025
2acf0ad
chore(codersdk/toolsdk): improve static analyzability of toolsdk.Tool…
johnstcn Apr 29, 2025
67e1ab4
chore(docs): update release calendar for 2.21 patches (#17605)
stirby Apr 29, 2025
70ea678
chore: make the template docs view the default (#17606)
aslilac Apr 29, 2025
53ba361
feat(cli): use coder connect in `coder ssh --stdio`, if available (#1…
ethanndickson Apr 30, 2025
7a1e56b
test: avoid sharing `echo.Responses` across tests (#17610)
ethanndickson Apr 30, 2025
d7e6eb7
chore(cli): fix test flake when running in coder workspace (#17604)
johnstcn Apr 30, 2025
650a48c
chore: update windsurf icon (#17607)
matifali Apr 30, 2025
fe4c412
fix(dogfood/coder): increase in-container docker daemon shutdown time…
mafredri Apr 30, 2025
ff54ae3
fix: update devcontainer data every 10s (#17619)
BrunoQuaresma Apr 30, 2025
6936a7b
fix: fix prebuild omissions (#17579)
dannykopping Apr 30, 2025
ef101ae
docs: update ai feature stage to beta and ease the intro note's tone …
EdwardAngert Apr 30, 2025
205076e
refactor: change how timings are formatted (#17623)
BrunoQuaresma Apr 30, 2025
f108f9d
chore: setup knip and remove unused exports, files, and dependencies …
brettkolodny Apr 30, 2025
6bafe35
chore: bump vite from 5.4.18 to 5.4.19 in /site (#17625)
dependabot[bot] Apr 30, 2025
d104cd6
fix: display validation error for workspace name (#17564)
jaaydenh Apr 30, 2025
4de7661
fix: remove unused import (#17626)
jaaydenh Apr 30, 2025
c7fc7b9
fix: create directory before writing coder connect network info file …
ethanndickson May 1, 2025
98e5611
fix: fix for prebuilds claiming and deletion (#17624)
evgeniy-scherbina May 1, 2025
35d686c
chore: add Spike & Cian as CODEOWNERS for provisionerd proto (#17629)
spikecurtis May 1, 2025
ef00ae5
fix: fix data race in agentscripts.Runner (#17630)
spikecurtis May 1, 2025
4ac71e9
fix(codersdk/toolsdk): ensure all tools include required fields of ai…
johnstcn May 1, 2025
cae4fa8
chore: correct typo in "Logs" page (#17633)
phorcys420 May 1, 2025
b7e08ba
fix: filter out deleted users when attempting to delete an organizati…
brettkolodny May 1, 2025
d9ef6ed
chore: replace MoreMenu with DropdownMenu (#17615)
jaaydenh May 1, 2025
ef11d4f
fix: fix bug with deletion of prebuilt workspaces (#17652)
evgeniy-scherbina May 1, 2025
a226a75
docs: add early access dev container docs (#17613)
mafredri May 1, 2025
e718c3a
fix: improve WebSocket error handling in CreateWorkspacePageExperimen…
jaaydenh May 1, 2025
c278662
feat: collect database metrics (#17635)
dannykopping May 2, 2025
50695b7
docs: fix link in tutorials faq to new docker-code-server link (#17655)
EdwardAngert May 2, 2025
912b6ab
docs: link to eks steps from aws section (#17646)
EdwardAngert May 2, 2025
e37ddd4
chore: improve the design of the create workspace page for dynamic pa…
jaaydenh May 2, 2025
64b9bc1
fix: update licensing info URL on sign up page (#17657)
matifali May 2, 2025
544259b
feat: add database tables and API routes for agentic chat feature (#1…
johnstcn May 2, 2025
3be6487
feat: support GFM alerts in markdown (#17662)
BrunoQuaresma May 2, 2025
82fdb6a
fix: fix size for non-squared app icons (#17663)
BrunoQuaresma May 2, 2025
a646478
fix: move pubsub publishing out of database transactions to avoid con…
dannykopping May 5, 2025
87f4535
chore: optimize CI setup time on Windows (#17666)
hugodutka May 5, 2025
dc66daf
chore: bump github.com/mark3labs/mcp-go from 0.23.1 to 0.25.0 (#17672)
dependabot[bot] May 5, 2025
1f569f7
chore: bump google.golang.org/api from 0.230.0 to 0.231.0 (#17671)
dependabot[bot] May 5, 2025
b8137e7
chore: bump github.com/openai/openai-go from 0.1.0-beta.6 to 0.1.0-be…
dependabot[bot] May 5, 2025
93a584b
fix: fix windsurf icon on light theme (#17679)
BrunoQuaresma May 5, 2025
4369765
test: fix `TestWorkspaceAgentReportStats` flake (#17678)
ethanndickson May 5, 2025
6b4d3f8
chore: reduce "Upload tests to datadog" times in CI (#17668)
hugodutka May 5, 2025
4587082
chore: update design of External auth section of CreateWorkspacePage …
jaaydenh May 5, 2025
ec003b7
fix: update default value handling for dynamic defaults (#17609)
jaaydenh May 6, 2025
ebad5c3
test(agent): fix channel timeout in TestNewServer_CloseActiveConnecti…
mafredri May 6, 2025
5f516ed
feat: improve coder connect tunnel handling on reconnect (#17598)
ibetitsmike May 6, 2025
d9b00e4
feat: add inline actions into workspaces table (#17636)
BrunoQuaresma May 6, 2025
a7e8285
chore: retry failing tests in CI (#17681)
hugodutka May 6, 2025
4fa9d30
refactor: update app buttons to use the new button component (#17684)
BrunoQuaresma May 6, 2025
df0c6ed
chore: add custom aider icon (#17682)
DevelopmentCats May 6, 2025
d146115
chore: update browser list db (#17699)
BrunoQuaresma May 7, 2025
9fe5b71
chore!: fix workspace apps response (#17700)
BrunoQuaresma May 7, 2025
6ac1bd8
feat: display builtin apps on workspaces table (#17695)
BrunoQuaresma May 7, 2025
29bce8d
feat(cli): make MCP server work without user authentication (#17688)
ThomasK33 May 7, 2025
a02ba66
fix: fill session token when app is external (#17708)
BrunoQuaresma May 7, 2025
e4c6c10
chore: fix comment regarding provisioner api version release (#17705)
Emyrk May 7, 2025
b6182fe
chore: add code-insiders.svg static icon (#17716)
deansheather May 8, 2025
c66e80e
fix: extract checkbox label from dynamic parameter styling prop (#17651)
jaaydenh May 8, 2025
2695f4e
chore: improve variable names of mocked users (#17701)
BrunoQuaresma May 8, 2025
4341403
chore: simplify workspaces data fetching (#17703)
BrunoQuaresma May 8, 2025
857587b
fix: do not share token with http app urls (#17720)
BrunoQuaresma May 8, 2025
1bb96b8
fix: resolve flake test on manager (#17702)
defelmnq May 8, 2025
c5c3a54
fix: create ssh directory if it doesn't already exist when running `c…
brettkolodny May 8, 2025
0b141c4
chore: add DynamicParameter stories (#17710)
jaaydenh May 8, 2025
d93a9cf
feat: add TagInput component for dynamic parameters (#17719)
jaaydenh May 8, 2025
d5360a6
chore: fetch workspaces by username with organization permissions (#1…
Emyrk May 8, 2025
9a052e2
fix: use file filter in weekly-docs github action (#17729)
EdwardAngert May 8, 2025
ae3d90b
fix: persist terraform modules during template import (#17665)
aslilac May 8, 2025
a9f1a6b
fix: revert fix: persist terraform modules during template import (#1…
sreya May 9, 2025
58adc62
chore: add prebuild docs (#17580)
dannykopping May 9, 2025
2696926
fix: fixed flaking VPN tunnel tests & bump coder/quartz to 0.1.3 (#17…
ibetitsmike May 9, 2025
f897981
chore: extract app access logic for reuse (#17724)
BrunoQuaresma May 9, 2025
2bdd035
chore: add keys for each app on workspaces table (#17726)
BrunoQuaresma May 9, 2025
902c34c
refactor: improve apps.ts readbility (#17741)
BrunoQuaresma May 9, 2025
0b8fd7e
chore: fix :first-child warning (#17727)
BrunoQuaresma May 9, 2025
9d7630b
chore: replace MUI icons - 1 (#17731)
BrunoQuaresma May 9, 2025
3ee95f1
chore: upgrade `terraform-provider-coder` & `preview` libs (#17738)
dannykopping May 9, 2025
5c53277
docs: clarify parameter autofill documentation (#17728)
EdwardAngert May 9, 2025
9e44f18
refactor: add safe list for external app protocols (#17742)
BrunoQuaresma May 9, 2025
b0a4ef0
chore: replace MUI icons - 2 (#17732)
BrunoQuaresma May 9, 2025
aa4b764
chore: replace MUI icons - 3 (#17733)
BrunoQuaresma May 9, 2025
4970fb9
chore: replace MUI icons - 4 (#17748)
BrunoQuaresma May 9, 2025
1adad41
feat: display user apps in the workspaces table (#17744)
BrunoQuaresma May 9, 2025
842bb1f
chore: replace MUI icons - 6 (#17751)
BrunoQuaresma May 9, 2025
bd65914
docs: add note about experiment_report_tasks to ai-coder/create-templ…
EdwardAngert May 9, 2025
7af188b
fix(agent): fix unexpanded devcontainer paths for agentcontainers (#1…
mafredri May 12, 2025
87152db
ci: bump the github-actions group across 1 directory with 4 updates (…
dependabot[bot] May 12, 2025
4f1df34
chore: bump github.com/mark3labs/mcp-go from 0.25.0 to 0.27.0 (#17762)
dependabot[bot] May 12, 2025
0832afb
chore: bump gopkg.in/DataDog/dd-trace-go.v1 from 1.72.1 to 1.73.0 (#1…
dependabot[bot] May 12, 2025
345a239
chore: bump github.com/open-policy-agent/opa from 1.3.0 to 1.4.2 (#17…
dependabot[bot] May 12, 2025
799a0ba
chore: bump github.com/valyala/fasthttp from 1.61.0 to 1.62.0 (#17766)
dependabot[bot] May 12, 2025
af2941b
feat: add `is_prebuild_claim` to distinguish post-claim provisioning …
dannykopping May 12, 2025
3783241
chore: resolve internal drpc package conflict (#17770)
Emyrk May 12, 2025
ea2cae0
chore: tune postgres CI tests (#17756)
hugodutka May 12, 2025
e0dd50d
chore(cli): fix test flake in TestExpMcpServer (#17772)
johnstcn May 12, 2025
15bd7a3
chore: replace MUI icons with Lucide icons - 5 (#17750)
BrunoQuaresma May 12, 2025
578b9ff
fix: enrich the `notLoggedInMessage` error message with the full path…
cstyan May 12, 2025
10b44a5
fix: use monochrome zed icon (#17774)
aslilac May 12, 2025
d0ab91c
fix: reduce size of terraform modules archive (#17749)
aslilac May 12, 2025
398b999
chore: pass previous values into terraform apply (#17696)
Emyrk May 12, 2025
0b5f27f
feat: add `parent_id` column to `workspace_agents` table (#17758)
DanielleMaywood May 12, 2025
7f056da
feat: add hidden `CODER_AGENT_IS_SUB_AGENT` flag to `coder agent` (#1…
DanielleMaywood May 13, 2025
599bb35
fix(coderd): list templates returns non-deprecated templates by defau…
ssncferreira May 13, 2025
b0788f4
chore: rename "Test Notification" to "Troubleshooting Notification" (…
DanielleMaywood May 13, 2025
02425ee
chore: replace MUI icons with Lucide icons - 7 (#17776)
BrunoQuaresma May 13, 2025
eb9a651
chore: replace MUI icons with Lucide icons - 8 (#17778)
BrunoQuaresma May 13, 2025
86da21c
chore: replace MUI icons with Lucide icons - 10 (#17797)
BrunoQuaresma May 13, 2025
8f64d49
chore: update alpine 3.21.2 => 3.21.3 (#17773)
angrycub May 13, 2025
a1c03b6
feat: add experimental Chat UI (#17650)
johnstcn May 13, 2025
64807e1
chore: apply the 4mb max limit on drpc protocol message size (#17771)
Emyrk May 13, 2025
709445e
chore: replace MUI icons with Lucide icons - 9 (#17796)
BrunoQuaresma May 13, 2025
b2a1de9
feat: fetch prebuilds metrics state in background (#17792)
dannykopping May 13, 2025
ef745c0
chore: optimize workspace_latest_builds view query (#17789)
deansheather May 13, 2025
170f41a
chore: fix release calendar and script (#17745)
matifali May 13, 2025
f9817af
docs: add section on how to retrieve user list (#17798)
EdwardAngert May 13, 2025
60762d4
feat: load terraform modules when using dynamic parameters (#17714)
aslilac May 13, 2025
67e4024
feat: add extra workspace actions in the workspaces table (#17775)
BrunoQuaresma May 13, 2025
c718392
fix: don't open a window for external apps (#17813)
BrunoQuaresma May 14, 2025
f87dbe7
chore: replace MUI icons with Lucide icons - 11 (#17814)
BrunoQuaresma May 14, 2025
80e1be0
fix: replace wrong emoji reference (#17810)
BrunoQuaresma May 14, 2025
fcbdd1a
refactor: replace badge by status indicator (#17811)
BrunoQuaresma May 14, 2025
425ee6f
feat: reinitialize agents when a prebuilt workspace is claimed (#17475)
SasSwart May 14, 2025
c7bc404
chore: replace MUI LoadingButton with Button + Spinner - 1 (#17816)
BrunoQuaresma May 14, 2025
e75d1c1
chore: replace MUI LoadingButton with Button + Spinner - 2 (#17817)
BrunoQuaresma May 14, 2025
6e96778
feat: track resource replacements when claiming a prebuilt workspace …
dannykopping May 14, 2025
df56a13
chore: replace MUI icons with Lucide icons - 12 (#17815)
BrunoQuaresma May 14, 2025
74934e1
docs: add file sync to coder desktop docs (#17463)
EdwardAngert May 14, 2025
4d00b76
chore: bump github.com/justinas/nosurf from 1.1.1 to 1.2.0 (#17829)
dependabot[bot] May 14, 2025
f3bcac2
refactor: improve overlayFS errors (#17808)
aslilac May 14, 2025
789c4be
chore: add dynamic parameter error if missing metadata from provision…
Emyrk May 14, 2025
9093dbc
feat: hide hidden and non-healthy apps in the workspaces table (#17830)
brettkolodny May 14, 2025
73251cf
chore: add documentation to the coder ssh command regarding feature p…
brettkolodny May 14, 2025
35a04c7
refactor: use the new Table component for the Templates table (#17838)
BrunoQuaresma May 14, 2025
b6d72c8
chore: replace MUI LoadingButton - 4 (#17834)
BrunoQuaresma May 15, 2025
eb6412a
refactor(agent/agentcontainers): update routes and locking in contain…
mafredri May 15, 2025
522c178
fix(agent/agentcontainers): always use /bin/sh for devcontainer autos…
mafredri May 15, 2025
f2edcf3
fix: add missing clause for tracking replacements (#17849)
dannykopping May 15, 2025
2aa8cbe
fix: exclude deleted templates from metrics collection (#17839)
evgeniy-scherbina May 15, 2025
6e1ba75
chore: retry failed race tests in CI (#17846)
hugodutka May 15, 2025
3de0003
feat(agent): send devcontainer CLI logs during recreate (#17845)
mafredri May 15, 2025
c42a315
docs: add dev containers to manifest.json (#17854)
EdwardAngert May 15, 2025
ee2aeb4
fix: avoid pulling containers when it is not enabled (#17855)
BrunoQuaresma May 15, 2025
1bacd82
feat: add API key scope to restrict access to user data (#17692)
ThomasK33 May 15, 2025
ba6690f
fix: show no provisioners warning (#17835)
BrunoQuaresma May 15, 2025
6ff6e95
chore: replace MUI icons with Lucide icons - 13 (#17831)
BrunoQuaresma May 15, 2025
257500c
chore: replace MUI icons with Lucide icons - 14 (#17832)
BrunoQuaresma May 15, 2025
9beaca8
chore: replace MUI LoadingButton - 3 (#17833)
BrunoQuaresma May 15, 2025
bb6b96f
feat: add elixir icon (#17848)
TomBeckett May 15, 2025
bbceebd
chore: remove @mui/lab (#17857)
BrunoQuaresma May 15, 2025
2c49fd9
feat: add copy button for workspace name in breadcrumb (#17822)
matifali May 15, 2025
952c254
fix: fix duplicated agent logs (#17806)
BrunoQuaresma May 15, 2025
3011eca
chore: replace MUI icons with Lucide icons - 16 (#17862)
BrunoQuaresma May 15, 2025
9063b67
chore: improve style of dynamic parameters diagnostics (#17863)
jaaydenh May 15, 2025
c2bc801
chore: add 'classic_parameter_flow' column setting to templates (#17828)
Emyrk May 15, 2025
ea63d27
chore: migrate spinner components (#17866)
BrunoQuaresma May 16, 2025
4ac4137
chore: replace MUI icons with Lucide icons - 15 (#17861)
BrunoQuaresma May 16, 2025
90e93a2
chore: fix agent tests on Windows 11 (#17631)
spikecurtis May 16, 2025
c7917ea
chore: expose original length when serving slim binaries (#17735)
deansheather May 16, 2025
cf98268
chore: push proto changes to `v1.6` (#17874)
dannykopping May 16, 2025
83df557
revert(agent): remove `CODER_AGENT_IS_SUB_AGENT` cli flag (#17875)
DanielleMaywood May 16, 2025
7f9ddd7
docs: remove link to closed Remote Desktop issue (#17881)
spikecurtis May 16, 2025
cb0f778
chore: update setup-ramdisk-action (#17883)
hugodutka May 16, 2025
2cd3f99
feat: add one shot commands to the coder ssh command (#17779)
brettkolodny May 16, 2025
fb0e3d6
chore: remove update release calendar job (#17884)
matifali May 16, 2025
f36fb67
chore: use static params when dynamic param metadata is missing (#17836)
Emyrk May 16, 2025
d564164
docs: update release calendar for 2.22 release (#17886)
matifali May 16, 2025
8914f7a
chore: improve prebuilds docs (#17850)
dannykopping May 16, 2025
f8f4dc6
feat: check for classic flow on the create workspace page (#17852)
jaaydenh May 16, 2025
87a1ebc
chore: replace MUI Button - 1 (#17865)
BrunoQuaresma May 16, 2025
d6cb9b4
feat: setup url autofill for dynamic parameters (#17739)
jaaydenh May 16, 2025
ac8591e
fix: add null check (#17896)
jaaydenh May 16, 2025
ca5a78a
chore: update preview to remove AsString panic on unknown fields (#17…
Emyrk May 17, 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
  •  
  •  
  •  
31 changes: 29 additions & 2 deletions .github/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,44 @@ inputs:
version:
description: "The Go version to use."
default: "1.24.2"
use-preinstalled-go:
description: "Whether to use preinstalled Go."
default: "false"
use-temp-cache-dirs:
description: "Whether to use temporary GOCACHE and GOMODCACHE directories."
default: "false"
runs:
using: "composite"
steps:
- name: Override GOCACHE and GOMODCACHE
shell: bash
if: inputs.use-temp-cache-dirs == 'true'
run: |
# cd to another directory to ensure we're not inside a Go project.
# That'd trigger Go to download the toolchain for that project.
cd "$RUNNER_TEMP"
# RUNNER_TEMP should be backed by a RAM disk on Windows if
# coder/setup-ramdisk-action was used
export GOCACHE_DIR="$RUNNER_TEMP""\go-cache"
export GOMODCACHE_DIR="$RUNNER_TEMP""\go-mod-cache"
export GOPATH_DIR="$RUNNER_TEMP""\go-path"
export GOTMP_DIR="$RUNNER_TEMP""\go-tmp"
mkdir -p "$GOCACHE_DIR"
mkdir -p "$GOMODCACHE_DIR"
mkdir -p "$GOPATH_DIR"
mkdir -p "$GOTMP_DIR"
go env -w GOCACHE="$GOCACHE_DIR"
go env -w GOMODCACHE="$GOMODCACHE_DIR"
go env -w GOPATH="$GOPATH_DIR"
go env -w GOTMPDIR="$GOTMP_DIR"
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ inputs.version }}
go-version: ${{ inputs.use-preinstalled-go == 'false' && inputs.version || '' }}

- name: Install gotestsum
shell: bash
run: go install gotest.tools/gotestsum@latest
run: go install gotest.tools/gotestsum@0d9599e513d70e5792bb9334869f82f6e8b53d4d # main as of 2025-05-15

# It isn't necessary that we ever do this, but it helps
# separate the "setup" from the "run" times.
Expand Down
50 changes: 50 additions & 0 deletions .github/actions/test-cache/download/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Download Test Cache"
description: |
Downloads the test 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
# This path is defined in testutil/cache.go
default: "~/.cache/coderv2-test"
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

# TODO: As a cost optimization, we could remove caches that are older than
# a day or two. By default, depot keeps caches for 14 days, which isn't
# necessary for the test cache.
# https://depot.dev/docs/github-actions/overview#cache-retention-policy
- name: Download test 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) || '' }}
20 changes: 20 additions & 0 deletions .github/actions/test-cache/upload/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Upload Test Cache"
description: Uploads the test cache. Only works on the main branch.
inputs:
cache-key:
description: "Cache key"
required: true
cache-path:
description: "Path to the cache directory"
required: true
# This path is defined in testutil/cache.go
default: "~/.cache/coderv2-test"
runs:
using: "composite"
steps:
- name: Upload test cache
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}
43 changes: 41 additions & 2 deletions .github/actions/upload-datadog/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ runs:
steps:
- shell: bash
run: |
set -e

owner=${{ github.repository_owner }}
echo "owner: $owner"
if [[ $owner != "coder" ]]; then
Expand All @@ -21,8 +23,45 @@ runs:
echo "No API key provided, skipping..."
exit 0
fi
npm install -g @datadog/datadog-ci@2.21.0
datadog-ci junit upload --service coder ./gotests.xml \

BINARY_VERSION="v2.48.0"
BINARY_HASH_WINDOWS="b7bebb8212403fddb1563bae84ce5e69a70dac11e35eb07a00c9ef7ac9ed65ea"
BINARY_HASH_MACOS="e87c808638fddb21a87a5c4584b68ba802965eb0a593d43959c81f67246bd9eb"
BINARY_HASH_LINUX="5e700c465728fff8313e77c2d5ba1ce19a736168735137e1ddc7c6346ed48208"

TMP_DIR=$(mktemp -d)

if [[ "${{ runner.os }}" == "Windows" ]]; then
BINARY_PATH="${TMP_DIR}/datadog-ci.exe"
BINARY_URL="https://github.com/DataDog/datadog-ci/releases/download/${BINARY_VERSION}/datadog-ci_win-x64"
elif [[ "${{ runner.os }}" == "macOS" ]]; then
BINARY_PATH="${TMP_DIR}/datadog-ci"
BINARY_URL="https://github.com/DataDog/datadog-ci/releases/download/${BINARY_VERSION}/datadog-ci_darwin-arm64"
elif [[ "${{ runner.os }}" == "Linux" ]]; then
BINARY_PATH="${TMP_DIR}/datadog-ci"
BINARY_URL="https://github.com/DataDog/datadog-ci/releases/download/${BINARY_VERSION}/datadog-ci_linux-x64"
else
echo "Unsupported OS: ${{ runner.os }}"
exit 1
fi

echo "Downloading DataDog CI binary version ${BINARY_VERSION} for ${{ runner.os }}..."
curl -sSL "$BINARY_URL" -o "$BINARY_PATH"

if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "$BINARY_HASH_WINDOWS $BINARY_PATH" | sha256sum --check
elif [[ "${{ runner.os }}" == "macOS" ]]; then
echo "$BINARY_HASH_MACOS $BINARY_PATH" | shasum -a 256 --check
elif [[ "${{ runner.os }}" == "Linux" ]]; then
echo "$BINARY_HASH_LINUX $BINARY_PATH" | sha256sum --check
fi

# Make binary executable (not needed for Windows)
if [[ "${{ runner.os }}" != "Windows" ]]; then
chmod +x "$BINARY_PATH"
fi

"$BINARY_PATH" junit upload --service coder ./gotests.xml \
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
env:
DATADOG_API_KEY: ${{ inputs.api-key }}
Loading
Loading