Skip to content

Commit 74073cf

Browse files
committed
Merge remote-tracking branch 'origin/main' into stevenmasley/4mb
2 parents bb3d4ef + ae3882a commit 74073cf

File tree

22 files changed

+168
-108
lines changed

22 files changed

+168
-108
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ jobs:
582582
# NOTE: this could instead be defined as a matrix strategy, but we want to
583583
# only block merging if tests on postgres 13 fail. Using a matrix strategy
584584
# here makes the check in the above `required` job rather complicated.
585-
test-go-pg-16:
585+
test-go-pg-17:
586586
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
587587
needs:
588588
- changes
@@ -613,11 +613,11 @@ jobs:
613613
id: download-cache
614614
uses: ./.github/actions/test-cache/download
615615
with:
616-
key-prefix: test-go-pg-16-${{ runner.os }}-${{ runner.arch }}
616+
key-prefix: test-go-pg-17-${{ runner.os }}-${{ runner.arch }}
617617

618618
- name: Test with PostgreSQL Database
619619
env:
620-
POSTGRES_VERSION: "16"
620+
POSTGRES_VERSION: "17"
621621
TS_DEBUG_DISCO: "true"
622622
TEST_RETRIES: 2
623623
run: |
@@ -719,7 +719,7 @@ jobs:
719719
# c.f. discussion on https://github.com/coder/coder/pull/15106
720720
- name: Run Tests
721721
env:
722-
POSTGRES_VERSION: "16"
722+
POSTGRES_VERSION: "17"
723723
run: |
724724
make test-postgres-docker
725725
DB=ci gotestsum --junitfile="gotests.xml" --packages="./..." --rerun-fails=2 --rerun-fails-abort-on-data-race -- -race -parallel 4 -p 4

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ GOOS := $(shell go env GOOS)
3636
GOARCH := $(shell go env GOARCH)
3737
GOOS_BIN_EXT := $(if $(filter windows, $(GOOS)),.exe,)
3838
VERSION := $(shell ./scripts/version.sh)
39-
POSTGRES_VERSION ?= 16
39+
40+
POSTGRES_VERSION ?= 17
41+
POSTGRES_IMAGE ?= us-docker.pkg.dev/coder-v2-images-public/public/postgres:$(POSTGRES_VERSION)
4042

4143
# Use the highest ZSTD compression level in CI.
4244
ifdef CI
@@ -949,12 +951,12 @@ test-postgres-docker:
949951
docker rm -f test-postgres-docker-${POSTGRES_VERSION} || true
950952

951953
# Try pulling up to three times to avoid CI flakes.
952-
docker pull gcr.io/coder-dev-1/postgres:${POSTGRES_VERSION} || {
954+
docker pull ${POSTGRES_IMAGE} || {
953955
retries=2
954956
for try in $(seq 1 ${retries}); do
955957
echo "Failed to pull image, retrying (${try}/${retries})..."
956958
sleep 1
957-
if docker pull gcr.io/coder-dev-1/postgres:${POSTGRES_VERSION}; then
959+
if docker pull ${POSTGRES_IMAGE}; then
958960
break
959961
fi
960962
done
@@ -982,7 +984,7 @@ test-postgres-docker:
982984
--restart no \
983985
--detach \
984986
--memory 16GB \
985-
gcr.io/coder-dev-1/postgres:${POSTGRES_VERSION} \
987+
${POSTGRES_IMAGE} \
986988
-c shared_buffers=2GB \
987989
-c effective_cache_size=1GB \
988990
-c work_mem=8MB \

coderd/agentapi/audit_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func TestAuditReport(t *testing.T) {
135135
},
136136
})
137137

138-
mAudit.Contains(t, database.AuditLog{
138+
require.True(t, mAudit.Contains(t, database.AuditLog{
139139
Time: dbtime.Time(tt.time).In(time.UTC),
140140
Action: agentProtoConnectionActionToAudit(t, *tt.action),
141141
OrganizationID: workspace.OrganizationID,
@@ -146,7 +146,7 @@ func TestAuditReport(t *testing.T) {
146146
ResourceTarget: agent.Name,
147147
Ip: pqtype.Inet{Valid: true, IPNet: net.IPNet{IP: net.ParseIP(tt.ip), Mask: net.CIDRMask(32, 32)}},
148148
StatusCode: tt.status,
149-
})
149+
}))
150150

151151
// Check some additional fields.
152152
var m map[string]any

coderd/database/db2sdk/db2sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ func WorkspaceAgent(derpMap *tailcfg.DERPMap, coordinator tailnet.Coordinator,
378378

379379
workspaceAgent := codersdk.WorkspaceAgent{
380380
ID: dbAgent.ID,
381+
ParentID: dbAgent.ParentID,
381382
CreatedAt: dbAgent.CreatedAt,
382383
UpdatedAt: dbAgent.UpdatedAt,
383384
ResourceID: dbAgent.ResourceID,

coderd/database/dbtestutil/db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ func PGDumpSchemaOnly(dbURL string) ([]byte, error) {
298298
"run",
299299
"--rm",
300300
"--network=host",
301-
fmt.Sprintf("gcr.io/coder-dev-1/postgres:%d", minimumPostgreSQLVersion),
301+
fmt.Sprintf("%s:%d", postgresImage, minimumPostgreSQLVersion),
302302
}, cmdArgs...)
303303
}
304304
cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...) //#nosec

coderd/database/dbtestutil/postgres.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import (
2626
"github.com/coder/retry"
2727
)
2828

29+
const postgresImage = "us-docker.pkg.dev/coder-v2-images-public/public/postgres"
30+
2931
type ConnectionParams struct {
3032
Username string
3133
Password string
@@ -379,8 +381,8 @@ func openContainer(t TBSubset, opts DBContainerOptions) (container, func(), erro
379381
return container{}, nil, xerrors.Errorf("create tempdir: %w", err)
380382
}
381383
runOptions := dockertest.RunOptions{
382-
Repository: "gcr.io/coder-dev-1/postgres",
383-
Tag: "13",
384+
Repository: postgresImage,
385+
Tag: strconv.Itoa(minimumPostgreSQLVersion),
384386
Env: []string{
385387
"POSTGRES_PASSWORD=postgres",
386388
"POSTGRES_USER=postgres",

coderd/files/cache.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ type fetcher func(context.Context, uuid.UUID) (cacheEntryValue, error)
134134
// calls for the same fileID will only result in one fetch, and that parallel
135135
// calls for distinct fileIDs will fetch in parallel.
136136
//
137-
// Every call to Acquire must have a matching call to Release.
137+
// Safety: Every call to Acquire that does not return an error must have a
138+
// matching call to Release.
138139
func (c *Cache) Acquire(ctx context.Context, fileID uuid.UUID) (fs.FS, error) {
139140
// It's important that this `Load` call occurs outside of `prepare`, after the
140141
// mutex has been released, or we would continue to hold the lock until the

coderd/parameters_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ func TestDynamicParametersWithTerraformValues(t *testing.T) {
276276
EnableDynamicParameters: ptr.Ref(true),
277277
})
278278
require.NoError(t, err)
279-
coderdtest.AwaitWorkspaceBuildJobCompleted(t, setup.client, wrk.LatestBuild.ID)
279+
coderdtest.AwaitWorkspaceBuildJobCompleted(t, setup.client, bld.ID)
280280

281281
latestParams, err := setup.client.WorkspaceBuildParameters(ctx, bld.ID)
282282
require.NoError(t, err)

coderd/userauth_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,10 +1577,10 @@ func TestUserOIDC(t *testing.T) {
15771577
})
15781578
require.Equal(t, http.StatusOK, resp.StatusCode)
15791579

1580-
auditor.Contains(t, database.AuditLog{
1580+
require.True(t, auditor.Contains(t, database.AuditLog{
15811581
ResourceType: database.ResourceTypeUser,
15821582
AdditionalFields: json.RawMessage(`{"automatic_actor":"coder","automatic_subsystem":"dormancy"}`),
1583-
})
1583+
}))
15841584
me, err := client.User(ctx, "me")
15851585
require.NoError(t, err)
15861586

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ services:
3131
database:
3232
# Minimum supported version is 13.
3333
# More versions here: https://hub.docker.com/_/postgres
34-
image: "postgres:16"
34+
image: "postgres:17"
3535
ports:
3636
- "5432:5432"
3737
environment:

docs/tutorials/reverse-proxy-caddy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ certificates, you'll need a domain name that resolves to your Caddy server.
3939
condition: service_healthy
4040

4141
database:
42-
image: "postgres:16"
42+
image: "postgres:17"
4343
ports:
4444
- "5432:5432"
4545
environment:

dogfood/coder/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN apt-get update && \
8787
rm -rf /tmp/go/src
8888

8989
# alpine:3.18
90-
FROM gcr.io/coder-dev-1/alpine@sha256:25fad2a32ad1f6f510e528448ae1ec69a28ef81916a004d3629874104f8a7f70 AS proto
90+
FROM us-docker.pkg.dev/coder-v2-images-public/public/alpine@sha256:fd032399cd767f310a1d1274e81cab9f0fd8a49b3589eba2c3420228cd45b6a7 AS proto
9191
WORKDIR /tmp
9292
RUN apk add curl unzip
9393
RUN curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip && \

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ replace github.com/tcnksm/go-httpstat => github.com/coder/go-httpstat v0.0.0-202
3636

3737
// There are a few minor changes we make to Tailscale that we're slowly upstreaming. Compare here:
3838
// https://github.com/tailscale/tailscale/compare/main...coder:tailscale:main
39-
replace tailscale.com => github.com/coder/tailscale v1.1.1-0.20250422090654-5090e715905e
39+
replace tailscale.com => github.com/coder/tailscale v1.1.1-0.20250611020837-f14d20d23d8c
4040

4141
// This is replaced to include
4242
// 1. a fix for a data race: c.f. https://github.com/tailscale/wireguard-go/pull/25

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,8 +920,8 @@ github.com/coder/serpent v0.10.0 h1:ofVk9FJXSek+SmL3yVE3GoArP83M+1tX+H7S4t8BSuM=
920920
github.com/coder/serpent v0.10.0/go.mod h1:cZFW6/fP+kE9nd/oRkEHJpG6sXCtQ+AX7WMMEHv0Y3Q=
921921
github.com/coder/ssh v0.0.0-20231128192721-70855dedb788 h1:YoUSJ19E8AtuUFVYBpXuOD6a/zVP3rcxezNsoDseTUw=
922922
github.com/coder/ssh v0.0.0-20231128192721-70855dedb788/go.mod h1:aGQbuCLyhRLMzZF067xc84Lh7JDs1FKwCmF1Crl9dxQ=
923-
github.com/coder/tailscale v1.1.1-0.20250422090654-5090e715905e h1:nope/SZfoLB9MCOB9wdCE6gW5+8l3PhFrDC5IWPL8bk=
924-
github.com/coder/tailscale v1.1.1-0.20250422090654-5090e715905e/go.mod h1:1ggFFdHTRjPRu9Yc1yA7nVHBYB50w9Ce7VIXNqcW6Ko=
923+
github.com/coder/tailscale v1.1.1-0.20250611020837-f14d20d23d8c h1:d/qBIi3Ez7KkopRgNtfdvTMqvqBg47d36qVfkd3C5EQ=
924+
github.com/coder/tailscale v1.1.1-0.20250611020837-f14d20d23d8c/go.mod h1:l7ml5uu7lFh5hY28lGYM4b/oFSmuPHYX6uk4RAu23Lc=
925925
github.com/coder/terraform-config-inspect v0.0.0-20250107175719-6d06d90c630e h1:JNLPDi2P73laR1oAclY6jWzAbucf70ASAvf5mh2cME0=
926926
github.com/coder/terraform-config-inspect v0.0.0-20250107175719-6d06d90c630e/go.mod h1:Gz/z9Hbn+4KSp8A2FBtNszfLSdT2Tn/uAKGuVqqWmDI=
927927
github.com/coder/terraform-provider-coder/v2 v2.5.3 h1:EwqIIQKe/j8bsR4WyDJ3bD0dVdkfVqJ43TwClyGneUU=

scaletest/templates/scaletest-runner/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This image is used to run scaletest jobs and, although it is inside
22
# the template directory, it is built separately and pushed to
3-
# gcr.io/coder-dev-1/scaletest-runner:latest.
3+
# us-docker.pkg.dev/coder-v2-images-public/public/scaletest-runner:latest.
44
#
55
# Future improvements will include versioning and including the version
66
# in the template push.

scaletest/templates/scaletest-runner/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ resource "kubernetes_pod" "main" {
822822

823823
container {
824824
name = "dev"
825-
image = "gcr.io/coder-dev-1/scaletest-runner:latest"
825+
image = "us-docker.pkg.dev/coder-v2-images-public/public/scaletest-runner:latest"
826826
image_pull_policy = "Always"
827827
command = ["sh", "-c", coder_agent.main.init_script]
828828
security_context {

site/src/pages/ChatPage/ChatToolInvocation.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ RUN apt-get update && \
408408
rm -rf /tmp/go/src
409409
410410
# alpine:3.18
411-
FROM gcr.io/coder-dev-1/alpine@sha256:25fad2a32ad1f6f510e528448ae1ec69a28ef81916a004d3629874104f8a7f70 AS proto
411+
FROM us-docker.pkg.dev/coder-v2-images-public/public/alpine@sha256:fd032399cd767f310a1d1274e81cab9f0fd8a49b3589eba2c3420228cd45b6a7 AS proto
412412
WORKDIR /tmp
413413
RUN apk add curl unzip
414414
RUN curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip && \

site/src/theme/icons.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
"vsphere.svg",
107107
"webstorm.svg",
108108
"widgets.svg",
109+
"windows.svg",
109110
"windsurf.svg",
110111
"zed.svg"
111112
]

site/static/icon/windows.svg

Lines changed: 29 additions & 0 deletions
Loading

tailnet/test/integration/integration.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/go-chi/chi/v5"
2626
"github.com/google/uuid"
2727
"github.com/stretchr/testify/require"
28+
"golang.org/x/sys/unix"
2829
"golang.org/x/xerrors"
2930
"tailscale.com/derp"
3031
"tailscale.com/derp/derphttp"
@@ -458,6 +459,16 @@ func (UDPEchoService) StartService(t *testing.T, logger slog.Logger, _ *tailnet.
458459
Port: EchoPort,
459460
})
460461
require.NoError(t, err)
462+
463+
// set path MTU discovery so that we don't fragment the responses.
464+
c, err := l.SyscallConn()
465+
require.NoError(t, err)
466+
var sockErr error
467+
err = c.Control(func(fd uintptr) {
468+
sockErr = unix.SetsockoptInt(int(fd), unix.IPPROTO_IPV6, unix.IPV6_MTU_DISCOVER, unix.IP_PMTUDISC_DO)
469+
})
470+
require.NoError(t, err)
471+
require.NoError(t, sockErr)
461472
logger.Info(context.Background(), "started UDPEcho server")
462473
t.Cleanup(func() {
463474
lCloseErr := l.Close()

tailnet/test/integration/integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ var topologies = []integration.TestTopology{
112112
{
113113
// Test that direct over normal MTU works.
114114
Name: "DirectMTU1500",
115-
NetworkingProvider: integration.TriangleNetwork{InterClientMTU: 1500},
115+
NetworkingProvider: integration.TriangleNetwork{Client1MTU: 1500},
116116
Server: integration.SimpleServerOptions{},
117117
ClientStarter: integration.BasicClientStarter{
118118
WaitForDirect: true,
@@ -124,7 +124,7 @@ var topologies = []integration.TestTopology{
124124
{
125125
// Test that small MTU works.
126126
Name: "MTU1280",
127-
NetworkingProvider: integration.TriangleNetwork{InterClientMTU: 1280},
127+
NetworkingProvider: integration.TriangleNetwork{Client1MTU: 1280},
128128
Server: integration.SimpleServerOptions{},
129129
ClientStarter: integration.BasicClientStarter{Service: integration.UDPEchoService{}, LogPackets: true},
130130
RunTests: integration.TestBigUDP,

0 commit comments

Comments
 (0)