Commit Graph

35 Commits

Author SHA1 Message Date
Justen Stall 6aa19b8c92
more error wrapping uses
- replace os.IsNotExist with errors.Is and fs.ErrNotExist
- use %w directive

Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 12:54:09 -05:00
Justen Stall 63cf42a843
fix: replace "github.com/pkg/errors" with stdlib "errors" package
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 11:35:59 -05:00
Nathan Baulch ef85fa7f2d
Grammar fixes
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:30:31 +10:00
Matt Farina c81bd8912e
Revert "Improve helm dependency update performance"
The change in #11726 caused a regression where `helm dependency udpate`
stopped working. The format of the internal representation of the data
changed causing errors of "non-absolute URLs should be in form of
repo_name/path_to_chart". See #13324 for more details.

Since this change is in released Helm and it's a regression, reverting
the original change was the fastest and safest route to deliver a
fix as quickly as possible.

Closes #13324

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-09-12 10:37:15 -04:00
MichaelMorris 9e5f465499 Merge branch 'helm:main' into fixDepUpPerformance
Signed-off-by: MichaelMorris <michael.morris@est.tech>
2024-08-02 00:03:15 +01:00
Andreas Sommer ac75eae98c Add error details when a dependent chart's version cannot be found in a repo
Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
2024-04-10 12:04:26 +02:00
Jeff van Dam 183f01b32c Made urls key more specific
Signed-off-by: Jeff van Dam <jeff.van.dam@est.tech>
2023-09-01 16:13:03 +01:00
JvD_Ericsson 1ce7939838 Improve helm dependency update performance
What this PR does / why we need it:
This PR was created to improve performance of the dependency update command by
skipping unnecessary downloading and loading of index files that have already
been downloaded and loaded

I believe this would close refs #9865

Signed-off-by: Jeff van Dam <jeff.van.dam@est.tech>
2023-04-24 17:35:50 +01:00
Andrew Block 01ff5bb00d
Avoid querying for OCI tags can explicit version provided in chart dependencies
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-30 15:53:08 -06:00
David Peraza 9f869c6b21 Removing all the checks for oci experimental flag
Signed-off-by: David Peraza <dperaza@redhat.com>
2022-01-12 21:49:26 -05:00
Thomas Runyon 353d74e967 refactor internal/experimental/registry to pkg/registry
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
2022-01-12 21:49:26 -05:00
Andrew Block 9c3b000889
Fixed bad commit
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-11 21:05:28 -06:00
Andrew Block 828941b273
Readded resolver OCI logic
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-11 20:54:47 -06:00
Andrew Block 4f62d3dc1b
Started work on 'helm pull'
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-11 21:47:03 -05:00
Andrew Block df98e18eb7
Working oci code without providing versions
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-11 21:47:03 -05:00
Andrew Block 0fae7f5008
Updated tag resolver logic
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-11 21:47:03 -05:00
Andrew Block 834a11db56
Added registryClient to resolver
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-11 21:47:03 -05:00
Scott Rigby e3f2fb4235
Add OCI tag verions to the Dependency object before Resolve. TODO: fix HTTP HTTPS error for local registries
Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-11 21:45:30 -05:00
Scott Rigby 3dc9930488
Revert "hack in progress"
This reverts commit c0be414e4b8d2928018504c010cb04b1b2450bf3.

Taking a different approach, but keep this work in git history for now until we
know the new approach works.

Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-11 21:45:30 -05:00
Scott Rigby 0d2f0116ea
hack in progress
Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-11 21:44:49 -05:00
Josh Dolitsky 593eac8876
Merge branch 'main' of github.com:helm/helm into hip-6
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-07-07 10:35:34 -05:00
Josh Dolitsky 230e37ca52
remove hardcoded oci strings, add constant/util
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-06-28 12:43:33 -04:00
cndoit18 402c7f1a52
fix(dep update): helm dep update is not respecting the "version" stipulated in the requirements
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2021-05-25 22:33:02 +08:00
Peter Engelbert 3028c55858 Clean up imports and add doc comments
Additionally, revert `NewPull()` to its existing signature.

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2020-12-11 21:44:46 -06:00
Peter Engelbert 3ad08f3ea9 Implement `helm pull` for OCI registries
* 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>
2020-12-11 21:44:30 -06:00
Matt Farina ff147e9ed7
Locking file URIs to a version in lockfile
Previously, if a range was specified for a file:// url as a
dependency the range would be put in the lockfile. Lockfiles are
designed to pin to a specific version and not support ranges. This
is for reproducibility.

The change here pins to a the specific version of the chart
specified using the file:// when update is run.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-07-22 15:42:26 -04:00
Martin Hickey 5ec70ab27f
fix(chart): lock digest differs when dependency build with Helm 2 and then Helm 3 (#7261)
* Fix issue with apiVersion v1 lock digest

When apiVersion v1 chart dependencies are built with Helm 2
and then built with Helm 3, the lock digests differ. To avoid
this issue, a depdendency update is forced.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Check against Helm v2 hash

Handle scenario where dependency hash was generated by Helm v2
but need to do a dependency build with Helm v3.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Add unit test

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Refactor unit test

Refactor unit test to use an existing chart as dependency

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Update after review

Comments:
- https://github.com/helm/helm/pull/7261#discussion_r373827088
- https://github.com/helm/helm/pull/7261#discussion_r373827250

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2020-02-05 09:38:30 +01:00
Hang Park c72caf6a11
fix(pkg/downloader): Calculate digest from both Chart.lock & Chart.yaml deps
To make digests include information about Chart.yaml dependencies, not
only the lock file, digest calculation is changed to accept both
contents. This terminates the `dep build` command if Chart.yaml
dependencies have been updated so that `dep up` should be executed
properly, to prevent downloading wrong versions or mismatched subcharts.

Note that previous Helm cannot know whether Chart.yaml dependencies were changed
or not since the Chart.lock's digest is calculated by only Chart.lock
contents, which don't include information about SemVer ranges and extra
dependency fields such as aliases, conditions, and tags. Specially,
SemVer can be written as a version range in Chart.yaml, but Chart.lock
has the specific, resolved version of that range.

Signed-off-by: Hang Park <hangpark@kaist.ac.kr>
2019-10-27 22:48:19 +09:00
Matthew Fisher 40572311ab
Merge pull request #6488 from bacongobbler/port-6258
fix(downloader): bypass index cache when repository URL defined
2019-10-16 09:10:06 -07:00
Martin Hickey f2aa97e313
fix(helm): Port accept dependency in requirements.yaml from charts directory (#6611)
* Port #6578 to Helm 3

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

* Update after reviw

Review comments:
- https://github.com/helm/helm/pull/6611#discussion_r332745703

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-10-09 16:35:55 +01:00
Matthew Fisher b02080dc2c
fix(downloader): bypass index cache when repository URL defined
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-10-03 12:37:05 -07:00
Matt Farina 9bc7934f35
Updating the module for v3 as the major version
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 14:27:05 -04:00
Matt Farina 967f4fed42
Update dependencies
* Kubernetes updated to 1.16.1
* SemVer and Sprig updated to latest releases that leverage go
  modules
* Tests and checks updated. These already landed in v2 via PR 6457

Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 13:49:07 -04:00
Adam Reese b6fdd8783b
feat(cmd/helm): remove need for helm init command
* allow repository config via cli
* make `helm repo add` create repo config file if it does not exist
* squash a ton of bugs

Signed-off-by: Adam Reese <adam@reese.io>
2019-08-22 23:31:50 -07:00
Taylor Thomas c9c95ea148 ref(*): Moves packages to internal
These packages are generally used only for logic inside of Helm and
can later be re-exported as needed

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-08-09 16:02:33 -06:00