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

warren pushed a commit to branch feat/q-dev-logging-dashboard-enrichment
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to 
refs/heads/feat/q-dev-logging-dashboard-enrichment by this push:
     new ac7622d0b fix(q-dev): use separate base path for logging S3 prefixes
ac7622d0b is described below

commit ac7622d0b5037d8d48b256ddca84bf9f7b6d26a2
Author: warren <[email protected]>
AuthorDate: Sat Mar 14 23:55:40 2026 +0800

    fix(q-dev): use separate base path for logging S3 prefixes
    
    Logging data lives under a different S3 prefix ("logging/") than user
    report data ("user-report/"). Add LoggingBasePath option (defaults to
    "logging") so logging prefixes are constructed correctly.
---
 backend/plugins/q_dev/impl/impl.go       |  9 +++++++--
 backend/plugins/q_dev/tasks/task_data.go | 15 ++++++++-------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/backend/plugins/q_dev/impl/impl.go 
b/backend/plugins/q_dev/impl/impl.go
index a0435e58b..46516b83c 100644
--- a/backend/plugins/q_dev/impl/impl.go
+++ b/backend/plugins/q_dev/impl/impl.go
@@ -131,11 +131,16 @@ func (p QDev) PrepareTaskData(taskCtx plugin.TaskContext, 
options map[string]int
                        timePart = fmt.Sprintf("%04d/%02d", op.Year, *op.Month)
                }
                base := fmt.Sprintf("%s/AWSLogs/%s/KiroLogs", op.BasePath, 
op.AccountId)
+               loggingBasePath := op.LoggingBasePath
+               if loggingBasePath == "" {
+                       loggingBasePath = "logging"
+               }
+               loggingBase := fmt.Sprintf("%s/AWSLogs/%s/KiroLogs", 
loggingBasePath, op.AccountId)
                s3Prefixes = []string{
                        fmt.Sprintf("%s/by_user_analytic/%s/%s", base, region, 
timePart),
                        fmt.Sprintf("%s/user_report/%s/%s", base, region, 
timePart),
-                       fmt.Sprintf("%s/GenerateAssistantResponse/%s/%s", base, 
region, timePart),
-                       fmt.Sprintf("%s/GenerateCompletions/%s/%s", base, 
region, timePart),
+                       fmt.Sprintf("%s/GenerateAssistantResponse/%s/%s", 
loggingBase, region, timePart),
+                       fmt.Sprintf("%s/GenerateCompletions/%s/%s", 
loggingBase, region, timePart),
                }
        } else {
                // Legacy scope: use S3Prefix directly
diff --git a/backend/plugins/q_dev/tasks/task_data.go 
b/backend/plugins/q_dev/tasks/task_data.go
index 3fd3c6584..6436a7f05 100644
--- a/backend/plugins/q_dev/tasks/task_data.go
+++ b/backend/plugins/q_dev/tasks/task_data.go
@@ -26,13 +26,14 @@ type QDevApiParams struct {
 }
 
 type QDevOptions struct {
-       ConnectionId uint64 `json:"connectionId"`
-       S3Prefix     string `json:"s3Prefix"`
-       ScopeId      string `json:"scopeId"`
-       AccountId    string `json:"accountId"`
-       BasePath     string `json:"basePath"`
-       Year         int    `json:"year"`
-       Month        *int   `json:"month"`
+       ConnectionId    uint64 `json:"connectionId"`
+       S3Prefix        string `json:"s3Prefix"`
+       ScopeId         string `json:"scopeId"`
+       AccountId       string `json:"accountId"`
+       BasePath        string `json:"basePath"`
+       LoggingBasePath string `json:"loggingBasePath"`
+       Year            int    `json:"year"`
+       Month           *int   `json:"month"`
 }
 
 type QDevTaskData struct {

Reply via email to