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: Support specifying package versions by digest #480

Open
zong-zhe opened this issue Sep 12, 2024 · 3 comments
Open

Enhancement: Support specifying package versions by digest #480

zong-zhe opened this issue Sep 12, 2024 · 3 comments
Labels
enhancement New feature or request feature request Feature request.

Comments

@zong-zhe
Copy link
Contributor

zong-zhe commented Sep 12, 2024

Enhancement

Currently, KPM supports OCI Registry only through OCI Tag. In the future, KPM can continue to supports the OCI digest.

@zong-zhe zong-zhe added enhancement New feature or request feature request Feature request. labels Sep 12, 2024
@Gmin2
Copy link
Contributor

Gmin2 commented Dec 8, 2024

Hi @zong-zhe can i start working on the issue , and can you provide some more information around the issue, Thanks..

@zong-zhe
Copy link
Contributor Author

zong-zhe commented Dec 11, 2024

Hi @Gmin2 😄

Welcome!

This part supports the extension of KCL OCI registry dependency. OCI registry supports the download of the KCL tripartite library from the OCI registry through two flags, Tag and digest. It is similar to Git repository, Just as you can download content via the branch name, tag, and commit flags, kpm currently only supports interaction with OCI registry via Tag. We need to extend the functionality of kpm to enable it to interact with OCI registry using digest.

The APIs in this package use Source as input.

Source is here:

type Source struct {

You can first add a field called digest to the OCI in source.

Oci is here:

type Oci struct {

Then step by step try to use this field in the logic inside kpm to download the KCL package in OCI Registry.

This function may involve a lot of changes; you can split this function into multiple PRs. The first step is to make kcl.mod and kcl.mod.lock. These two files support digest. Andf feel free to ask questions 😄

@7h3-3mp7y-m4n
Copy link

If the issue is stale then I would love to work on this, Thanks!

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

No branches or pull requests

3 participants