diff --git a/builder/builder-next/adapters/containerimage/pull.go b/builder/builder-next/adapters/containerimage/pull.go index 0ecdbbfb5f..d93e3e2756 100644 --- a/builder/builder-next/adapters/containerimage/pull.go +++ b/builder/builder-next/adapters/containerimage/pull.go @@ -177,7 +177,7 @@ func (is *Source) Resolve(ctx context.Context, id source.Identifier, sm *session p := &puller{ src: imageIdentifier, is: is, - //resolver: is.getResolver(is.RegistryHosts, imageIdentifier.Reference.String(), sm, g), + // resolver: is.getResolver(is.RegistryHosts, imageIdentifier.Reference.String(), sm, g), platform: platform, sm: sm, } @@ -439,7 +439,6 @@ func (p *puller) Snapshot(ctx context.Context, g session.Group) (cache.Immutable // TODO: Optimize to do dispatch and integrate pulling with download manager, // leverage existing blob mapping and layer storage } else { - // TODO: need a wrapper snapshot interface that combines content // and snapshots as 1) buildkit shouldn't have a dependency on contentstore // or 2) cachemanager should manage the contentstore diff --git a/builder/builder-next/adapters/localinlinecache/inlinecache.go b/builder/builder-next/adapters/localinlinecache/inlinecache.go index beba28273b..6c00852c5f 100644 --- a/builder/builder-next/adapters/localinlinecache/inlinecache.go +++ b/builder/builder-next/adapters/localinlinecache/inlinecache.go @@ -24,7 +24,6 @@ import ( // ResolveCacheImporterFunc returns a resolver function for local inline cache func ResolveCacheImporterFunc(sm *session.Manager, resolverFunc docker.RegistryHosts, cs content.Store, rs reference.Store, is imagestore.Store) remotecache.ResolveCacheImporterFunc { - upstream := registryremotecache.ResolveCacheImporterFunc(sm, cs, resolverFunc) return func(ctx context.Context, group session.Group, attrs map[string]string) (remotecache.Importer, specs.Descriptor, error) { diff --git a/builder/dockerfile/builder.go b/builder/dockerfile/builder.go index 820c2d102e..4c71b63713 100644 --- a/builder/dockerfile/builder.go +++ b/builder/dockerfile/builder.go @@ -295,7 +295,6 @@ func (b *Builder) dispatchDockerfileWithCancellation(parseResult []instructions. } dispatchRequest.state.updateRunConfig() fmt.Fprintf(b.Stdout, " ---> %s\n", stringid.TruncateID(dispatchRequest.state.imageID)) - } if err := emitImageID(b.Aux, dispatchRequest.state); err != nil { return nil, err diff --git a/builder/dockerfile/copy.go b/builder/dockerfile/copy.go index 8eb79140d8..2c413ca047 100644 --- a/builder/dockerfile/copy.go +++ b/builder/dockerfile/copy.go @@ -105,7 +105,6 @@ func copierFromDispatchRequest(req dispatchRequest, download sourceDownloader, i imageSource: imageSource, platform: platform, } - } func (o *copier) createCopyInstruction(sourcesAndDest instructions.SourcesAndDest, cmdName string) (copyInstruction, error) { diff --git a/builder/dockerfile/dispatchers.go b/builder/dockerfile/dispatchers.go index d946db6c2b..481ece049b 100644 --- a/builder/dockerfile/dispatchers.go +++ b/builder/dockerfile/dispatchers.go @@ -64,7 +64,6 @@ func dispatchEnv(d dispatchRequest, c *instructions.EnvCommand) error { // // Sets the maintainer metadata. func dispatchMaintainer(d dispatchRequest, c *instructions.MaintainerCommand) error { - d.state.maintainer = c.Maintainer return d.builder.commit(d.state, "MAINTAINER "+c.Maintainer) } @@ -557,7 +556,6 @@ func dispatchVolume(d dispatchRequest, c *instructions.VolumeCommand) error { // // Set the signal that will be used to kill the container. func dispatchStopSignal(d dispatchRequest, c *instructions.StopSignalCommand) error { - _, err := signal.ParseSignal(c.Signal) if err != nil { return errdefs.InvalidParameter(err) diff --git a/builder/dockerfile/dispatchers_test.go b/builder/dockerfile/dispatchers_test.go index 2c543f60e5..27c3da68be 100644 --- a/builder/dockerfile/dispatchers_test.go +++ b/builder/dockerfile/dispatchers_test.go @@ -284,7 +284,6 @@ func TestHealthcheckNone(t *testing.T) { } func TestHealthcheckCmd(t *testing.T) { - b := newBuilderWithMockBackend() sb := newDispatchRequest(b, '`', nil, NewBuildArgs(make(map[string]*string)), newStagesBuildResults()) expectedTest := []string{"CMD-SHELL", "curl -f http://localhost/ || exit 1"} diff --git a/builder/dockerfile/internals_test.go b/builder/dockerfile/internals_test.go index 5353167ad6..f55db68601 100644 --- a/builder/dockerfile/internals_test.go +++ b/builder/dockerfile/internals_test.go @@ -140,7 +140,6 @@ func TestCopyRunConfig(t *testing.T) { // Assert the original was not modified assert.Check(t, runConfig != runConfigCopy, testcase.doc) } - } func fullMutableRunConfig() *container.Config { diff --git a/builder/remotecontext/detect_test.go b/builder/remotecontext/detect_test.go index 71dfd7bbb9..2bc344dbe6 100644 --- a/builder/remotecontext/detect_test.go +++ b/builder/remotecontext/detect_test.go @@ -72,7 +72,6 @@ func TestProcessShouldRemoveDockerfileDockerignore(t *testing.T) { executeProcess(t, contextDir) checkDirectory(t, contextDir, []string{shouldStayFilename}) - } func TestProcessNoDockerignore(t *testing.T) { @@ -85,7 +84,6 @@ func TestProcessNoDockerignore(t *testing.T) { executeProcess(t, contextDir) checkDirectory(t, contextDir, []string{shouldStayFilename, builder.DefaultDockerfileName}) - } func TestProcessShouldLeaveAllFiles(t *testing.T) { @@ -99,7 +97,6 @@ func TestProcessShouldLeaveAllFiles(t *testing.T) { executeProcess(t, contextDir) checkDirectory(t, contextDir, []string{shouldStayFilename, builder.DefaultDockerfileName, dockerignoreFilename}) - } // TODO: remove after moving to a separate pkg