Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd74457c

Browse files
committed
Merge branch 'main' into startuplogs
2 parentsdecde5c +de83723 commitd74457c

File tree

241 files changed

+9511
-4216
lines changed

Some content is hidden

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

241 files changed

+9511
-4216
lines changed

‎.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ jobs:
512512
-name:Install node_modules
513513
run:./scripts/yarn_install.sh
514514

515-
-run:yarn test:ci
515+
-run:yarn test:ci --max-workers ${{ steps.cpu-cores.outputs.count }}
516516
working-directory:site
517517

518518
-uses:codecov/codecov-action@v3

‎.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ site/test-results/*
2727
site/e2e/test-results/*
2828
site/e2e/states/*.json
2929
site/playwright-report/*
30+
site/.swc
3031

3132
# Make target for updating golden files.
3233
cli/testdata/.gen-golden
34+
helm/tests/testdata/.gen-golden
3335

3436
# Build
3537
/build/

‎.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ site/test-results/*
3030
site/e2e/test-results/*
3131
site/e2e/states/*.json
3232
site/playwright-report/*
33+
site/.swc
3334

3435
# Make target for updating golden files.
3536
cli/testdata/.gen-golden
37+
helm/tests/testdata/.gen-golden
3638

3739
# Build
3840
/build/

‎.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
"thead",
137137
"tios",
138138
"tmpdir",
139+
"tokenconfig",
139140
"tparallel",
140141
"trialer",
141142
"trimprefix",

‎Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,13 +516,17 @@ coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS)
516516
./scripts/apidocgen/generate.sh
517517
yarn run --cwd=site format:write:only ../docs/api ../docs/manifest.json ../coderd/apidoc/swagger.json
518518

519-
update-golden-files: cli/testdata/.gen-golden
519+
update-golden-files: cli/testdata/.gen-golden helm/tests/testdata/.gen-golden
520520
.PHONY: update-golden-files
521521

522522
cli/testdata/.gen-golden:$(wildcard cli/testdata/*.golden)$(GO_SRC_FILES)
523523
gotest ./cli -run=TestCommandHelp -update
524524
touch"$@"
525525

526+
helm/tests/testdata/.gen-golden:$(wildcard helm/tests/testdata/*.golden)$(GO_SRC_FILES)
527+
gotest ./helm/tests -run=TestUpdateGoldenFiles -update
528+
touch"$@"
529+
526530
# Generate a prettierrc for the site package that uses relative paths for
527531
# overrides. This allows us to share the same prettier config between the
528532
# site and the root of the repo.

‎agent/agent.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ type Options struct {
7979
EnvironmentVariablesmap[string]string
8080
Logger slog.Logger
8181
AgentPortsmap[int]string
82+
SSHMaxTimeout time.Duration
8283
}
8384

8485
typeClientinterface {
@@ -128,6 +129,7 @@ func New(options Options) io.Closer {
128129
lifecycleReported:make(chan codersdk.WorkspaceAgentLifecycle,1),
129130
ignorePorts:options.AgentPorts,
130131
connStatsChan:make(chan*agentsdk.Stats,1),
132+
sshMaxTimeout:options.SSHMaxTimeout,
131133
}
132134
a.init(ctx)
133135
returna
@@ -155,9 +157,10 @@ type agent struct {
155157

156158
envVarsmap[string]string
157159
// metadata is atomic because values can change after reconnection.
158-
metadata atomic.Value
159-
sessionToken atomic.Pointer[string]
160-
sshServer*ssh.Server
160+
metadata atomic.Value
161+
sessionToken atomic.Pointer[string]
162+
sshServer*ssh.Server
163+
sshMaxTimeout time.Duration
161164

162165
lifecycleUpdatechanstruct{}
163166
lifecycleReportedchan codersdk.WorkspaceAgentLifecycle
@@ -887,6 +890,7 @@ func (a *agent) init(ctx context.Context) {
887890
_=session.Exit(1)
888891
},
889892
},
893+
MaxTimeout:a.sshMaxTimeout,
890894
}
891895

892896
goa.runLoop(ctx)

‎cli/agent.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ import (
3131

3232
funcworkspaceAgent()*cobra.Command {
3333
var (
34-
authstring
35-
logDirstring
36-
pprofAddressstring
37-
noReapbool
34+
authstring
35+
logDirstring
36+
pprofAddressstring
37+
noReapbool
38+
sshMaxTimeout time.Duration
3839
)
3940
cmd:=&cobra.Command{
4041
Use:"agent",
@@ -211,7 +212,8 @@ func workspaceAgent() *cobra.Command {
211212
EnvironmentVariables:map[string]string{
212213
"GIT_ASKPASS":executablePath,
213214
},
214-
AgentPorts:agentPorts,
215+
AgentPorts:agentPorts,
216+
SSHMaxTimeout:sshMaxTimeout,
215217
})
216218
<-ctx.Done()
217219
returncloser.Close()
@@ -222,6 +224,7 @@ func workspaceAgent() *cobra.Command {
222224
cliflag.StringVarP(cmd.Flags(),&logDir,"log-dir","","CODER_AGENT_LOG_DIR",os.TempDir(),"Specify the location for the agent log files")
223225
cliflag.StringVarP(cmd.Flags(),&pprofAddress,"pprof-address","","CODER_AGENT_PPROF_ADDRESS","127.0.0.1:6060","The address to serve pprof.")
224226
cliflag.BoolVarP(cmd.Flags(),&noReap,"no-reap","","",false,"Do not start a process reaper.")
227+
cliflag.DurationVarP(cmd.Flags(),&sshMaxTimeout,"ssh-max-timeout","","CODER_AGENT_SSH_MAX_TIMEOUT",time.Duration(0),"Specify the max timeout for a SSH connection")
225228
returncmd
226229
}
227230

‎cli/clibase/clibase.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
// We will extend its usage to the rest of our application, completely replacing
66
// cobra/viper. It's also a candidate to be broken out into its own open-source
77
// library, so we avoid deep coupling with Coder concepts.
8+
//
9+
// The Command interface is loosely based on the chi middleware pattern and
10+
// http.Handler/HandlerFunc.
811
package clibase
912

1013
import (

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp