Skip to content

Commit 9c98773

Browse files
chore(deps): bump github.com/charmbracelet/bubbletea from 0.25.0 to 1.3.6 (#3819)
* chore(deps): bump github.com/charmbracelet/bubbletea Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.25.0 to 1.3.6. - [Release notes](https://github.com/charmbracelet/bubbletea/releases) - [Changelog](https://github.com/charmbracelet/bubbletea/blob/main/.goreleaser.yml) - [Commits](charmbracelet/bubbletea@v0.25.0...v1.3.6) --- updated-dependencies: - dependency-name: github.com/charmbracelet/bubbletea dependency-version: 1.3.6 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: use vanilla stderr for start command * chore: use vanilla stderr for db pull --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Qiao Han <[email protected]>
1 parent e54761c commit 9c98773

File tree

6 files changed

+38
-54
lines changed

6 files changed

+38
-54
lines changed

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/andybalholm/brotli v1.2.0
99
github.com/cenkalti/backoff/v4 v4.3.0
1010
github.com/charmbracelet/bubbles v0.18.0
11-
github.com/charmbracelet/bubbletea v0.25.0
11+
github.com/charmbracelet/bubbletea v1.3.6
1212
github.com/charmbracelet/glamour v0.9.1
1313
github.com/charmbracelet/lipgloss v1.1.0
1414
github.com/containerd/errdefs v1.0.0
@@ -96,13 +96,12 @@ require (
9696
github.com/charithe/durationcheck v0.0.10 // indirect
9797
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
9898
github.com/charmbracelet/harmonica v0.2.0 // indirect
99-
github.com/charmbracelet/x/ansi v0.8.0 // indirect
99+
github.com/charmbracelet/x/ansi v0.9.3 // indirect
100100
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
101101
github.com/charmbracelet/x/term v0.2.1 // indirect
102102
github.com/chavacava/garif v0.1.0 // indirect
103103
github.com/ckaznocha/intrange v0.3.1 // indirect
104104
github.com/cloudflare/circl v1.6.1 // indirect
105-
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect
106105
github.com/containerd/errdefs/pkg v0.3.0 // indirect
107106
github.com/containers/storage v1.59.1 // indirect
108107
github.com/curioswitch/go-reassign v0.3.0 // indirect
@@ -122,6 +121,7 @@ require (
122121
github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect
123122
github.com/ecies/go/v2 v2.0.11 // indirect
124123
github.com/emirpasic/gods v1.18.1 // indirect
124+
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
125125
github.com/ethereum/go-ethereum v1.15.8 // indirect
126126
github.com/ettle/strcase v0.2.0 // indirect
127127
github.com/fatih/color v1.18.0 // indirect
@@ -234,7 +234,7 @@ require (
234234
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
235235
github.com/moricho/tparallel v0.3.2 // indirect
236236
github.com/morikuni/aec v1.0.0 // indirect
237-
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect
237+
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
238238
github.com/muesli/cancelreader v0.2.2 // indirect
239239
github.com/muesli/termenv v0.16.0 // indirect
240240
github.com/nakabonne/nestif v0.3.1 // indirect

go.sum

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iy
159159
github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ=
160160
github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0=
161161
github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw=
162-
github.com/charmbracelet/bubbletea v0.25.0 h1:bAfwk7jRz7FKFl9RzlIULPkStffg5k6pNt5dywy4TcM=
163-
github.com/charmbracelet/bubbletea v0.25.0/go.mod h1:EN3QDR1T5ZdWmdfDzYcqOCAps45+QIJbLOBxmVNWNNg=
162+
github.com/charmbracelet/bubbletea v1.3.6 h1:VkHIxPJQeDt0aFJIsVxw8BQdh/F/L2KKZGsK6et5taU=
163+
github.com/charmbracelet/bubbletea v1.3.6/go.mod h1:oQD9VCRQFF8KplacJLo28/jofOI2ToOfGYeFgBBxHOc=
164164
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=
165165
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=
166166
github.com/charmbracelet/glamour v0.9.1 h1:11dEfiGP8q1BEqvGoIjivuc2rBk+5qEXdPtaQ2WoiCM=
@@ -169,8 +169,8 @@ github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG
169169
github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
170170
github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY=
171171
github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30=
172-
github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE=
173-
github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q=
172+
github.com/charmbracelet/x/ansi v0.9.3 h1:BXt5DHS/MKF+LjuK4huWrC6NCvHtexww7dMayh6GXd0=
173+
github.com/charmbracelet/x/ansi v0.9.3/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE=
174174
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8=
175175
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
176176
github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a h1:G99klV19u0QnhiizODirwVksQB91TJKV/UaTnACcG30=
@@ -191,8 +191,6 @@ github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZ
191191
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
192192
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
193193
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
194-
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY=
195-
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk=
196194
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
197195
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
198196
github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=
@@ -271,6 +269,8 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
271269
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
272270
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
273271
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
272+
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=
273+
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
274274
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
275275
github.com/ethereum/go-ethereum v1.15.8 h1:H6NilvRXFVoHiXZ3zkuTqKW5XcxjLZniV5UjxJt1GJU=
276276
github.com/ethereum/go-ethereum v1.15.8/go.mod h1:+S9k+jFzlyVTNcYGvqFhzN/SFhI6vA+aOY4T5tLSPL0=
@@ -725,8 +725,8 @@ github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKH
725725
github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U=
726726
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
727727
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
728-
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b h1:1XF24mVaiu7u+CFywTdcDo2ie1pzzhwjt6RHqzpMU34=
729-
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho=
728+
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
729+
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo=
730730
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
731731
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
732732
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
@@ -1282,14 +1282,14 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
12821282
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12831283
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12841284
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1285+
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12851286
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12861287
golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12871288
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12881289
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12891290
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12901291
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12911292
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1292-
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12931293
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12941294
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12951295
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

internal/db/pull/pull.go

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ func Run(ctx context.Context, schema []string, config pgconn.Config, name string
4444
// 2. Pull schema
4545
timestamp := utils.GetCurrentTimestamp()
4646
path := new.GetMigrationPath(timestamp, name)
47-
if err := utils.RunProgram(ctx, func(p utils.Program, ctx context.Context) error {
48-
return run(p, ctx, schema, path, conn, fsys)
49-
}); err != nil {
47+
if err := run(ctx, schema, path, conn, fsys); err != nil {
5048
return err
5149
}
5250
// 3. Insert a row to `schema_migrations`
@@ -59,12 +57,12 @@ func Run(ctx context.Context, schema []string, config pgconn.Config, name string
5957
return nil
6058
}
6159

62-
func run(p utils.Program, ctx context.Context, schema []string, path string, conn *pgx.Conn, fsys afero.Fs) error {
60+
func run(ctx context.Context, schema []string, path string, conn *pgx.Conn, fsys afero.Fs) error {
6361
config := conn.Config().Config
6462
// 1. Assert `supabase/migrations` and `schema_migrations` are in sync.
6563
if err := assertRemoteInSync(ctx, conn, fsys); errors.Is(err, errMissing) {
6664
// Not passing down schemas to avoid pulling in managed schemas
67-
if err = dumpRemoteSchema(p, ctx, path, config, fsys); err == nil {
65+
if err = dumpRemoteSchema(ctx, path, config, fsys); err == nil {
6866
utils.CmdSuggestion = suggestExtraPull
6967
}
7068
return err
@@ -80,16 +78,16 @@ func run(p utils.Program, ctx context.Context, schema []string, path string, con
8078
return err
8179
}
8280
}
83-
err := diffRemoteSchema(p, ctx, schema, path, config, fsys)
81+
err := diffRemoteSchema(ctx, schema, path, config, fsys)
8482
if defaultSchema && (err == nil || errors.Is(err, errInSync)) {
8583
utils.CmdSuggestion = suggestExtraPull
8684
}
8785
return err
8886
}
8987

90-
func dumpRemoteSchema(p utils.Program, ctx context.Context, path string, config pgconn.Config, fsys afero.Fs) error {
88+
func dumpRemoteSchema(ctx context.Context, path string, config pgconn.Config, fsys afero.Fs) error {
9189
// Special case if this is the first migration
92-
p.Send(utils.StatusMsg("Dumping schema from remote database..."))
90+
fmt.Fprintln(os.Stderr, "Dumping schema from remote database...")
9391
if err := utils.MkdirIfNotExistFS(fsys, filepath.Dir(path)); err != nil {
9492
return err
9593
}
@@ -101,10 +99,9 @@ func dumpRemoteSchema(p utils.Program, ctx context.Context, path string, config
10199
return migration.DumpSchema(ctx, config, f, dump.DockerExec)
102100
}
103101

104-
func diffRemoteSchema(p utils.Program, ctx context.Context, schema []string, path string, config pgconn.Config, fsys afero.Fs) error {
105-
w := utils.StatusWriter{Program: p}
102+
func diffRemoteSchema(ctx context.Context, schema []string, path string, config pgconn.Config, fsys afero.Fs) error {
106103
// Diff remote db (source) & shadow db (target) and write it as a new migration.
107-
output, err := diff.DiffDatabase(ctx, schema, config, w, fsys, diff.DiffSchemaMigra)
104+
output, err := diff.DiffDatabase(ctx, schema, config, os.Stderr, fsys, diff.DiffSchemaMigra)
108105
if err != nil {
109106
return err
110107
}

internal/db/pull/pull_test.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ func TestPullSchema(t *testing.T) {
7070
conn.Query(migration.LIST_MIGRATION_VERSION).
7171
Reply("SELECT 0")
7272
// Run test
73-
err := utils.RunProgram(context.Background(), func(p utils.Program, ctx context.Context) error {
74-
return run(p, ctx, nil, "0_test.sql", conn.MockClient(t), fsys)
75-
})
73+
err := run(context.Background(), nil, "0_test.sql", conn.MockClient(t), fsys)
7674
// Check error
7775
assert.NoError(t, err)
7876
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -94,9 +92,7 @@ func TestPullSchema(t *testing.T) {
9492
Query(migration.ListSchemas, migration.ManagedSchemas).
9593
ReplyError(pgerrcode.DuplicateTable, `relation "test" already exists`)
9694
// Run test
97-
err := utils.RunProgram(context.Background(), func(p utils.Program, ctx context.Context) error {
98-
return run(p, ctx, nil, "", conn.MockClient(t), fsys)
99-
})
95+
err := run(context.Background(), nil, "", conn.MockClient(t), fsys)
10096
// Check error
10197
assert.ErrorContains(t, err, `ERROR: relation "test" already exists (SQLSTATE 42P07)`)
10298
})
@@ -118,9 +114,7 @@ func TestPullSchema(t *testing.T) {
118114
conn.Query(migration.LIST_MIGRATION_VERSION).
119115
Reply("SELECT 1", []interface{}{"0"})
120116
// Run test
121-
err := utils.RunProgram(context.Background(), func(p utils.Program, ctx context.Context) error {
122-
return run(p, ctx, []string{"public"}, "", conn.MockClient(t), fsys)
123-
})
117+
err := run(context.Background(), []string{"public"}, "", conn.MockClient(t), fsys)
124118
// Check error
125119
assert.ErrorContains(t, err, "network error")
126120
assert.Empty(t, apitest.ListUnmatchedRequests())

internal/start/start.go

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,14 @@ func Run(ctx context.Context, fsys afero.Fs, excludedContainers []string, ignore
5151
}
5252
}
5353

54-
if err := utils.RunProgram(ctx, func(p utils.Program, ctx context.Context) error {
55-
dbConfig := pgconn.Config{
56-
Host: utils.DbId,
57-
Port: 5432,
58-
User: "postgres",
59-
Password: utils.Config.Db.Password,
60-
Database: "postgres",
61-
}
62-
return run(p, ctx, fsys, excludedContainers, dbConfig)
63-
}); err != nil {
54+
dbConfig := pgconn.Config{
55+
Host: utils.DbId,
56+
Port: 5432,
57+
User: "postgres",
58+
Password: utils.Config.Db.Password,
59+
Database: "postgres",
60+
}
61+
if err := run(ctx, fsys, excludedContainers, dbConfig); err != nil {
6462
if ignoreHealthCheck && start.IsUnhealthyError(err) {
6563
fmt.Fprintln(os.Stderr, err)
6664
} else {
@@ -139,7 +137,7 @@ var (
139137

140138
var serviceTimeout = 30 * time.Second
141139

142-
func run(p utils.Program, ctx context.Context, fsys afero.Fs, excludedContainers []string, dbConfig pgconn.Config, options ...func(*pgx.ConnConfig)) error {
140+
func run(ctx context.Context, fsys afero.Fs, excludedContainers []string, dbConfig pgconn.Config, options ...func(*pgx.ConnConfig)) error {
143141
excluded := make(map[string]bool)
144142
for _, name := range excludedContainers {
145143
excluded[name] = true
@@ -151,9 +149,8 @@ func run(p utils.Program, ctx context.Context, fsys afero.Fs, excludedContainers
151149
}
152150

153151
// Start Postgres.
154-
w := utils.StatusWriter{Program: p}
155152
if dbConfig.Host == utils.DbId {
156-
if err := start.StartDatabase(ctx, "", fsys, w, options...); err != nil {
153+
if err := start.StartDatabase(ctx, "", fsys, os.Stderr, options...); err != nil {
157154
return err
158155
}
159156
}
@@ -162,7 +159,7 @@ func run(p utils.Program, ctx context.Context, fsys afero.Fs, excludedContainers
162159
var isStorageEnabled = utils.Config.Storage.Enabled && !isContainerExcluded(utils.Config.Storage.Image, excluded)
163160
var isImgProxyEnabled = utils.Config.Storage.ImageTransformation != nil &&
164161
utils.Config.Storage.ImageTransformation.Enabled && !isContainerExcluded(utils.Config.Storage.ImgProxyImage, excluded)
165-
p.Send(utils.StatusMsg("Starting containers..."))
162+
fmt.Fprintln(os.Stderr, "Starting containers...")
166163

167164
// Start Logflare
168165
if utils.Config.Analytics.Enabled && !isContainerExcluded(utils.Config.Analytics.Image, excluded) {
@@ -1118,7 +1115,7 @@ EOF
11181115
started = append(started, utils.PoolerId)
11191116
}
11201117

1121-
p.Send(utils.StatusMsg("Waiting for health checks..."))
1118+
fmt.Fprintln(os.Stderr, "Waiting for health checks...")
11221119
if utils.NoBackupVolume && utils.SliceContains(started, utils.StorageId) {
11231120
if err := start.WaitForHealthyService(ctx, serviceTimeout, utils.StorageId); err != nil {
11241121
return err

internal/start/start_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,7 @@ func TestDatabaseStart(t *testing.T) {
200200
Reply(http.StatusOK).
201201
JSON([]storage.BucketResponse{})
202202
// Run test
203-
err := utils.RunProgram(context.Background(), func(p utils.Program, ctx context.Context) error {
204-
return run(p, context.Background(), fsys, []string{}, pgconn.Config{Host: utils.DbId}, conn.Intercept)
205-
})
203+
err := run(context.Background(), fsys, []string{}, pgconn.Config{Host: utils.DbId}, conn.Intercept)
206204
// Check error
207205
assert.NoError(t, err)
208206
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -246,9 +244,7 @@ func TestDatabaseStart(t *testing.T) {
246244
// Run test
247245
exclude := ExcludableContainers()
248246
exclude = append(exclude, "invalid", exclude[0])
249-
err := utils.RunProgram(context.Background(), func(p utils.Program, ctx context.Context) error {
250-
return run(p, context.Background(), fsys, exclude, pgconn.Config{Host: utils.DbId})
251-
})
247+
err := run(context.Background(), fsys, exclude, pgconn.Config{Host: utils.DbId})
252248
// Check error
253249
assert.NoError(t, err)
254250
assert.Empty(t, apitest.ListUnmatchedRequests())

0 commit comments

Comments
 (0)