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

Oras dependency collision with helm 3.9 in Dev Console #854

Closed
dperaza4dustbit opened this issue May 25, 2022 · 1 comment · Fixed by devfile/registry-support#117
Closed
Labels
area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working

Comments

@dperaza4dustbit
Copy link

/kind bug

Which area this bug is related to?

/area registry

What versions of software are you using?

github.com/devfile/registry-support/registry-library v0.0.0-20220110165901-db88e581adf8

Operating System:
Linux

Go Pkg Version:
github.com/devfile/registry-support/registry-library v0.0.0-20220110165901-db88e581adf8

Bug Summary

While upgrading Dev Console dependency on helm from 3.7.1 to 3.9.0 we started seeing issue in Dev Console back end build from the devfile backend. The issue is that helm is pulling a different oras package oras.land/oras-go v1.1.0 wile devfiles is pulling oras.land/oras-go v0.4.0 in this library: https://github.com/devfile/registry-support/blob/main/registry-library/library/library.go#L33. I have found a workaround by moving forward both devfile and helm to oras.land/oras-go v1.1.0. However, there is a braking change in devfile to to moving to new major version.

To Reproduce:
change Dev Console go.mode helm dependency from 3.7.1 to 3.9.0, then do:
go mod tidy
go mode vendor
/build-backend.sh

You will se following error:

`dperaza@dperaza-mac console % ./build-backend.sh

github.com/devfile/registry-support/registry-library/library

vendor/github.com/devfile/registry-support/registry-library/library/library.go:255:15: undefined: "oras.land/oras-go/pkg/content".NewFileStore
vendor/github.com/devfile/registry-support/registry-library/library/library.go:259:14: undefined: oras.Pull`

Expected behavior

Both Helm and Devfile depend on compatible versions of oras from the version referenced in Dev Condole go.mod

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.

See above in reproduce section

Additional context

No

Any workaround?
No workaround found yet

Suggestion on how to fix the bug
make change in https://github.com/devfile/registry-support/blob/main/registry-library/library/library.go to switch NewFileStore call with NewFile call and swith Pull call with Copy call.

@openshift-ci openshift-ci bot added kind/bug Something isn't working area/registry Devfile registry for stacks and infrastructure labels May 25, 2022
@dperaza4dustbit
Copy link
Author

this is similar compatibility issue as #708

dperaza4dustbit added a commit to dperaza4dustbit/registry-support that referenced this issue May 25, 2022
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 <dperaza@redhat.com>
johnmcollier pushed a commit to devfile/registry-support that referenced this issue May 27, 2022
* What does does this PR do / why we need it:
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 <dperaza@redhat.com>

* Updating ci go version as well

Signed-off-by: David Peraza <dperaza@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant