Skip to content

Commit

Permalink
Fix accidentally using a timeout of 0 for some network operations (#2270
Browse files Browse the repository at this point in the history
)

Co-authored-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
  • Loading branch information
vladaionescu and vladaionescu committed Oct 12, 2022
1 parent e20c104 commit 53eca29
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ All notable changes to [Earthly](https://github.com/earthly/earthly) will be doc

- Build failures now show the file and line number of the failing command

### Fixed

- Some network operations were being incorrectly executed with a timeout of 0.

## v0.6.25 - 2022-10-04

### Fixed
Expand Down
10 changes: 4 additions & 6 deletions cmd/earthly/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,11 @@ func (app *earthlyApp) initFrontend(cliCtx *cli.Context) error {
}

func (app *earthlyApp) getBuildkitClient(cliCtx *cli.Context, cloudClient cloud.Client) (*client.Client, error) {
if !app.isUsingSatellite(cliCtx) {
err := app.initFrontend(cliCtx)
if err != nil {
return nil, err
}
err := app.initFrontend(cliCtx)
if err != nil {
return nil, err
}
err := app.configureSatellite(cliCtx, cloudClient)
err = app.configureSatellite(cliCtx, cloudClient)
if err != nil {
return nil, errors.Wrapf(err, "could not construct new buildkit client")
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/earthly/satellite_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"time"

"github.com/pkg/errors"
"github.com/urfave/cli/v2"
Expand Down Expand Up @@ -285,6 +286,7 @@ func (app *earthlyApp) actionSatelliteInspect(cliCtx *cli.Context) error {
return errors.Wrap(err, "failed to get auth token")
}

app.buildkitdSettings.Timeout = 30 * time.Second
app.buildkitdSettings.SatelliteToken = token
app.buildkitdSettings.SatelliteName = satelliteToInspect
app.buildkitdSettings.SatelliteOrgID = orgID
Expand Down

0 comments on commit 53eca29

Please sign in to comment.