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

Commit7d9b696

Browse files
committed
rename parent package lifecycle to autobuild
1 parenta7143bd commit7d9b696

File tree

10 files changed

+21
-21
lines changed

10 files changed

+21
-21
lines changed

‎cli/autostart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/spf13/cobra"
99

10-
"github.com/coder/coder/coderd/lifecycle/schedule"
10+
"github.com/coder/coder/coderd/autobuild/schedule"
1111
"github.com/coder/coder/codersdk"
1212
)
1313

‎cli/autostop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/spf13/cobra"
99

10-
"github.com/coder/coder/coderd/lifecycle/schedule"
10+
"github.com/coder/coder/coderd/autobuild/schedule"
1111
"github.com/coder/coder/codersdk"
1212
)
1313

‎cli/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ import (
3939
"github.com/coder/coder/cli/cliui"
4040
"github.com/coder/coder/cli/config"
4141
"github.com/coder/coder/coderd"
42+
"github.com/coder/coder/coderd/autobuild/executor"
4243
"github.com/coder/coder/coderd/database"
4344
"github.com/coder/coder/coderd/database/databasefake"
4445
"github.com/coder/coder/coderd/devtunnel"
4546
"github.com/coder/coder/coderd/gitsshkey"
46-
"github.com/coder/coder/coderd/lifecycle/executor"
4747
"github.com/coder/coder/coderd/turnconn"
4848
"github.com/coder/coder/codersdk"
4949
"github.com/coder/coder/cryptorand"

‎coderd/lifecycle/executor/lifecycle_executor.gorenamed to‎coderd/autobuild/executor/lifecycle_executor.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ import (
77

88
"cdr.dev/slog"
99

10+
"github.com/coder/coder/coderd/autobuild/schedule"
1011
"github.com/coder/coder/coderd/database"
11-
"github.com/coder/coder/coderd/lifecycle/schedule"
1212

1313
"github.com/google/uuid"
1414
"github.com/moby/moby/pkg/namesgenerator"
1515
"golang.org/x/xerrors"
1616
)
1717

18-
// Executorexecutes automated workspace lifecycle operations.
18+
// Executorautomatically starts or stops workspaces.
1919
typeExecutorstruct {
2020
ctx context.Context
2121
db database.Store
2222
log slog.Logger
2323
tick<-chan time.Time
2424
}
2525

26-
// New returns a newlifecycle executor.
26+
// New returns a newautobuild executor.
2727
funcNew(ctx context.Context,db database.Store,log slog.Logger,tick<-chan time.Time)*Executor {
2828
le:=&Executor{
2929
ctx:ctx,
@@ -34,7 +34,7 @@ func New(ctx context.Context, db database.Store, log slog.Logger, tick <-chan ti
3434
returnle
3535
}
3636

37-
// Run will cause executor torun workspace lifecycle operations on every
37+
// Run will cause executor tostart or stop workspaces on every
3838
// tick from its channel. It will stop when its context is Done, or when
3939
// its channel is closed.
4040
func (e*Executor)Run() {

‎coderd/lifecycle/executor/lifecycle_executor_test.gorenamed to‎coderd/autobuild/executor/lifecycle_executor_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88

99
"go.uber.org/goleak"
1010

11+
"github.com/coder/coder/coderd/autobuild/schedule"
1112
"github.com/coder/coder/coderd/coderdtest"
1213
"github.com/coder/coder/coderd/database"
13-
"github.com/coder/coder/coderd/lifecycle/schedule"
1414
"github.com/coder/coder/codersdk"
1515

1616
"github.com/google/uuid"
@@ -43,7 +43,7 @@ func TestExecutorAutostartOK(t *testing.T) {
4343
Schedule:sched.String(),
4444
}))
4545

46-
// When: thelifecycle executor ticks
46+
// When: theautobuild executor ticks
4747
gofunc() {
4848
tickCh<-time.Now().UTC().Add(time.Minute)
4949
close(tickCh)
@@ -84,7 +84,7 @@ func TestExecutorAutostartAlreadyRunning(t *testing.T) {
8484
Schedule:sched.String(),
8585
}))
8686

87-
// When: thelifecycle executor ticks
87+
// When: theautobuild executor ticks
8888
gofunc() {
8989
tickCh<-time.Now().UTC().Add(time.Minute)
9090
close(tickCh)
@@ -115,7 +115,7 @@ func TestExecutorAutostartNotEnabled(t *testing.T) {
115115
// Given: the workspace has autostart disabled
116116
require.Empty(t,workspace.AutostartSchedule)
117117

118-
// When: thelifecycle executor ticks
118+
// When: theautobuild executor ticks
119119
gofunc() {
120120
tickCh<-time.Now().UTC().Add(time.Minute)
121121
close(tickCh)
@@ -154,7 +154,7 @@ func TestExecutorAutostopOK(t *testing.T) {
154154
Schedule:sched.String(),
155155
}))
156156

157-
// When: thelifecycle executor ticks
157+
// When: theautobuild executor ticks
158158
gofunc() {
159159
tickCh<-time.Now().UTC().Add(time.Minute)
160160
close(tickCh)
@@ -195,7 +195,7 @@ func TestExecutorAutostopAlreadyStopped(t *testing.T) {
195195
Schedule:sched.String(),
196196
}))
197197

198-
// When: thelifecycle executor ticks
198+
// When: theautobuild executor ticks
199199
gofunc() {
200200
tickCh<-time.Now().UTC().Add(time.Minute)
201201
close(tickCh)
@@ -226,7 +226,7 @@ func TestExecutorAutostopNotEnabled(t *testing.T) {
226226
// Given: the workspace has autostop disabled
227227
require.Empty(t,workspace.AutostopSchedule)
228228

229-
// When: thelifecycle executor ticks
229+
// When: theautobuild executor ticks
230230
gofunc() {
231231
tickCh<-time.Now().UTC().Add(time.Minute)
232232
close(tickCh)
@@ -266,7 +266,7 @@ func TestExecutorWorkspaceDeleted(t *testing.T) {
266266
// Given: workspace is deleted
267267
workspace=mustTransitionWorkspace(t,client,workspace.ID,database.WorkspaceTransitionStart,database.WorkspaceTransitionDelete)
268268

269-
// When: thelifecycle executor ticks
269+
// When: theautobuild executor ticks
270270
gofunc() {
271271
tickCh<-time.Now().UTC().Add(time.Minute)
272272
close(tickCh)
@@ -305,7 +305,7 @@ func TestExecutorWorkspaceTooEarly(t *testing.T) {
305305
Schedule:sched.String(),
306306
}))
307307

308-
// When: thelifecycle executor ticks
308+
// When: theautobuild executor ticks
309309
gofunc() {
310310
tickCh<-time.Now().UTC()
311311
close(tickCh)

‎coderd/lifecycle/schedule/schedule_test.gorenamed to‎coderd/autobuild/schedule/schedule_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/stretchr/testify/require"
88

9-
"github.com/coder/coder/coderd/lifecycle/schedule"
9+
"github.com/coder/coder/coderd/autobuild/schedule"
1010
)
1111

1212
funcTest_Weekly(t*testing.T) {

‎coderd/coderdtest/coderdtest.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ import (
3636
"cdr.dev/slog"
3737
"cdr.dev/slog/sloggers/slogtest"
3838
"github.com/coder/coder/coderd"
39+
"github.com/coder/coder/coderd/autobuild/executor"
3940
"github.com/coder/coder/coderd/awsidentity"
4041
"github.com/coder/coder/coderd/database"
4142
"github.com/coder/coder/coderd/database/databasefake"
4243
"github.com/coder/coder/coderd/database/postgres"
4344
"github.com/coder/coder/coderd/gitsshkey"
44-
"github.com/coder/coder/coderd/lifecycle/executor"
4545
"github.com/coder/coder/coderd/turnconn"
4646
"github.com/coder/coder/codersdk"
4747
"github.com/coder/coder/cryptorand"
@@ -107,7 +107,7 @@ func New(t *testing.T, options *Options) *codersdk.Client {
107107
lifecycleExecutor:=executor.New(
108108
ctx,
109109
db,
110-
slogtest.Make(t,nil).Named("lifecycle.executor").Leveled(slog.LevelDebug),
110+
slogtest.Make(t,nil).Named("autobuild.executor").Leveled(slog.LevelDebug),
111111
options.LifecycleTicker,
112112
)
113113
lifecycleExecutor.Run()

‎coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
"github.com/moby/moby/pkg/namesgenerator"
1414
"golang.org/x/xerrors"
1515

16+
"github.com/coder/coder/coderd/autobuild/schedule"
1617
"github.com/coder/coder/coderd/database"
1718
"github.com/coder/coder/coderd/httpapi"
1819
"github.com/coder/coder/coderd/httpmw"
19-
"github.com/coder/coder/coderd/lifecycle/schedule"
2020
"github.com/coder/coder/codersdk"
2121
)
2222

‎coderd/workspaces_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"github.com/google/uuid"
1111
"github.com/stretchr/testify/require"
1212

13+
"github.com/coder/coder/coderd/autobuild/schedule"
1314
"github.com/coder/coder/coderd/coderdtest"
1415
"github.com/coder/coder/coderd/database"
15-
"github.com/coder/coder/coderd/lifecycle/schedule"
1616
"github.com/coder/coder/codersdk"
1717
"github.com/coder/coder/provisioner/echo"
1818
"github.com/coder/coder/provisionersdk/proto"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp