Skip to content

[pull] main from coder:main #205

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 87 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
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
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .github/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,23 @@ runs:
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.use-preinstalled-go == 'false' && inputs.version || '' }}

- name: Install gotestsum
shell: bash
run: go install gotest.tools/gotestsum@3f7ff0ec4aeb6f95f5d67c998b71f272aa8a8b41 # v1.12.1
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jobs:

# Check for any typos
- name: Check for typos
uses: crate-ci/typos@b1a1ef3893ff35ade0cfa71523852a49bfd05d19 # v1.31.1
uses: crate-ci/typos@0f0ccba9ed1df83948f0c15026e4f5ccfce46109 # v1.32.0
with:
config: .github/workflows/typos.toml

Expand Down Expand Up @@ -336,7 +336,7 @@ jobs:
# a separate repository to allow its use before actions/checkout.
- name: Setup RAM Disks
if: runner.os == 'Windows'
uses: coder/setup-ramdisk-action@79dacfe70c47ad6d6c0dd7f45412368802641439
uses: coder/setup-ramdisk-action@81c5c441bda00c6c3d6bcee2e5a33ed4aadbbcc1

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -454,7 +454,7 @@ jobs:
api-key: ${{ secrets.DATADOG_API_KEY }}

test-go-pg:
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os }}
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || matrix.os }}
needs: changes
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
# This timeout must be greater than the timeout set by `go test` in
Expand Down Expand Up @@ -613,7 +613,7 @@ jobs:
# c.f. discussion on https://github.com/coder/coder/pull/15106
- name: Run Tests
run: |
gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
gotestsum --junitfile="gotests.xml" --packages="./..." --rerun-fails=2 --rerun-fails-abort-on-data-race -- -race -parallel 4 -p 4

- name: Upload Test Cache
uses: ./.github/actions/test-cache/upload
Expand Down Expand Up @@ -665,7 +665,7 @@ jobs:
POSTGRES_VERSION: "16"
run: |
make test-postgres-docker
DB=ci gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
DB=ci gotestsum --junitfile="gotests.xml" --packages="./..." --rerun-fails=2 --rerun-fails-abort-on-data-race -- -race -parallel 4 -p 4

- name: Upload Test Cache
uses: ./.github/actions/test-cache/upload
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Node
uses: ./.github/actions/setup-node

- uses: tj-actions/changed-files@5426ecc3f5c2b10effaefbd374f0abdc6a571b2f # v45.0.7
- uses: tj-actions/changed-files@480f49412651059a414a6a5c96887abb1877de8a # v45.0.7
id: changed-files
with:
files: |
Expand Down
75 changes: 58 additions & 17 deletions .github/workflows/nightly-gauntlet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ permissions:

jobs:
test-go-pg:
runs-on: ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
if: github.ref == 'refs/heads/main'
# make sure to adjust NUM_PARALLEL_PACKAGES and NUM_PARALLEL_TESTS below
# when changing runner sizes
runs-on: ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'depot-windows-2022-16' || matrix.os }}
# This timeout must be greater than the timeout set by `go test` in
# `make test-postgres` to ensure we receive a trace of running
# goroutines. Setting this to the timeout +5m should work quite well
Expand All @@ -31,22 +32,39 @@ jobs:
with:
egress-policy: audit

# macOS indexes all new files in the background. Our Postgres tests
# create and destroy thousands of databases on disk, and Spotlight
# tries to index all of them, seriously slowing down the tests.
- name: Disable Spotlight Indexing
if: runner.os == 'macOS'
run: |
sudo mdutil -a -i off
sudo mdutil -X /
sudo launchctl bootout system /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

# Set up RAM disks to speed up the rest of the job. This action is in
# a separate repository to allow its use before actions/checkout.
- name: Setup RAM Disks
if: runner.os == 'Windows'
uses: coder/setup-ramdisk-action@79dacfe70c47ad6d6c0dd7f45412368802641439

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1

- name: Setup Go
uses: ./.github/actions/setup-go
with:
# Runners have Go baked-in and Go will automatically
# download the toolchain configured in go.mod, so we don't
# need to reinstall it. It's faster on Windows runners.
use-preinstalled-go: ${{ runner.os == 'Windows' }}
use-temp-cache-dirs: ${{ runner.os == 'Windows' }}

- name: Setup Terraform
uses: ./.github/actions/setup-tf

# Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
- name: Setup ImDisk
if: runner.os == 'Windows'
uses: ./.github/actions/setup-imdisk

- name: Test with PostgreSQL Database
env:
POSTGRES_VERSION: "13"
Expand All @@ -55,6 +73,19 @@ jobs:
LC_ALL: "en_US.UTF-8"
shell: bash
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
# Create a temp dir on the R: ramdisk drive for Windows. The default
# C: drive is extremely slow: https://github.com/actions/runner-images/issues/8755
mkdir -p "R:/temp/embedded-pg"
go run scripts/embedded-pg/main.go -path "R:/temp/embedded-pg"
fi
if [ "${{ runner.os }}" == "macOS" ]; then
# Postgres runs faster on a ramdisk on macOS too
mkdir -p /tmp/tmpfs
sudo mount_tmpfs -o noowners -s 8g /tmp/tmpfs
go run scripts/embedded-pg/main.go -path /tmp/tmpfs/embedded-pg
fi

# if macOS, install google-chrome for scaletests
# As another concern, should we really have this kind of external dependency
# requirement on standard CI?
Expand All @@ -72,19 +103,29 @@ jobs:
touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile
fi

# Golang's default for these 2 variables is the number of logical CPUs.
# Our Windows and Linux runners have 16 cores, so they match up there.
NUM_PARALLEL_PACKAGES=16
NUM_PARALLEL_TESTS=16
if [ "${{ runner.os }}" == "Windows" ]; then
# Create a temp dir on the R: ramdisk drive for Windows. The default
# C: drive is extremely slow: https://github.com/actions/runner-images/issues/8755
mkdir -p "R:/temp/embedded-pg"
go run scripts/embedded-pg/main.go -path "R:/temp/embedded-pg"
else
go run scripts/embedded-pg/main.go
# On Windows Postgres chokes up when we have 16x16=256 tests
# running in parallel, and dbtestutil.NewDB starts to take more than
# 10s to complete sometimes causing test timeouts. With 16x8=128 tests
# Postgres tends not to choke.
NUM_PARALLEL_PACKAGES=8
fi
if [ "${{ runner.os }}" == "macOS" ]; then
# Our macOS runners have 8 cores. We leave NUM_PARALLEL_TESTS at 16
# because the tests complete faster and Postgres doesn't choke. It seems
# that macOS's tmpfs is faster than the one on Windows.
NUM_PARALLEL_PACKAGES=8
fi

# Reduce test parallelism, mirroring what we do for race tests.
# We'd been encountering issues with timing related flakes, and
# this seems to help.
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 -parallel 4 -p 4 ./...
# We rerun failing tests to counteract flakiness coming from Postgres
# choking on macOS and Windows sometimes.
DB=ci gotestsum --rerun-fails=2 --rerun-fails-max-failures=1000 \
--format standard-quiet --packages "./..." \
-- -v -p $NUM_PARALLEL_PACKAGES -parallel=$NUM_PARALLEL_TESTS -count=1

- name: Upload test stats to Datadog
timeout-minutes: 1
Expand Down
52 changes: 0 additions & 52 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -924,55 +924,3 @@ jobs:
continue-on-error: true
run: |
make sqlc-push

update-calendar:
name: "Update release calendar in docs"
runs-on: "ubuntu-latest"
needs: [release, publish-homebrew, publish-winget, publish-sqlc]
if: ${{ !inputs.dry_run }}
permissions:
contents: write
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # Needed to get all tags for version calculation

- name: Set up Git
run: |
git config user.name "Coder CI"
git config user.email "cdrci@coder.com"

- name: Run update script
run: |
./scripts/update-release-calendar.sh
make fmt/markdown

- name: Check for changes
id: check_changes
run: |
if git diff --quiet docs/install/releases/index.md; then
echo "No changes detected in release calendar."
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "Changes detected in release calendar."
echo "changes=true" >> $GITHUB_OUTPUT
fi

- name: Create Pull Request
if: steps.check_changes.outputs.changes == 'true'
uses: peter-evans/create-pull-request@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
with:
commit-message: "docs: update release calendar"
title: "docs: update release calendar"
body: |
This PR automatically updates the release calendar in the docs.
branch: bot/update-release-calendar
delete-branch: true
labels: docs
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
with:
sarif_file: results.sarif
6 changes: 3 additions & 3 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: ./.github/actions/setup-go

- name: Initialize CodeQL
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
with:
languages: go, javascript

Expand All @@ -48,7 +48,7 @@ jobs:
rm Makefile

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17

- name: Send Slack notification on failure
if: ${{ failure() }}
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
severity: "CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
with:
sarif_file: trivy-results.sarif
category: "Trivy"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ site/stats/
*.tfplan
*.lock.hcl
.terraform/
!coderd/testdata/parameters/modules/.terraform/
!provisioner/terraform/testdata/modules-source-caching/.terraform/

**/.coderv2/*
**/__debug_bin
Expand Down
12 changes: 10 additions & 2 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,11 @@ func (a *agent) runLoop() {
if ctx.Err() != nil {
// Context canceled errors may come from websocket pings, so we
// don't want to use `errors.Is(err, context.Canceled)` here.
a.logger.Warn(ctx, "runLoop exited with error", slog.Error(ctx.Err()))
return
}
if a.isClosed() {
a.logger.Warn(ctx, "runLoop exited because agent is closed")
return
}
if errors.Is(err, io.EOF) {
Expand Down Expand Up @@ -1046,7 +1048,11 @@ func (a *agent) run() (retErr error) {
return a.statsReporter.reportLoop(ctx, aAPI)
})

return connMan.wait()
err = connMan.wait()
if err != nil {
a.logger.Info(context.Background(), "connection manager errored", slog.Error(err))
}
return err
}

// handleManifest returns a function that fetches and processes the manifest
Expand Down Expand Up @@ -1085,6 +1091,8 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
if err != nil {
return xerrors.Errorf("expand directory: %w", err)
}
// Normalize all devcontainer paths by making them absolute.
manifest.Devcontainers = agentcontainers.ExpandAllDevcontainerPaths(a.logger, expandPathToAbs, manifest.Devcontainers)
subsys, err := agentsdk.ProtoFromSubsystems(a.subsystems)
if err != nil {
a.logger.Critical(ctx, "failed to convert subsystems", slog.Error(err))
Expand Down Expand Up @@ -1127,7 +1135,7 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
)
if a.experimentalDevcontainersEnabled {
var dcScripts []codersdk.WorkspaceAgentScript
scripts, dcScripts = agentcontainers.ExtractAndInitializeDevcontainerScripts(a.logger, expandPathToAbs, manifest.Devcontainers, scripts)
scripts, dcScripts = agentcontainers.ExtractAndInitializeDevcontainerScripts(manifest.Devcontainers, scripts)
// See ExtractAndInitializeDevcontainerScripts for motivation
// behind running dcScripts as post start scripts.
scriptRunnerOpts = append(scriptRunnerOpts, agentscripts.WithPostStartScripts(dcScripts...))
Expand Down
Loading
Loading