From f2219feacc7b0456c698ec67b6e31729c9a9170b Mon Sep 17 00:00:00 2001 From: Paul Habfast Date: Wed, 7 Jan 2026 17:37:17 +0100 Subject: [PATCH 1/2] [sc-158769] fixed deployment logs command --- CHANGELOG.md | 4 ++++ .../deployment/deployment_actions_test.go | 7 ++++++- cmd/aiservices/deployment/deployment_logs.go | 4 +++- go.mod | 2 +- go.sum | 4 ++-- .../github.com/exoscale/egoscale/v3/schemas.go | 18 +++++++++++++++++- vendor/modules.txt | 2 +- 7 files changed, 34 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90bdf02e..2e634149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - dedicated-inference: ability to define the inference engine parameters, and to have some help around that +### Bug fixes + +- dedicated-inference: get deployment logs command fixed + ## 1.89.0 ### Bug fixes diff --git a/cmd/aiservices/deployment/deployment_actions_test.go b/cmd/aiservices/deployment/deployment_actions_test.go index 5337b98d..b1deb71a 100644 --- a/cmd/aiservices/deployment/deployment_actions_test.go +++ b/cmd/aiservices/deployment/deployment_actions_test.go @@ -72,7 +72,12 @@ func newDepActionsServer(t *testing.T) *depActionsServer { return } if len(parts) == 2 && parts[1] == "logs" && r.Method == http.MethodGet { - writeJSON(t, w, http.StatusOK, v3.GetDeploymentLogsResponse("l1\nl2")) + writeJSON(t, w, http.StatusOK, v3.GetDeploymentLogsResponse{ + Logs: []v3.GetDeploymentLogsEntry{ + {Message: "l1"}, + {Message: "l2"}, + }, + }) return } w.WriteHeader(http.StatusNotFound) diff --git a/cmd/aiservices/deployment/deployment_logs.go b/cmd/aiservices/deployment/deployment_logs.go index 4675ad0d..787c8ea3 100644 --- a/cmd/aiservices/deployment/deployment_logs.go +++ b/cmd/aiservices/deployment/deployment_logs.go @@ -52,7 +52,9 @@ func (c *DeploymentLogsCmd) CmdRun(_ *cobra.Command, _ []string) error { } if !globalstate.Quiet { - fmt.Fprintln(os.Stdout, string(*resp)) + for _, entry := range resp.Logs { + fmt.Fprintln(os.Stdout, entry.Message) + } return nil } // When quiet, do nothing diff --git a/go.mod b/go.mod index 41d35633..f05fdcca 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/s3 v1.2.0 github.com/aws/smithy-go v1.1.0 github.com/dustin/go-humanize v1.0.1 - github.com/exoscale/egoscale/v3 v3.1.33 + github.com/exoscale/egoscale/v3 v3.1.34-0.20260107090256-18aa51606080 github.com/exoscale/openapi-cli-generator v1.2.0 github.com/fatih/camelcase v1.0.0 github.com/hashicorp/go-multierror v1.1.1 diff --git a/go.sum b/go.sum index 74a8c701..43576c3f 100644 --- a/go.sum +++ b/go.sum @@ -161,8 +161,8 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/exoscale/egoscale/v3 v3.1.33 h1:5Lk/pwZ+K0sjNu9obS0VYPfhZQffRkvvO0BpdPoir4o= -github.com/exoscale/egoscale/v3 v3.1.33/go.mod h1:0iY8OxgHJCS5TKqDNhwOW95JBKCnBZl3YGU4Yt+NqkU= +github.com/exoscale/egoscale/v3 v3.1.34-0.20260107090256-18aa51606080 h1:oQptChlHoTy/rh/hoDmmH4hLGMZ7Qp/N2jdOaeIkBQo= +github.com/exoscale/egoscale/v3 v3.1.34-0.20260107090256-18aa51606080/go.mod h1:0iY8OxgHJCS5TKqDNhwOW95JBKCnBZl3YGU4Yt+NqkU= github.com/exoscale/openapi-cli-generator v1.2.0 h1:xgTff1bInBP+JZCauD7Jq9GNBFoKK31Cnv5FIAcxtrk= github.com/exoscale/openapi-cli-generator v1.2.0/go.mod h1:TZBnbT7f3hJ5ImyUphJwRM+X5xF/zCQZ6o8a42gQeTs= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= diff --git a/vendor/github.com/exoscale/egoscale/v3/schemas.go b/vendor/github.com/exoscale/egoscale/v3/schemas.go index ded939e8..f1d0c395 100644 --- a/vendor/github.com/exoscale/egoscale/v3/schemas.go +++ b/vendor/github.com/exoscale/egoscale/v3/schemas.go @@ -2204,7 +2204,21 @@ type Event struct { Zone string `json:"zone,omitempty"` } -type GetDeploymentLogsResponse string +// A single log entry +type GetDeploymentLogsEntry struct { + // Log message content + Message string `json:"message,omitempty"` + // Node identifier + Node string `json:"node,omitempty"` + // Timestamp of the log entry + Time string `json:"time,omitempty"` +} + +// Deployment logs +type GetDeploymentLogsResponse struct { + // List of log entries + Logs []GetDeploymentLogsEntry `json:"logs,omitempty"` +} type GetDeploymentResponseStatus string @@ -2238,6 +2252,8 @@ type GetDeploymentResponse struct { ServiceLevel string `json:"service-level,omitempty" validate:"omitempty,gte=1"` // Deployment status Status GetDeploymentResponseStatus `json:"status,omitempty"` + // Deployment status details + StatusDetails string `json:"status-details,omitempty"` // Update time UpdatedAT time.Time `json:"updated-at,omitempty"` } diff --git a/vendor/modules.txt b/vendor/modules.txt index 84e3a471..fb1b8df0 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -154,7 +154,7 @@ github.com/dlclark/regexp2/syntax # github.com/dustin/go-humanize v1.0.1 ## explicit; go 1.16 github.com/dustin/go-humanize -# github.com/exoscale/egoscale/v3 v3.1.33 +# github.com/exoscale/egoscale/v3 v3.1.34-0.20260107090256-18aa51606080 ## explicit; go 1.23.8 github.com/exoscale/egoscale/v3 github.com/exoscale/egoscale/v3/credentials From cd84e8e18a350fc53638ed8462c179a92676ad47 Mon Sep 17 00:00:00 2001 From: Paul Habfast Date: Thu, 8 Jan 2026 10:32:17 +0100 Subject: [PATCH 2/2] [sc-147338] showing error details of deployment --- cmd/aiservices/deployment/deployment_show.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/aiservices/deployment/deployment_show.go b/cmd/aiservices/deployment/deployment_show.go index 49314f34..f999d3b1 100644 --- a/cmd/aiservices/deployment/deployment_show.go +++ b/cmd/aiservices/deployment/deployment_show.go @@ -14,6 +14,7 @@ type DeploymentShowOutput struct { ID v3.UUID `json:"id"` Name string `json:"name"` Status v3.GetDeploymentResponseStatus `json:"status"` + StatusDetails string `json:"status_details"` GPUType string `json:"gpu_type"` GPUCount int64 `json:"gpu_count"` Replicas int64 `json:"replicas"` @@ -81,6 +82,7 @@ func (c *DeploymentShowCmd) CmdRun(_ *cobra.Command, _ []string) error { ID: resp.ID, Name: resp.Name, Status: resp.Status, + StatusDetails: resp.StatusDetails, GPUType: resp.GpuType, GPUCount: resp.GpuCount, Replicas: resp.Replicas,