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

[Enhancement] feature: supports adding the oci dependencies using oci urls #283

Closed
zong-zhe opened this issue Mar 22, 2024 · 8 comments · Fixed by #357
Closed

[Enhancement] feature: supports adding the oci dependencies using oci urls #283

zong-zhe opened this issue Mar 22, 2024 · 8 comments · Fixed by #357
Assignees
Labels
enhancement New feature or request

Comments

@zong-zhe
Copy link
Contributor

Feature Request

Is your feature request related to a problem? Please describe:

Describe the feature you'd like:

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

@zong-zhe zong-zhe added the enhancement New feature or request label Mar 22, 2024
@zong-zhe zong-zhe self-assigned this Mar 22, 2024
@Peefy Peefy transferred this issue from kcl-lang/kcl Mar 22, 2024
@dennybaa
Copy link

Indeed, doesn't work for me either.

kcl version: 0.8.8-linux-amd64

kcl mod add oci://ghcr.io/org/myrepo/appid --tag 0.0.1
adding dependency 'oci'
downloading 'kcl-lang/oci://ghcr.io/org/myrepo/appid' from 'ghcr.io/kcl-lang/oci://ghcr.io/org/myrepo/appid'
failed to get package with '//ghcr.io/org/myrepo/appid' from 'ghcr.io/kcl-lang/oci'
failed to resolve //ghcr.io/org/myrepo/appid: invalid reference: invalid tag

@Peefy
Copy link
Contributor

Peefy commented May 13, 2024

Yes, currently you can write it the kcl.mod and run kcl mod update.

appid = {oci = "oci://ghcr.io/org/myrepo/appid"}

@dennybaa
Copy link

Wow great. Thank you for a workaround @Peefy !

@Peefy Peefy changed the title [WIP] feature: supports adding the oci dependencies using oci urls [Enhancement] feature: supports adding the oci dependencies using oci urls May 13, 2024
@dennybaa
Copy link

But this was too fast, I've actually just checked and can confirm that it doesn't work. @Peefy

kcl mod pull appid
start to pull 'appid'
failed to select latest version from 'ghcr.io/kcl-lang/appid'
GET "https://ghcr.io/v2/kcl-lang/appid/tags/list": response status code 404: name unknown: repository name not known to registry

From my experience pushing to private authenticated OCI registries has worked for me, but pulling doesn't work. Pulling from private doesn't work, evidently pulling from public registries should not work too...

[dependencies]
appid = { oci = "oci://ghcr.io/org/myrepo/appid", tag = "0.0.1" }

@Peefy
Copy link
Contributor

Peefy commented May 13, 2024

image
I can use kcl mod update to get from private OCI registry. 🤔

@dennybaa
Copy link

Yup thanks, update succeeded. Still issue with pull, but this is not critical at all.

@Peefy
Copy link
Contributor

Peefy commented May 13, 2024

Thank you! @zong-zhe is adding support for commands such as kcl mod add and kcl mod pull for multiple OCI sources, and it is expected to be supported as early as version v0.9.0 alpha.1

@zong-zhe
Copy link
Contributor Author

Hi @dennybaa 😃

Thanks for your feedback, kcl mod add oci://ghcr.io/org/myrepo/appid --tag 0.0.1 is supported by kcl-lang/cli#90 and #357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants