From 1c67d88b5475e09062090e8b058608632ee293bd Mon Sep 17 00:00:00 2001 From: nicholasSUSE Date: Fri, 3 Oct 2025 13:52:53 -0300 Subject: [PATCH 1/2] debugging --- pkg/auto/oci.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/auto/oci.go b/pkg/auto/oci.go index ea16f1a1..555cdc4d 100644 --- a/pkg/auto/oci.go +++ b/pkg/auto/oci.go @@ -148,6 +148,7 @@ func setupHelm(ctx context.Context, ociDNS, ociUser, ociPass string, debug bool) } if err = regClient.Login(registryHost, registry.LoginOptInsecure(false), + registry.LoginOptTLSClientConfig("", "", ""), registry.LoginOptBasicAuth(ociUser, ociPass)); err != nil { logger.Log(ctx, slog.LevelError, "failed to login") return nil, err @@ -269,7 +270,12 @@ func buildPushURL(ociDNS, chart, version string) string { func checkAsset(ctx context.Context, helmClient *registry.Client, ociDNS, chart, version string) (bool, error) { // Once issue is resolved: https://github.com/helm/helm/issues/13368 // Replace by: helmClient.Tags(ociDNS + "/" + chart + ":" + version) - existingVersions, err := helmClient.Tags(ociDNS + "/" + chart) + tagsURL := ociDNS + "/" + chart + logger.Log(ctx, slog.LevelDebug, "checking tags", + slog.String("ociDNS", ociDNS), + slog.String("chart", chart), + slog.String("fullURL", tagsURL)) + existingVersions, err := helmClient.Tags(tagsURL) if err != nil { if strings.Contains(err.Error(), "unexpected status code 404: name unknown: repository name not known to registry") { logger.Log(ctx, slog.LevelDebug, "asset does not exist at registry", slog.String("chart", chart)) From 7a00d587860578e636ed1e02bda5cbfa407163b5 Mon Sep 17 00:00:00 2001 From: nicholasSUSE Date: Fri, 3 Oct 2025 13:55:27 -0300 Subject: [PATCH 2/2] remove this later --- pkg/auto/oci.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/auto/oci.go b/pkg/auto/oci.go index 555cdc4d..ebba338c 100644 --- a/pkg/auto/oci.go +++ b/pkg/auto/oci.go @@ -153,6 +153,7 @@ func setupHelm(ctx context.Context, ociDNS, ociUser, ociPass string, debug bool) logger.Log(ctx, slog.LevelError, "failed to login") return nil, err } + logger.Log(ctx, slog.LevelDebug, "creds", slog.String("u", ociUser), slog.String("p", ociPass)) } return regClient, nil