Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(one-off): remove usage of Async parameter when starting one-off #1060

Merged
merged 7 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### To be Released

* fix(one-off): remove async field from the run command ([PR#1060](https://github.com/Scalingo/cli/pull/1060))
ipfaze marked this conversation as resolved.
Show resolved Hide resolved
* feat(database/users): use API DatabaseUserResetPassword method for resetting password

### 1.32.0
Expand Down
5 changes: 0 additions & 5 deletions apps/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ type RunOpts struct {
DisplayCmd string
Silent bool
Detached bool
Async bool
Size string
Type string
Cmd []string
Expand Down Expand Up @@ -105,9 +104,6 @@ func Run(ctx context.Context, opts RunOpts) error {
if opts.StdoutCopyFunc != nil {
runCtx.stdoutCopyFunc = opts.StdoutCopyFunc
}
if opts.Detached {
opts.Async = false
}

env, err := runCtx.buildEnv(opts.CmdEnv)
if err != nil {
Expand All @@ -127,7 +123,6 @@ func Run(ctx context.Context, opts RunOpts) error {
Env: env,
Size: opts.Size,
Detached: opts.Detached,
Async: opts.Async,
},
)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ var (
Files: c.StringSlice("f"),
Silent: c.Bool("silent"),
Detached: c.Bool("detached"),
Async: true,
}
if (c.Args().Len() == 0 && c.String("t") == "") || (c.Args().Len() > 0 && c.String("t") != "") {
cli.ShowCommandHelp(c, "run")
Expand Down
1 change: 0 additions & 1 deletion db/influxdb_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func InfluxDBConsole(ctx context.Context, opts InfluxDBConsoleOpts) error {
App: opts.App,
Cmd: cmd,
Size: opts.Size,
Async: true,
}

err = apps.Run(ctx, runOpts)
Expand Down
1 change: 0 additions & 1 deletion db/mongo_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func MongoConsole(ctx context.Context, opts MongoConsoleOpts) error {
App: opts.App,
Cmd: append(command, "'"+mongoURL.String()+"'"),
Size: opts.Size,
Async: true,
})
if err != nil {
return errgo.Newf("fail to run MongoDB console: %v", err)
Expand Down
1 change: 0 additions & 1 deletion db/mysql_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func MySQLConsole(ctx context.Context, opts MySQLConsoleOpts) error {
App: opts.App,
Cmd: []string{"dbclient-fetcher", "mysql", "&&", "mysql", "-h", host, "-P", port, fmt.Sprintf("--password=%v", password), "-u", user, user},
Size: opts.Size,
Async: true,
}

err = apps.Run(ctx, runOpts)
Expand Down
1 change: 0 additions & 1 deletion db/pgsql_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func PgSQLConsole(ctx context.Context, opts PgSQLConsoleOpts) error {
App: opts.App,
Cmd: []string{"dbclient-fetcher", "pgsql", "&&", "psql", "'" + postgreSQLURL.String() + "'"},
Size: opts.Size,
Async: true,
}

err = apps.Run(ctx, runOpts)
Expand Down
1 change: 0 additions & 1 deletion db/redis_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ func RedisConsole(ctx context.Context, opts RedisConsoleOpts) error {
App: opts.App,
Cmd: []string{"dbclient-fetcher", "redis", "&&", "redis-cli", "-h", host, "-p", port, "-a", password},
Size: opts.Size,
Async: true,
StdinCopyFunc: redisStdinCopy,
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/Scalingo/go-scalingo/v7 v7.0.1
github.com/Scalingo/go-scalingo/v7 v7.0.2
github.com/Scalingo/go-utils/errors/v2 v2.4.0
github.com/Scalingo/go-utils/logger v1.2.0
github.com/Scalingo/go-utils/retry v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63n
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton h1:KVBEgU3CJpmzLChnLiSuEyCuhGhcMt3eOST+7A+ckto=
github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/Scalingo/go-scalingo/v7 v7.0.1 h1:Bpyy30AanC43qze6MzR9psf8v3V/MA+nExPVyOxAzoY=
github.com/Scalingo/go-scalingo/v7 v7.0.1/go.mod h1:nraQDEEaoQwxKMmGux+eTXVeZNXWExS/kK7VkOvYGGw=
github.com/Scalingo/go-scalingo/v7 v7.0.2 h1:g39KNRBVq7No5psCfst8CWcqH9Qb/gskRG0bbXOi2FQ=
github.com/Scalingo/go-scalingo/v7 v7.0.2/go.mod h1:nraQDEEaoQwxKMmGux+eTXVeZNXWExS/kK7VkOvYGGw=
github.com/Scalingo/go-utils/errors/v2 v2.4.0 h1:vKG0Js3kzWG7+03LEvH7j8fw+picEcRhbjMm3i9Xbb8=
github.com/Scalingo/go-utils/errors/v2 v2.4.0/go.mod h1:WU6Kzi19AlZyUfoxFkdvEeYkIa0W0f172hKPqkOeIpU=
github.com/Scalingo/go-utils/logger v1.2.0 h1:E3jtaoRxpIsFcZu/jsvWew8ttUAwKUYQufdPqGYp7EU=
Expand Down
4 changes: 4 additions & 0 deletions vendor/github.com/Scalingo/go-scalingo/v7/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/Scalingo/go-scalingo/v7/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions vendor/github.com/Scalingo/go-scalingo/v7/run.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/Scalingo/go-scalingo/v7/version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ github.com/ProtonMail/go-crypto/openpgp/s2k
github.com/ProtonMail/go-crypto/openpgp/symmetric
github.com/ProtonMail/go-crypto/openpgp/x25519
github.com/ProtonMail/go-crypto/openpgp/x448
# github.com/Scalingo/go-scalingo/v7 v7.0.1
# github.com/Scalingo/go-scalingo/v7 v7.0.2
## explicit; go 1.20
github.com/Scalingo/go-scalingo/v7
github.com/Scalingo/go-scalingo/v7/billing
Expand Down