Skip to content

Commit 2d8b95a

Browse files
authored
Merge branch 'main' into jaaydenh/dynamic-params-workspace-settings
2 parents cdfd164 + fe733af commit 2d8b95a

File tree

289 files changed

+9522
-3816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+9522
-3816
lines changed

.github/actions/setup-go/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ runs:
4242

4343
- name: Install gotestsum
4444
shell: bash
45-
run: go install gotest.tools/gotestsum@3f7ff0ec4aeb6f95f5d67c998b71f272aa8a8b41 # v1.12.1
45+
run: go install gotest.tools/gotestsum@0d9599e513d70e5792bb9334869f82f6e8b53d4d # main as of 2025-05-15
4646

4747
# It isn't necessary that we ever do this, but it helps
4848
# separate the "setup" from the "run" times.

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ jobs:
336336
# a separate repository to allow its use before actions/checkout.
337337
- name: Setup RAM Disks
338338
if: runner.os == 'Windows'
339-
uses: coder/setup-ramdisk-action@79dacfe70c47ad6d6c0dd7f45412368802641439
339+
uses: coder/setup-ramdisk-action@81c5c441bda00c6c3d6bcee2e5a33ed4aadbbcc1
340340

341341
- name: Checkout
342342
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -613,7 +613,7 @@ jobs:
613613
# c.f. discussion on https://github.com/coder/coder/pull/15106
614614
- name: Run Tests
615615
run: |
616-
gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
616+
gotestsum --junitfile="gotests.xml" --packages="./..." --rerun-fails=2 --rerun-fails-abort-on-data-race -- -race -parallel 4 -p 4
617617
618618
- name: Upload Test Cache
619619
uses: ./.github/actions/test-cache/upload
@@ -665,7 +665,7 @@ jobs:
665665
POSTGRES_VERSION: "16"
666666
run: |
667667
make test-postgres-docker
668-
DB=ci gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
668+
DB=ci gotestsum --junitfile="gotests.xml" --packages="./..." --rerun-fails=2 --rerun-fails-abort-on-data-race -- -race -parallel 4 -p 4
669669
670670
- name: Upload Test Cache
671671
uses: ./.github/actions/test-cache/upload

.github/workflows/release.yaml

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -924,55 +924,3 @@ jobs:
924924
continue-on-error: true
925925
run: |
926926
make sqlc-push
927-
928-
update-calendar:
929-
name: "Update release calendar in docs"
930-
runs-on: "ubuntu-latest"
931-
needs: [release, publish-homebrew, publish-winget, publish-sqlc]
932-
if: ${{ !inputs.dry_run }}
933-
permissions:
934-
contents: write
935-
pull-requests: write
936-
steps:
937-
- name: Harden Runner
938-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
939-
with:
940-
egress-policy: audit
941-
942-
- name: Checkout repository
943-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
944-
with:
945-
fetch-depth: 0 # Needed to get all tags for version calculation
946-
947-
- name: Set up Git
948-
run: |
949-
git config user.name "Coder CI"
950-
git config user.email "cdrci@coder.com"
951-
952-
- name: Run update script
953-
run: |
954-
./scripts/update-release-calendar.sh
955-
make fmt/markdown
956-
957-
- name: Check for changes
958-
id: check_changes
959-
run: |
960-
if git diff --quiet docs/install/releases/index.md; then
961-
echo "No changes detected in release calendar."
962-
echo "changes=false" >> $GITHUB_OUTPUT
963-
else
964-
echo "Changes detected in release calendar."
965-
echo "changes=true" >> $GITHUB_OUTPUT
966-
fi
967-
968-
- name: Create Pull Request
969-
if: steps.check_changes.outputs.changes == 'true'
970-
uses: peter-evans/create-pull-request@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
971-
with:
972-
commit-message: "docs: update release calendar"
973-
title: "docs: update release calendar"
974-
body: |
975-
This PR automatically updates the release calendar in the docs.
976-
branch: bot/update-release-calendar
977-
delete-branch: true
978-
labels: docs

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ jobs:
4747

4848
# Upload the results to GitHub's code scanning dashboard.
4949
- name: "Upload to code-scanning"
50-
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
50+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
5151
with:
5252
sarif_file: results.sarif

.github/workflows/security.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: ./.github/actions/setup-go
3939

4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
41+
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
4242
with:
4343
languages: go, javascript
4444

@@ -48,7 +48,7 @@ jobs:
4848
rm Makefile
4949
5050
- name: Perform CodeQL Analysis
51-
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
51+
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
5252

5353
- name: Send Slack notification on failure
5454
if: ${{ failure() }}
@@ -150,7 +150,7 @@ jobs:
150150
severity: "CRITICAL,HIGH"
151151

152152
- name: Upload Trivy scan results to GitHub Security tab
153-
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
153+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
154154
with:
155155
sarif_file: trivy-results.sarif
156156
category: "Trivy"

agent/agent.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,14 @@ type Options struct {
8989
ServiceBannerRefreshInterval time.Duration
9090
BlockFileTransfer bool
9191
Execer agentexec.Execer
92-
SubAgent bool
9392

9493
ExperimentalDevcontainersEnabled bool
9594
ContainerAPIOptions []agentcontainers.Option // Enable ExperimentalDevcontainersEnabled for these to be effective.
9695
}
9796

9897
type Client interface {
99-
ConnectRPC24(ctx context.Context) (
100-
proto.DRPCAgentClient24, tailnetproto.DRPCTailnetClient24, error,
98+
ConnectRPC25(ctx context.Context) (
99+
proto.DRPCAgentClient25, tailnetproto.DRPCTailnetClient25, error,
101100
)
102101
RewriteDERPMap(derpMap *tailcfg.DERPMap)
103102
}
@@ -191,8 +190,6 @@ func New(options Options) Agent {
191190
metrics: newAgentMetrics(prometheusRegistry),
192191
execer: options.Execer,
193192

194-
subAgent: options.SubAgent,
195-
196193
experimentalDevcontainersEnabled: options.ExperimentalDevcontainersEnabled,
197194
containerAPIOptions: options.ContainerAPIOptions,
198195
}
@@ -275,8 +272,6 @@ type agent struct {
275272
metrics *agentMetrics
276273
execer agentexec.Execer
277274

278-
subAgent bool
279-
280275
experimentalDevcontainersEnabled bool
281276
containerAPIOptions []agentcontainers.Option
282277
containerAPI atomic.Pointer[agentcontainers.API] // Set by apiHandler.
@@ -368,9 +363,11 @@ func (a *agent) runLoop() {
368363
if ctx.Err() != nil {
369364
// Context canceled errors may come from websocket pings, so we
370365
// don't want to use `errors.Is(err, context.Canceled)` here.
366+
a.logger.Warn(ctx, "runLoop exited with error", slog.Error(ctx.Err()))
371367
return
372368
}
373369
if a.isClosed() {
370+
a.logger.Warn(ctx, "runLoop exited because agent is closed")
374371
return
375372
}
376373
if errors.Is(err, io.EOF) {
@@ -911,7 +908,7 @@ func (a *agent) run() (retErr error) {
911908
a.sessionToken.Store(&sessionToken)
912909

913910
// ConnectRPC returns the dRPC connection we use for the Agent and Tailnet v2+ APIs
914-
aAPI, tAPI, err := a.client.ConnectRPC24(a.hardCtx)
911+
aAPI, tAPI, err := a.client.ConnectRPC25(a.hardCtx)
915912
if err != nil {
916913
return err
917914
}
@@ -1051,7 +1048,11 @@ func (a *agent) run() (retErr error) {
10511048
return a.statsReporter.reportLoop(ctx, aAPI)
10521049
})
10531050

1054-
return connMan.wait()
1051+
err = connMan.wait()
1052+
if err != nil {
1053+
a.logger.Info(context.Background(), "connection manager errored", slog.Error(err))
1054+
}
1055+
return err
10551056
}
10561057

10571058
// handleManifest returns a function that fetches and processes the manifest

0 commit comments

Comments
 (0)