From 71acaddd992601202edf0c2513c06f2e4f0029a2 Mon Sep 17 00:00:00 2001 From: William Coe Date: Fri, 24 Jul 2026 01:13:33 +0000 Subject: [PATCH] Fix chart resolution bug This should have been absolute path, it fails to resolve correctly on CI. We don't need to check oci URLs, helm handles them differently and does not require they be helm added before downloading when resolving dependencies. Signed-off-by: William Coe --- local-k8s/src/local_k8s/commands/chart/lint.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/local-k8s/src/local_k8s/commands/chart/lint.py b/local-k8s/src/local_k8s/commands/chart/lint.py index 41622d2..e3a3278 100644 --- a/local-k8s/src/local_k8s/commands/chart/lint.py +++ b/local-k8s/src/local_k8s/commands/chart/lint.py @@ -39,9 +39,7 @@ def lint(helm_dir: Path, chart: Path) -> None: resolved_chart = resolve_chart(helm_dir, chart) ct_config = ChartTestingConfig.from_chart_dir(helm_dir) - chart_metadata = ChartMetadata.from_chart_dir( - resolved_chart.path_relative_to_helm_dir - ) + chart_metadata = ChartMetadata.from_chart_dir(resolved_chart.absolute_path) validate_dependencies_present(chart_metadata, ct_config, ct_path) with chdir(helm_dir): try: @@ -64,6 +62,10 @@ def validate_dependencies_present( # Syntax is = chart_repos = [repo.split("=")[-1] for repo in ct_config.chart_repos] for dependency in chart_metadata.dependencies: + # helm pulls OCI deps from the url in Chart.yaml during dependency build without helm repo add, + # so no need for us to validate it's existence in chart repos. + if dependency.repository.startswith("oci://ghcr.io"): + continue if dependency.repository not in chart_repos: raise ClickException( f"{dependency.repository} not found in {ct_path}. It needs to be added under the chart_repos list, in the format ="