From ad5df664fca5d757f46d5b9578a413d73293cf72 Mon Sep 17 00:00:00 2001 From: Volodymyr Stoiko Date: Tue, 14 Jul 2026 21:13:45 +0300 Subject: [PATCH] cli: mark 'console' as under refactoring and early-exit (#1946) * cli: mark 'console' as non-functional / under refactoring Hub PR #464 moved scripting-console log streaming off the /scripts/logs WebSocket onto a Connect-RPC streaming service (ScriptLogsDashboard). The console command still dials ws://.../api/scripts/logs, a route the hub no longer serves, so it never streams and spins in its reconnect loop. Surface this in the command help (Short/Long) and as a runtime warning until the client is re-pointed at the Connect-RPC stream. * cli: early-exit 'console' while under refactoring Instead of warning and then entering the (now broken) reconnect loop, the console command logs the under-refactoring notice and returns immediately so users don't get stuck in a spinning client that never streams. * cli: silence unused linter on retained console helpers --------- Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com> --- cmd/console.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cmd/console.go b/cmd/console.go index 6bdee9a20..2d30f9248 100644 --- a/cmd/console.go +++ b/cmd/console.go @@ -21,9 +21,15 @@ import ( var consoleCmd = &cobra.Command{ Use: "console", - Short: "Stream the scripting console logs into shell", + Short: "Stream the scripting console logs into shell (temporarily non-functional — under refactoring after hub API changes)", + Long: `Stream the scripting console logs into shell. + +NOTE: This command is currently non-functional and under refactoring. The hub +moved scripting-console log streaming off the /scripts/logs WebSocket onto a +Connect-RPC streaming service, and this client has not yet been updated to use +it, so no logs will stream until the migration lands.`, RunE: func(cmd *cobra.Command, args []string) error { - runConsole() + log.Warn().Msg(fmt.Sprintf(utils.Yellow, "The 'console' command is temporarily non-functional and under refactoring: the hub moved scripting-console log streaming off the /scripts/logs WebSocket onto a Connect-RPC service, and this client has not yet been updated. No logs will stream, so the command exits without doing anything.")) return nil }, } @@ -41,6 +47,7 @@ func init() { consoleCmd.Flags().StringP(configStructs.ReleaseNamespaceLabel, "s", defaultTapConfig.Release.Namespace, "Release namespace of Kubeshark") } +//nolint:unused // retained for the in-progress console refactoring; re-wired once the Connect-RPC client lands func runConsoleWithoutProxy() { log.Info().Msg("Starting scripting console ...") time.Sleep(5 * time.Second) @@ -121,7 +128,10 @@ func runConsoleWithoutProxy() { } } +//nolint:unused // retained for the in-progress console refactoring; re-wired once the Connect-RPC client lands func runConsole() { + log.Warn().Msg(fmt.Sprintf(utils.Yellow, "The 'console' command is temporarily non-functional and under refactoring: the hub moved scripting-console log streaming off the /scripts/logs WebSocket onto a Connect-RPC service, and this client has not yet been updated. No logs will stream.")) + go runConsoleWithoutProxy() // Create interrupt channel and setup signal handling once