-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Implement helm pull
for OCI registries
#8843
Conversation
Hi @pmengelbert and @jdolitsky. Have you reached out to @phroggyy on this discussion topic? Based on his last comment it did appear that he was still interested in pursuing this effort. I'm curious why another competing PR is being proposed here instead of working together with @phroggyy. |
No ill intentions here - just trying to move things forward based on the new proposal. (Let it be known that I had approved those changes back in February) I've reached out to Leo in Slack. and will wait for response. We're happy to drop this PR if that one is updated to reflect the proposal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see comment regarding the OCI
boolean, should not be needed
If this feature is removed again from roadmap for the next release because of „new considerations“ I am going nuts. We are waiting for progress on the OCI support for almost a year and „new options“ simply show that people are tired of waiting. |
@bacongobbler to clear up on my end: I have no issues with this going forward. I did not see your link to the HIP in my PR until I read Josh's message today, and so even without checking the code, I'd assume this is a lot closer to done based on that spec. As I said to Josh in DM, if any effort should "go to waste" it should be the older, more faulty one, imho. |
@phoenix-bjoern I'd consider this a massive step forwards! Sure, it's frustrating that it's been open for so long, but let's keep in mind that there was no spec for this back in #7613. Then a spec (HIP) was written, and now there's a compliant implementation – this to me seems like a massive step forwards and I would believe brings us a lot closer to getting this feature in! |
@phroggyy thanks for your comment and all the efforts. Any implementation is fine for us as long as it means we do not have to wait another 3 months till OCI dependencies are supported in a GA version. |
@phoenix-bjoern while I understand the frustration, I want to make things clear... I was asking to make sure that @phroggyy was okay with this PR. Since he's put in the most time into this, we want to make sure that credit to the original author is due. If he's okay with @pmengelbert moving this forward (as he's done so), then that's fine with me. It's important to us to make sure that the original author is given credit when they put in the work. On timelines: significant features to a stable project take time, and need careful consideration. This undertaking is replacing a significant part of Helm's architecture, so it's not unusual for this to take as long as it has. It's worth keeping in mind how HUGE the Helm community is, and we need to factor that in when we're asking our entire community to migrate to a new system. Even after this PR is merged, it is highly unlikely this feature will be marked as stable. If you read the proposed HIP 6 at helm/community#136, we still need the OCI to approve the OCI Artifacts proposal until we can mark this as a stable feature. Please refer to Section 7: "Experimental until clear messaging from OCI" for more information. If I were to assume a timeline, I wouldn't be expecting this to be marked as a stable feature until Helm 4. We've been waiting for months for the OCI to approve the Artifacts proposal. It's unlikely to be approved any time soon. Hope that clears things up. |
@bacongobbler the OCI feature is marked as experimental, clear. The OCI dependency issue, which I've created in #6593, has celebrated already it's first birthday ;-) |
We've been focused on the Helm 2 deprecation, which happens in less than a month's time from now. Any Helm 3 work has been put on the side-burner for the time being while we support those folks still migrating to Helm 3. Thanks for your patience. |
FYI - The HIP related to this change has been accepted. Please see https://github.com/helm/community/blob/master/hips/hip-0006.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this out locally and it worked fine, aside from a file deletion error after the first time installing a chart.
One question though. Will this support semver versions ranges such as ^1.2
in the future? So we don't have to update the version we want by hand
@WyriHaximus can you expand on "file deletion error after the first time installing a chart" ? The support for version ranges might be supported in the future if we are able to query the registry for available versions (tag listing). |
@jdolitsky the exact error is:
Was expecting as such, don't know OCI well enough to know if this is build in. But from a user perspective this would be very welcome and put it at the same level of use as the old skool |
The "tmpcharts" piece seems unrelated: helm/pkg/downloader/manager.go Line 247 in af2d302
Unsure if this is an existing bug or specific to this change |
Seems people have had this issue in the past @WyriHaximus https://github.com/helm/helm/issues?q=is%3Aissue+cannot+rename+charts+to+tmpcharts+is%3Aclosed |
@jdolitsky Looks like I had some naming crossed inside the OCI repository. But name made sure that the chart name is be found under Getting this error now:
When running this command:
Now this happens as long as the
Not sure how helm does this internally but it seems to expect that he |
@jdolitsky Ok just tested this and there is no issue with the helm I build from this PR using charts from a chartmuseum kind of repository |
There is an important loss of functionality here compared to old repositories: This syntax needs a way of saying "in the same repository/registry as the parent chart" or "in any of the configured repositories/registries" Am I missing something? |
@cobexer - you're asking for symbolic key (such as In any case - I don't believe this PR does not prevent that feature being added in the future. If you want, please make PR to modify this document: https://github.com/helm/community/blob/master/hips/hip-0006.md |
Hi. Is there a potential release date for this feature? I'm hoping to use it for a DR scenario. Thanks |
* Implement `helm dep update` for oci dependencies * New unit tests * Remove `helm chart pull` command * New `helm pull` does not depend on registry cache Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
Additionally, revert `NewPull()` to its existing signature. Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
d804ebe
to
f666fce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tried to run helm dep up
(my local chart has a dependency on a chart in an OCI repo) more than once I got the following error if the chart already existed in the target location...
Error: unable to move local charts to charts dir: link error: cannot rename tmpcharts/test-chart to charts/test-chart: rename tmpcharts/test-chart charts/test-chart: file exists
Shouldn't it remove the old version and replace it with the new version?
I also noticed that oci://
works even when the OCI experiment isn't enabled for dependencies in the Chart.yaml
file. Is this intentional?
I've not completed my whole review but I wanted to pass on the couple issues and question I had right away.
@@ -57,7 +57,7 @@ func TestAll(t *testing.T) { | |||
env.PluginsDirectory = pluginDir | |||
|
|||
all := All(env) | |||
if len(all) != 3 { | |||
if len(all) != 4 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the length changed the error message below it was not updated to the new situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not completed my whole review but I wanted to pass on the couple issues and question I had right away.
@mattfarina Thanks so much for the review. I just pushed a commit that fixes the bug you pointed out and gives the proper error message in getter_test.go
. Let me know what you think of the changes, and I look forward to the rest of your review!
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
@@ -144,7 +146,60 @@ func (c *Client) PushChart(ref *Reference) error { | |||
} | |||
|
|||
// PullChart downloads a chart from a registry | |||
func (c *Client) PullChart(ref *Reference) error { | |||
func (c *Client) PullChart(ref *Reference) (*bytes.Buffer, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewers... this function is internal and part of the experiment. It's ok to change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks to me like a clear step forward on the experimental OCI front. I am good with merging/shipping this iteration.
@mattfarina would you do us a favor and mark the requested changes as resolved? Once that's taken care of we can finally get this merged! Really happy to see this moving forward |
@pmengelbert we're actually both working on it right now |
This PR is in line with the HIP for OCI Proposal here: helm/community#136
helm pull
does not depend on registry cachehelm pull oci://<registryURL> --version <tag>
helm dep update
for oci dependencies, in this format:helm pull
andhelm dep update
OCIGetter
implementation ofGetter
interfaceSigned-off-by: Peter Engelbert pmengelbert@gmail.com
What this PR does / why we need it:
Special notes for your reviewer:
If applicable: