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

GA --use-registry-with-docker and make the Satellite warnings less prominent #2266

Merged
merged 4 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .earthly_version_flag_overrides
Original file line number Diff line number Diff line change
@@ -1 +1 @@
referenced-save-only,use-copy-include-patterns,earthly-version-arg,use-cache-command,use-host-command,check-duplicate-images,use-copy-link,parallel-load,shell-out-anywhere,new-platform,no-tar-build-output,wait-block,use-registry-for-with-docker
referenced-save-only,use-copy-include-patterns,earthly-version-arg,use-cache-command,use-host-command,check-duplicate-images,use-copy-link,parallel-load,shell-out-anywhere,new-platform,no-tar-build-output,wait-block
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

### Changed

- Loading Docker images as part of `WITH DOCKER` is now faster through the use of an embedded registry in Buildkit. This functionality was previously hidden (`VERSION --use-registry-for-with-docker`) and was only auto-enabled for Earthly Satellite users. It is now enabled by default for all builds. [#1268](https://github.com/earthly/earthly/issues/1268)

## v0.6.25 - 2022-10-04

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions cmd/earthly/build_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ func (app *earthlyApp) actionBuildImp(cliCtx *cli.Context, flagArgs, nonFlagArgs

isLocal := containerutil.IsLocal(app.buildkitdSettings.BuildkitAddress)
if !isLocal && app.ci {
app.console.Warnf("Please note that --use-inline-cache and --save-inline-cache are currently disabled when using --ci on Satellites or remote Buildkit.")
app.console.Warnf("") // newline
app.console.Printf("Please note that --use-inline-cache and --save-inline-cache are currently disabled when using --ci on Satellites or remote Buildkit.")
app.console.Printf("") // newline
app.useInlineCache = false
app.saveInlineCache = false
}
Expand Down
12 changes: 5 additions & 7 deletions cmd/earthly/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ func (app *earthlyApp) configureSatellite(cliCtx *cli.Context, cloudClient cloud
return nil
}

app.console.Warnf("Note: inline caching does not yet work on Earthly Satellites.")

// Set up extra settings needed for buildkit RPC metadata
if app.satelliteName == "" {
app.satelliteName = app.cfg.Satellite.Name
Expand All @@ -172,15 +170,15 @@ func (app *earthlyApp) configureSatellite(cliCtx *cli.Context, cloudClient cloud
app.analyticsMetadata.isSatellite = true
app.analyticsMetadata.satelliteVersion = "" // TODO

app.console.Warnf("") // newline
app.console.Warnf("The following feature flags are recommended for use with Satellites and will be auto-enabled:")
app.console.Warnf(" --new-platform, --use-registry-for-with-docker")
app.console.Warnf("") // newline
app.console.Printf("") // newline
app.console.Printf("The following feature flag is recommended for use with Satellites and will be auto-enabled:")
app.console.Printf(" --new-platform")
app.console.Printf("") // newline

if app.featureFlagOverrides != "" {
app.featureFlagOverrides += ","
}
app.featureFlagOverrides += "new-platform,use-registry-for-with-docker"
app.featureFlagOverrides += "new-platform"

token, err := cloudClient.GetAuthToken(cliCtx.Context)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ func GetFeatures(version *spec.Version) (*Features, bool, error) {
if versionAtLeast(ftrs, 0, 5) {
ftrs.ExecAfterParallel = true
ftrs.ParallelLoad = true
ftrs.UseRegistryForWithDocker = true
}
if versionAtLeast(ftrs, 0, 6) {
ftrs.ReferencedSaveOnly = true
Expand Down