Skip to content

Commit

Permalink
What does does this PR do / why we need it:
Browse files Browse the repository at this point in the history
Updates the ORAS dependency to oras.land/oras-go v1.1.0 to fix the dependency collision between devfile and ODC.

Which issue(s) this PR fixes:

Fixes devfile/api#854

Signed-off-by: David Peraza <[email protected]>
  • Loading branch information
dperaza4dustbit committed May 25, 2022
1 parent 192202e commit 7ef1c6c
Show file tree
Hide file tree
Showing 1,060 changed files with 88,877 additions and 48,394 deletions.
9 changes: 4 additions & 5 deletions registry-library/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ module github.com/devfile/registry-support/registry-library
go 1.14

require (
github.com/containerd/containerd v1.5.2
github.com/containerd/containerd v1.5.9
github.com/devfile/registry-support/index/generator v0.0.0-20220222194908-7a90a4214f3e
github.com/hashicorp/go-version v1.4.0
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v1.1.1
github.com/spf13/viper v1.7.1
oras.land/oras-go v0.4.0
rsc.io/letsencrypt v0.0.3 // indirect
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.8.1
oras.land/oras-go v1.1.0
)
335 changes: 298 additions & 37 deletions registry-library/go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions registry-library/library/library.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,11 @@ func PullStackByMediaTypesFromRegistry(registry string, stack string, allowedMed

resolver := docker.NewResolver(docker.ResolverOptions{Headers: headers, PlainHTTP: plainHTTP, Client: httpClient})
ref := path.Join(urlObj.Host, stackLink)
fileStore := content.NewFileStore(destDir)
fileStore := content.NewFile(destDir)
defer fileStore.Close()

// Pull stack from registry and save it to disk
_, _, err = oras.Pull(ctx, resolver, ref, fileStore, oras.WithAllowedMediaTypes(allowedMediaTypes))
_, err = oras.Copy(ctx, resolver, ref, fileStore, ref, oras.WithAllowedMediaTypes(allowedMediaTypes))
if err != nil {
return fmt.Errorf("failed to pull stack %s from %s with allowed media types %v: %v", stack, ref, allowedMediaTypes, err)
}
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.

Loading

0 comments on commit 7ef1c6c

Please sign in to comment.