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

Skip to content

Commit 83192a7

Browse files
committed
Merge branch 'main' of github.com:/coder/coder into dk/default-preset
2 parents f0f77fb + 4699393 commit 83192a7

File tree

389 files changed

+9648
-2876
lines changed

Some content is hidden

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

389 files changed

+9648
-2876
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ jobs:
902902
# the check to pass. This is desired in PRs, but not in mainline.
903903
- name: Publish to Chromatic (non-mainline)
904904
if: github.ref != 'refs/heads/main' && github.repository_owner == 'coder'
905-
uses: chromaui/action@c50adf8eaa8c2878af3263499a73077854de39d4 # v12.2.0
905+
uses: chromaui/action@b5848056bb67ce5f1cccca8e62a37cbd9dd42871 # v13.0.1
906906
env:
907907
NODE_OPTIONS: "--max_old_space_size=4096"
908908
STORYBOOK: true
@@ -934,7 +934,7 @@ jobs:
934934
# infinitely "in progress" in mainline unless we re-review each build.
935935
- name: Publish to Chromatic (mainline)
936936
if: github.ref == 'refs/heads/main' && github.repository_owner == 'coder'
937-
uses: chromaui/action@c50adf8eaa8c2878af3263499a73077854de39d4 # v12.2.0
937+
uses: chromaui/action@b5848056bb67ce5f1cccca8e62a37cbd9dd42871 # v13.0.1
938938
env:
939939
NODE_OPTIONS: "--max_old_space_size=4096"
940940
STORYBOOK: true

.github/workflows/docker-base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060

6161
# This uses OIDC authentication, so no auth variables are required.
6262
- name: Build base Docker image via depot.dev
63-
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1.14.0
63+
uses: depot/build-push-action@2583627a84956d07561420dcc1d0eb1f2af3fac0 # v1.15.0
6464
with:
6565
project: wl5hnrrkns
6666
context: base-build-context

.github/workflows/docs-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup Node
2929
uses: ./.github/actions/setup-node
3030

31-
- uses: tj-actions/changed-files@d52d20fa3f981cb852b861fd8f55308b5fe29637 # v45.0.7
31+
- uses: tj-actions/changed-files@666c9d29007687c52e3c7aa2aac6c0ffcadeadc3 # v45.0.7
3232
id: changed-files
3333
with:
3434
files: |

.github/workflows/dogfood.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636

3737
- name: Setup Nix
38-
uses: nixbuild/nix-quick-install-action@5bb6a3b3abe66fd09bbf250dce8ada94f856a703 # v30
38+
uses: nixbuild/nix-quick-install-action@889f3180bb5f064ee9e3201428d04ae9e41d54ad # v31
3939

4040
- uses: nix-community/cache-nix-action@135667ec418502fa5a3598af6fb9eb733888ce6a # v6.1.3
4141
with:
@@ -72,7 +72,7 @@ jobs:
7272
uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1.6.0
7373

7474
- name: Set up Docker Buildx
75-
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
75+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
7676

7777
- name: Login to DockerHub
7878
if: github.ref == 'refs/heads/main'
@@ -82,7 +82,7 @@ jobs:
8282
password: ${{ secrets.DOCKERHUB_PASSWORD }}
8383

8484
- name: Build and push Non-Nix image
85-
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1.14.0
85+
uses: depot/build-push-action@2583627a84956d07561420dcc1d0eb1f2af3fac0 # v1.15.0
8686
with:
8787
project: b4q6ltmpzh
8888
token: ${{ secrets.DEPOT_TOKEN }}

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ jobs:
364364
# This uses OIDC authentication, so no auth variables are required.
365365
- name: Build base Docker image via depot.dev
366366
if: steps.image-base-tag.outputs.tag != ''
367-
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1.14.0
367+
uses: depot/build-push-action@2583627a84956d07561420dcc1d0eb1f2af3fac0 # v1.15.0
368368
with:
369369
project: wl5hnrrkns
370370
context: base-build-context

agent/agent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,7 @@ func (a *agent) updateCommandEnv(current []string) (updated []string, err error)
12971297
"CODER": "true",
12981298
"CODER_WORKSPACE_NAME": manifest.WorkspaceName,
12991299
"CODER_WORKSPACE_AGENT_NAME": manifest.AgentName,
1300+
"CODER_WORKSPACE_OWNER_NAME": manifest.OwnerName,
13001301

13011302
// Specific Coder subcommands require the agent token exposed!
13021303
"CODER_AGENT_TOKEN": *a.sessionToken.Load(),

agent/agent_test.go

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ func TestAgent_Stats_SSH(t *testing.T) {
130130
t.Parallel()
131131

132132
for _, port := range sshPorts {
133-
port := port
134133
t.Run(fmt.Sprintf("(:%d)", port), func(t *testing.T) {
135134
t.Parallel()
136135

@@ -342,7 +341,6 @@ func TestAgent_SessionExec(t *testing.T) {
342341
t.Parallel()
343342

344343
for _, port := range sshPorts {
345-
port := port
346344
t.Run(fmt.Sprintf("(:%d)", port), func(t *testing.T) {
347345
t.Parallel()
348346

@@ -468,7 +466,6 @@ func TestAgent_SessionTTYShell(t *testing.T) {
468466
}
469467

470468
for _, port := range sshPorts {
471-
port := port
472469
t.Run(fmt.Sprintf("(%d)", port), func(t *testing.T) {
473470
t.Parallel()
474471

@@ -611,7 +608,6 @@ func TestAgent_Session_TTY_MOTD(t *testing.T) {
611608
}
612609

613610
for _, test := range tests {
614-
test := test
615611
t.Run(test.name, func(t *testing.T) {
616612
t.Parallel()
617613
session := setupSSHSession(t, test.manifest, test.banner, func(fs afero.Fs) {
@@ -688,16 +684,13 @@ func TestAgent_Session_TTY_MOTD_Update(t *testing.T) {
688684

689685
//nolint:paralleltest // These tests need to swap the banner func.
690686
for _, port := range sshPorts {
691-
port := port
692-
693687
sshClient, err := conn.SSHClientOnPort(ctx, port)
694688
require.NoError(t, err)
695689
t.Cleanup(func() {
696690
_ = sshClient.Close()
697691
})
698692

699693
for i, test := range tests {
700-
test := test
701694
t.Run(fmt.Sprintf("(:%d)/%d", port, i), func(t *testing.T) {
702695
// Set new banner func and wait for the agent to call it to update the
703696
// banner.
@@ -1209,8 +1202,7 @@ func TestAgent_EnvironmentVariableExpansion(t *testing.T) {
12091202
func TestAgent_CoderEnvVars(t *testing.T) {
12101203
t.Parallel()
12111204

1212-
for _, key := range []string{"CODER", "CODER_WORKSPACE_NAME", "CODER_WORKSPACE_AGENT_NAME"} {
1213-
key := key
1205+
for _, key := range []string{"CODER", "CODER_WORKSPACE_NAME", "CODER_WORKSPACE_OWNER_NAME", "CODER_WORKSPACE_AGENT_NAME"} {
12141206
t.Run(key, func(t *testing.T) {
12151207
t.Parallel()
12161208

@@ -1233,7 +1225,6 @@ func TestAgent_SSHConnectionEnvVars(t *testing.T) {
12331225
// For some reason this test produces a TTY locally and a non-TTY in CI
12341226
// so we don't test for the absence of SSH_TTY.
12351227
for _, key := range []string{"SSH_CONNECTION", "SSH_CLIENT"} {
1236-
key := key
12371228
t.Run(key, func(t *testing.T) {
12381229
t.Parallel()
12391230

@@ -1276,7 +1267,6 @@ func TestAgent_SSHConnectionLoginVars(t *testing.T) {
12761267
},
12771268
}
12781269
for _, tt := range tests {
1279-
tt := tt
12801270
t.Run(tt.key, func(t *testing.T) {
12811271
t.Parallel()
12821272

@@ -1796,7 +1786,6 @@ func TestAgent_ReconnectingPTY(t *testing.T) {
17961786
t.Setenv("LANG", "C")
17971787

17981788
for _, backendType := range backends {
1799-
backendType := backendType
18001789
t.Run(backendType, func(t *testing.T) {
18011790
if backendType == "Screen" {
18021791
if runtime.GOOS != "linux" {
@@ -2496,7 +2485,6 @@ func TestAgent_Dial(t *testing.T) {
24962485
}
24972486

24982487
for _, c := range cases {
2499-
c := c
25002488
t.Run(c.name, func(t *testing.T) {
25012489
t.Parallel()
25022490

@@ -3079,6 +3067,9 @@ func setupAgent(t *testing.T, metadata agentsdk.Manifest, ptyTimeout time.Durati
30793067
if metadata.WorkspaceName == "" {
30803068
metadata.WorkspaceName = "test-workspace"
30813069
}
3070+
if metadata.OwnerName == "" {
3071+
metadata.OwnerName = "test-user"
3072+
}
30823073
if metadata.WorkspaceID == uuid.Nil {
30833074
metadata.WorkspaceID = uuid.New()
30843075
}

agent/agentcontainers/acmock/acmock.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)