From 80b3e168d8499dce37daf1c72562e38f8df20fcb Mon Sep 17 00:00:00 2001 From: onuryilmaz Date: Mon, 16 Nov 2026 10:45:05 +0100 Subject: [PATCH 1/3] docs: fix installation download command to use tar.gz archive format The goreleaser config produces .tar.gz archives, not bare binaries. Update the curl command to match the actual asset naming convention (underscores, .tar.gz) and extract via tar. Signed-off-by: onuryilmaz --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45bf742..17254e2 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Download the latest binary from the [releases page](https://github.com/cloudoper ```sh # macOS / Linux -curl -Lo cloudctl https://github.com/cloudoperators/cloudctl/releases/latest/download/cloudctl-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m) +curl -L https://github.com/cloudoperators/cloudctl/releases/latest/download/cloudctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m).tar.gz | tar -xz cloudctl chmod +x cloudctl sudo mv cloudctl /usr/local/bin/ ``` From 8c2ed2c5a868e30c9ce6332c65d86fa70b6a2c71 Mon Sep 17 00:00:00 2001 From: onuryilmaz Date: Wed, 18 Nov 2026 17:00:14 +0100 Subject: [PATCH 2/3] feat(sync): improve output for not-ready clusters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skipped (not-ready) clusters no longer appear in the issues table — they are an expected operational state, not an error. Only failed clusters are listed. Summary wording changes from "skipped" to "not ready" and uses faint styling instead of yellow to avoid a warning tone. Signed-off-by: onuryilmaz --- cmd/output/interactive_printer.go | 27 ++++++--------------------- cmd/output/output_test.go | 6 +++--- cmd/output/plain_printer.go | 10 ++-------- 3 files changed, 11 insertions(+), 32 deletions(-) diff --git a/cmd/output/interactive_printer.go b/cmd/output/interactive_printer.go index cdc3d45..e4740df 100644 --- a/cmd/output/interactive_printer.go +++ b/cmd/output/interactive_printer.go @@ -191,10 +191,10 @@ func (p *interactivePrinter) printSyncResult(r SyncResult) error { w("\n") } - // Collect only clusters that need attention. + // Collect only clusters that need attention (failed; skipped/not-ready are expected). var issues []ClusterSyncResult for _, c := range r.Clusters { - if c.Status != ClusterSyncStatusSynced { + if c.Status == ClusterSyncStatusFailed { issues = append(issues, c) } } @@ -208,31 +208,16 @@ func (p *interactivePrinter) printSyncResult(r SyncResult) error { w("%s\n", styleHeader.Render(header)) for _, c := range issues { - var icon, statusStr string - switch c.Status { - case ClusterSyncStatusFailed: - icon = styleRed.Render("✗") - statusStr = styleRed.Render("failed") - default: - icon = styleYellow.Render("!") - statusStr = styleYellow.Render("skipped") - } - name := c.Name if len(name) > colCluster-2 { name = name[:colCluster-5] + "..." } reason := c.Reason if reason == "" { - if c.Status == ClusterSyncStatusSkipped { - reason = "not ready" - } else { - reason = "unknown error" - } + reason = "unknown error" } - w("%s %-*s %-*s %s\n", - icon, colCluster-1, name, colStatus, statusStr, reason, + styleRed.Render("✗"), colCluster-1, name, colStatus, styleRed.Render("failed"), reason, ) } w("\n") @@ -246,7 +231,7 @@ func (p *interactivePrinter) printSyncResult(r SyncResult) error { case r.Failed > 0 && r.Skipped > 0: summary = fmt.Sprintf("%s %s %s", styleGreen.Render(fmt.Sprintf("Synced %d of %d cluster(s).", r.Synced, total)), - styleYellow.Render(fmt.Sprintf("%d skipped,", r.Skipped)), + styleFaint.Render(fmt.Sprintf("%d not ready,", r.Skipped)), styleRed.Render(fmt.Sprintf("%d failed.", r.Failed)), ) case r.Failed > 0: @@ -257,7 +242,7 @@ func (p *interactivePrinter) printSyncResult(r SyncResult) error { case r.Skipped > 0: summary = fmt.Sprintf("%s %s", styleGreen.Render(fmt.Sprintf("Synced %d of %d cluster(s).", r.Synced, total)), - styleYellow.Render(fmt.Sprintf("%d skipped (not ready).", r.Skipped)), + styleFaint.Render(fmt.Sprintf("%d not ready.", r.Skipped)), ) default: if total == 1 { diff --git a/cmd/output/output_test.go b/cmd/output/output_test.go index 1393bf4..8517c7b 100644 --- a/cmd/output/output_test.go +++ b/cmd/output/output_test.go @@ -141,13 +141,13 @@ func TestPlainPrinter_SyncResult(t *testing.T) { out := buf.String() // Synced clusters are not listed individually. g.Expect(out).ToNot(ContainSubstring("[+]")) - // Skipped and failed clusters appear with their reason. - g.Expect(out).To(ContainSubstring("[-] b")) + // Skipped (not ready) clusters are not listed — only failed ones appear. + g.Expect(out).ToNot(ContainSubstring("[-] b")) g.Expect(out).To(ContainSubstring("[!] c")) g.Expect(out).To(ContainSubstring("error")) // Summary is a human-readable sentence. g.Expect(out).To(ContainSubstring("Synced 1 of 3")) - g.Expect(out).To(ContainSubstring("1 skipped")) + g.Expect(out).To(ContainSubstring("1 not ready")) g.Expect(out).To(ContainSubstring("1 failed")) } diff --git a/cmd/output/plain_printer.go b/cmd/output/plain_printer.go index 16d88c4..8226051 100644 --- a/cmd/output/plain_printer.go +++ b/cmd/output/plain_printer.go @@ -38,12 +38,6 @@ func (p *plainPrinter) Print(v any) error { // List clusters that need attention first. for _, c := range t.Clusters { switch c.Status { - case ClusterSyncStatusSkipped: - reason := c.Reason - if reason == "" { - reason = "not ready" - } - w(" [-] %s — skipped (%s)\n", c.Name, reason) case ClusterSyncStatusFailed: reason := c.Reason if reason == "" { @@ -61,13 +55,13 @@ func (p *plainPrinter) Print(v any) error { // Summary sentence. switch { case t.Failed > 0 && t.Skipped > 0: - w("Synced %d of %d cluster(s). %d skipped, %d failed.\n", + w("Synced %d of %d cluster(s). %d not ready, %d failed.\n", t.Synced, total, t.Skipped, t.Failed) case t.Failed > 0: w("Synced %d of %d cluster(s). %d failed.\n", t.Synced, total, t.Failed) case t.Skipped > 0: - w("Synced %d of %d cluster(s). %d skipped (not ready).\n", + w("Synced %d of %d cluster(s). %d not ready.\n", t.Synced, total, t.Skipped) default: if total == 1 { From c51bfe850b51dcd7d29b1bc893d482242980b432 Mon Sep 17 00:00:00 2001 From: onuryilmaz Date: Thu, 19 Nov 2026 15:20:09 +0100 Subject: [PATCH 3/3] feat(sync): replace summary sentence with progress bar output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show sync results as a progress bar with an inline annotation instead of a separate summary sentence. Not-ready clusters are described with a full hint: "N clusters skipped (not ready — run with --include-not-ready to force)". Signed-off-by: onuryilmaz --- cmd/output/interactive_printer.go | 60 ++++++++++++++++--------------- cmd/sync_test.go | 32 ++++++++--------- 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/cmd/output/interactive_printer.go b/cmd/output/interactive_printer.go index e4740df..b14f350 100644 --- a/cmd/output/interactive_printer.go +++ b/cmd/output/interactive_printer.go @@ -199,6 +199,37 @@ func (p *interactivePrinter) printSyncResult(r SyncResult) error { } } + // Progress bar (or empty-state message). + if total == 0 { + w("%s\n", styleFaint.Render("No clusters found to sync.")) + } else { + const barWidth = 32 + filled := (r.Synced * barWidth) / total + bar := styleGreen.Render(strings.Repeat("█", filled)) + + styleFaint.Render(strings.Repeat("░", barWidth-filled)) + + var annotation string + switch { + case r.Failed > 0 && r.Skipped > 0: + annotation = fmt.Sprintf("%s %s", + styleFaint.Render(fmt.Sprintf("%d clusters skipped (not ready — run with --include-not-ready to force)", r.Skipped)), + styleRed.Render(fmt.Sprintf("%d failed", r.Failed)), + ) + case r.Failed > 0: + annotation = styleRed.Render(fmt.Sprintf("%d failed", r.Failed)) + case r.Skipped > 0: + annotation = styleFaint.Render(fmt.Sprintf("%d clusters skipped (not ready — run with --include-not-ready to force)", r.Skipped)) + default: + annotation = styleGreen.Render("All clusters synced successfully.") + } + + w(" %s %s/%d %s · %s\n\n", bar, + styleGreen.Render(fmt.Sprintf("%d", r.Synced)), total, + styleBold.Render("Synced"), + annotation, + ) + } + if len(issues) > 0 { const ( colCluster = 30 @@ -223,35 +254,6 @@ func (p *interactivePrinter) printSyncResult(r SyncResult) error { w("\n") } - // Summary sentence. - var summary string - switch { - case total == 0: - summary = styleFaint.Render("No clusters found to sync.") - case r.Failed > 0 && r.Skipped > 0: - summary = fmt.Sprintf("%s %s %s", - styleGreen.Render(fmt.Sprintf("Synced %d of %d cluster(s).", r.Synced, total)), - styleFaint.Render(fmt.Sprintf("%d not ready,", r.Skipped)), - styleRed.Render(fmt.Sprintf("%d failed.", r.Failed)), - ) - case r.Failed > 0: - summary = fmt.Sprintf("%s %s", - styleGreen.Render(fmt.Sprintf("Synced %d of %d cluster(s).", r.Synced, total)), - styleRed.Render(fmt.Sprintf("%d failed.", r.Failed)), - ) - case r.Skipped > 0: - summary = fmt.Sprintf("%s %s", - styleGreen.Render(fmt.Sprintf("Synced %d of %d cluster(s).", r.Synced, total)), - styleFaint.Render(fmt.Sprintf("%d not ready.", r.Skipped)), - ) - default: - if total == 1 { - summary = styleGreen.Render("Synced 1 cluster successfully.") - } else { - summary = styleGreen.Render(fmt.Sprintf("Synced all %d clusters successfully.", total)) - } - } - w("%s\n", summary) return writeErr } diff --git a/cmd/sync_test.go b/cmd/sync_test.go index 3278a09..731ded7 100644 --- a/cmd/sync_test.go +++ b/cmd/sync_test.go @@ -1060,34 +1060,34 @@ func TestResolveDisplaySources(t *testing.T) { sep := string(os.PathListSeparator) tests := []struct { - name string - explicitPath string - kubeconfig string - wantSources string + name string + explicitPath string + kubeconfig string + wantSources string }{ { - name: "explicit path returned as-is", + name: "explicit path returned as-is", explicitPath: "/explicit/kubeconfig", - kubeconfig: "/env/kubeconfig", - wantSources: "/explicit/kubeconfig", + kubeconfig: "/env/kubeconfig", + wantSources: "/explicit/kubeconfig", }, { - name: "single KUBECONFIG entry returned as-is", + name: "single KUBECONFIG entry returned as-is", explicitPath: "", - kubeconfig: "/single/kubeconfig", - wantSources: "/single/kubeconfig", + kubeconfig: "/single/kubeconfig", + wantSources: "/single/kubeconfig", }, { - name: "multi-file KUBECONFIG: full list returned", + name: "multi-file KUBECONFIG: full list returned", explicitPath: "", - kubeconfig: "/first" + sep + "/second" + sep + "/third", - wantSources: "/first" + sep + "/second" + sep + "/third", + kubeconfig: "/first" + sep + "/second" + sep + "/third", + wantSources: "/first" + sep + "/second" + sep + "/third", }, { - name: "empty KUBECONFIG falls back to default", + name: "empty KUBECONFIG falls back to default", explicitPath: "", - kubeconfig: "", - wantSources: clientcmd.RecommendedHomeFile, + kubeconfig: "", + wantSources: clientcmd.RecommendedHomeFile, }, }