Skip to content

Commit d9afefb

Browse files
yogesh-chauhanHarness
authored andcommitted
fix: [ML-1223]: handle pipeline execution logs download tool (#93)
* use BaseURL instead of LogSvcBaseURL * fix: [ML-1223]: handle pipeline execution logs download tool
1 parent b507c2b commit d9afefb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/modules/core.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package modules
22

33
import (
44
"fmt"
5+
"strings"
56
"time"
67

78
"github.com/harness/harness-mcp/client"
@@ -231,7 +232,13 @@ func RegisterLogs(config *config.Config, tsg *toolsets.ToolsetGroup) error {
231232
return nil
232233
}
233234
// Determine the base URL and secret for logs
234-
logServiceBaseURL := utils.BuildServiceURL(config, config.LogSvcBaseURL, config.BaseURL, "log-service")
235+
logServiceBaseURL := ""
236+
// To handle unique ingress for log-service
237+
if strings.Contains(config.BaseURL, "/gateway") {
238+
logServiceBaseURL = utils.BuildServiceURL(config, config.LogSvcBaseURL, config.BaseURL, "log-service")
239+
} else {
240+
logServiceBaseURL = utils.BuildServiceURL(config, config.LogSvcBaseURL, config.BaseURL, "gateway/log-service")
241+
}
235242
logServiceSecret := config.LogSvcSecret
236243

237244
// Create base client for logs

0 commit comments

Comments
 (0)