diff --git a/CHANGELOG.md b/CHANGELOG.md index bfc4c9cd..dee01a6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) * feat(database/users): use API DatabaseUserResetPassword method for resetting password ### 1.32.0 diff --git a/apps/run.go b/apps/run.go index fb92298a..9b168544 100644 --- a/apps/run.go +++ b/apps/run.go @@ -38,7 +38,6 @@ type RunOpts struct { DisplayCmd string Silent bool Detached bool - Async bool Size string Type string Cmd []string @@ -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 { @@ -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 { diff --git a/cmd/run.go b/cmd/run.go index 225cec23..9283040b 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -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") diff --git a/db/influxdb_console.go b/db/influxdb_console.go index e13aef11..5036a7f2 100644 --- a/db/influxdb_console.go +++ b/db/influxdb_console.go @@ -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) diff --git a/db/mongo_console.go b/db/mongo_console.go index 7d3d9eb1..218ebc4e 100644 --- a/db/mongo_console.go +++ b/db/mongo_console.go @@ -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) diff --git a/db/mysql_console.go b/db/mysql_console.go index 65ab1fbb..3992d865 100644 --- a/db/mysql_console.go +++ b/db/mysql_console.go @@ -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) diff --git a/db/pgsql_console.go b/db/pgsql_console.go index c5054d2a..65bfbc7b 100644 --- a/db/pgsql_console.go +++ b/db/pgsql_console.go @@ -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) diff --git a/db/redis_console.go b/db/redis_console.go index 3c1b45bd..cdd7910d 100644 --- a/db/redis_console.go +++ b/db/redis_console.go @@ -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, } diff --git a/go.mod b/go.mod index f6bf3a81..b0bd555a 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 3e19dc3a..059bb666 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/vendor/github.com/Scalingo/go-scalingo/v7/CHANGELOG.md b/vendor/github.com/Scalingo/go-scalingo/v7/CHANGELOG.md index 90d19e48..51dfc4b9 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v7/CHANGELOG.md +++ b/vendor/github.com/Scalingo/go-scalingo/v7/CHANGELOG.md @@ -2,6 +2,10 @@ ## To Be Released +## 7.0.2 + +* fix(one-off): remove async field from the run command ([PR#390](https://github.com/Scalingo/go-scalingo/pull/390)) + ## 7.0.1 * feat(apps): add the `private_network_ids` field to the model diff --git a/vendor/github.com/Scalingo/go-scalingo/v7/README.md b/vendor/github.com/Scalingo/go-scalingo/v7/README.md index f31fc84d..5abeaee3 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v7/README.md +++ b/vendor/github.com/Scalingo/go-scalingo/v7/README.md @@ -1,6 +1,6 @@ [ ![Codeship Status for Scalingo/go-scalingo](https://app.codeship.com/projects/cf518dc0-0034-0136-d6b3-5a0245e77f67/status?branch=master)](https://app.codeship.com/projects/279805) -# Go client for Scalingo API v7.0.1 +# Go client for Scalingo API v7.0.2 This repository is the Go client for the [Scalingo APIs](https://developers.scalingo.com/). @@ -80,7 +80,7 @@ Bump new version number in: Commit, tag and create a new release: ```sh -version="7.0.1" +version="7.0.2" git switch --create release/${version} git add CHANGELOG.md README.md version.go diff --git a/vendor/github.com/Scalingo/go-scalingo/v7/run.go b/vendor/github.com/Scalingo/go-scalingo/v7/run.go index fdfdfcd9..0b2b6af0 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v7/run.go +++ b/vendor/github.com/Scalingo/go-scalingo/v7/run.go @@ -21,7 +21,6 @@ type RunOpts struct { Env map[string]string Size string Detached bool - Async bool HasUploads bool } @@ -40,7 +39,6 @@ func (c *Client) Run(ctx context.Context, opts RunOpts) (*RunRes, error) { "env": opts.Env, "size": opts.Size, "detached": opts.Detached, - "async": opts.Async, "has_uploads": opts.HasUploads, }, } diff --git a/vendor/github.com/Scalingo/go-scalingo/v7/version.go b/vendor/github.com/Scalingo/go-scalingo/v7/version.go index 3dec3518..625f21ee 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v7/version.go +++ b/vendor/github.com/Scalingo/go-scalingo/v7/version.go @@ -1,3 +1,3 @@ package scalingo -var Version = "7.0.1" +var Version = "7.0.2" diff --git a/vendor/modules.txt b/vendor/modules.txt index 60b898fa..37f4c4e7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -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