You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2025/05/19 07:11:04 UTC

(skywalking-cli) 01/01: fix: add cold stage to trace ls....

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch f
in repository https://gitbox.apache.org/repos/asf/skywalking-cli.git

commit fb7c33e3e827b644b79b4f6e90c15d63d2efec4b
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Mon May 19 15:10:54 2025 +0800

    fix: add cold stage to trace ls....
---
 internal/commands/trace/list.go | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/internal/commands/trace/list.go b/internal/commands/trace/list.go
index 8bfb014..fe738cc 100644
--- a/internal/commands/trace/list.go
+++ b/internal/commands/trace/list.go
@@ -101,13 +101,8 @@ $ swctl trace ls --trace-id "321661b1-9a31-4e12-ad64-c8f6711f108d" --cold
 		serviceInstanceID := ctx.String("instance-id")
 		traceID := ctx.String("trace-id")
 		tagStr := ctx.String("tags")
-		cold := ctx.Bool("cold")
 
-		if cold && traceID == "" {
-			return fmt.Errorf("cold storage must be queried with trace-id")
-		}
-
-		if cold {
+		if coldStage && traceID != "" {
 			trace, err := trace.ColdTrace(ctx.Context, duration, traceID)
 			if err != nil {
 				return err