Skip to content

Update go-containerregistry #651

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

Merged
merged 1 commit into from
Jun 8, 2018
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
20 changes: 10 additions & 10 deletions Gopkg.lock

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

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@

[[constraint]]
name = "github.com/google/go-containerregistry"
revision = "7da7957aee21f95e68545e1ae235654daec23c89"
revision = "dc0a77702ddab8c3dc5630eca7c026d571c1c9b7"

16 changes: 6 additions & 10 deletions pkg/skaffold/docker/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ import (
"io"
"net/http"

"github.com/google/go-containerregistry/authn"
"github.com/google/go-containerregistry/name"
"github.com/google/go-containerregistry/v1"
"github.com/google/go-containerregistry/v1/remote"
"github.com/google/go-containerregistry/v1/remote/transport"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/pkg/progress"
"github.com/google/go-containerregistry/pkg/authn"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
"github.com/moby/moby/pkg/jsonmessage"
"github.com/moby/moby/pkg/streamformatter"
"github.com/moby/moby/pkg/term"
Expand Down Expand Up @@ -133,10 +132,7 @@ func addTag(ref name.Reference, targetRef name.Reference, auth authn.Authenticat
return err
}

wo := remote.WriteOptions{
MountPaths: []name.Repository{ref.Context()},
}
return remote.Write(targetRef, img, auth, t, wo)
return remote.Write(targetRef, img, auth, t, remote.WriteOptions{})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to keep MountOptions if we can.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MountPaths field was removed. I don't know if something else needs to be done. @jonjohnsonjr @mattmoor ?

Copy link
Contributor

@jonjohnsonjr jonjohnsonjr Jun 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The happy path for mounting is now handled by the library, see google/go-containerregistry#186

tl;dr: remote layer reads retain the source repo and we specialize that case on remote layer writes to mount from where it was read, so you shouldn't need to do anything now :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nice. Missed that change in the library somehow.

}

// Digest returns the image digest for a corresponding reference.
Expand Down
3 changes: 1 addition & 2 deletions pkg/skaffold/docker/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ import (
"strings"
"sync"

"github.com/google/go-containerregistry/v1"

"github.com/docker/docker/builder/dockerignore"
"github.com/docker/docker/pkg/fileutils"
"github.com/google/go-containerregistry/pkg/v1"
"github.com/moby/moby/builder/dockerfile/parser"
"github.com/moby/moby/builder/dockerfile/shell"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/docker/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"testing"

"github.com/GoogleContainerTools/skaffold/testutil"
"github.com/google/go-containerregistry/v1"
"github.com/google/go-containerregistry/pkg/v1"
)

const copyServerGo = `
Expand Down

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading