- v3.18.5 switched jsonschema and began resolving external $ref
at compile-time, exposing missing urn handling
(“no URLLoader registered for urn:…”).
- Add urn scheme loader and pluggable URNResolver. If unresolved, log
a warning and return a permissive true schema (back-compat).
- Avoid having a duplicated warn logs when we Load the schema twice.
Note: external URNs need AddResource/Resolver (the CLI uses --map for
this).
Close: #31170
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
(cherry picked from commit 3f0da15437)
The existing check worked for `helm pull downloaded-repo/chart-name`,
but often does not work when using `--repo-url`, depending on the urls
used by the charts.
Signed-off-by: Luna Stadler <luc@spreadshirt.net>
(cherry picked from commit 1031b67fff)
Backport of #30900 to v3.
(cherry picked from commit d448cf1943)
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
(cherry picked from commit 79a9cc5653)
In the move to oras v2, an existing but empty registry config file
became an uncaught error. A missing file caused no error. This
change catches the error and works around it so that Helm can
continue to be fault tolerant to this issue.
Signed-off-by: Matt Farina <matt.farina@suse.com>
- The newReference() function transforms version tags by replacing + with _ for OCI compatibility
- But the code was using the original ref (with +) for TagBytes()
- Then it tries to find the tagged reference using parsedRef.String() (with _)
- This mismatch causes the Resolve method to fail with "not found"
- By using parsedRef.String() consistently in both places, the references will match and the lookup will succeed.
I extracted the TagBytes function to improve testability.
Push() includes several external calls that are hard to mock,
so isolating this logic makes testing more manageable.
Close: #30881
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
Helm 3.18.0 released an upgrade of ORAS from v1 to v2.
ORAS v2 correctly does not accept http/https scheme for registry login, while
ORAS v1 previously did. Even if v1 should not have, we want to preserve
backwards compatibility for Helm 3 users who pass the scheme.
This will be removed in Helm 4, where registry login will not accept http/https
scheme.
Co-authored-by: Andrew Block <andy.block@gmail.com>
Co-authored-by: Terry Howe <terrylhowe@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
This change has caused issues with numerous charts around things
unrelated to toml. This is because of functions like typeIs/typeOf
being used and acted upon.
The change caused a significant regression.
Closes#30880
Signed-off-by: Matt Farina <matt@mattfarina.com>
Emit the warning first to ensure it's always logged. This clarifies that any following errors are due to using a local chart instead of a remote repository.
Signed-off-by: Feng Cao <24779889+shfc@users.noreply.github.com>