diff --git a/ui/apiserver/apiserver.go b/ui/apiserver/apiserver.go index b7e3e499..8eff1f07 100644 --- a/ui/apiserver/apiserver.go +++ b/ui/apiserver/apiserver.go @@ -37,6 +37,7 @@ type JobData struct { RepoName string `json:"repoName"` JobType string `json:"jobType"` InstallationID string `json:"installationID"` + Cmd string `json:"cmd"` } func getAllJobs(c *gin.Context) { @@ -94,6 +95,7 @@ func fetchJobData(jobID string) (JobData, error) { jobData.RepoName = rdb.Get(ctx, fmt.Sprintf("jobs:%s:repo_name", jobID)).Val() jobData.JobType = rdb.Get(ctx, fmt.Sprintf("jobs:%s:job_type", jobID)).Val() jobData.InstallationID = rdb.Get(ctx, fmt.Sprintf("jobs:%s:installation_id", jobID)).Val() + jobData.Cmd = rdb.Get(ctx, fmt.Sprintf("jobs:%s:cmd", jobID)).Val() return jobData, nil } diff --git a/ui/src/app/Jobs/All/All.tsx b/ui/src/app/Jobs/All/All.tsx index dac3930a..fb32a00e 100644 --- a/ui/src/app/Jobs/All/All.tsx +++ b/ui/src/app/Jobs/All/All.tsx @@ -72,6 +72,8 @@ const AllJobs: React.FunctionComponent = () => {
Repository Name: {job.repoName}
S3 URL: {job.s3URL}
Model Name: {job.modelName}
+Command Run: {job.cmd}
+ diff --git a/ui/src/app/Jobs/Running/Running.tsx b/ui/src/app/Jobs/Running/Running.tsx index a4976e46..8d96e47b 100644 --- a/ui/src/app/Jobs/Running/Running.tsx +++ b/ui/src/app/Jobs/Running/Running.tsx @@ -79,6 +79,7 @@ const RunningJobs: React.FunctionComponent = () => {Repository Name: {job.repoName}
S3 URL: {job.s3URL}
Model Name: {job.modelName}
+Command Run: {job.cmd}
diff --git a/ui/src/app/Jobs/Success/Success.tsx b/ui/src/app/Jobs/Success/Success.tsx index 81e144a3..27d09601 100644 --- a/ui/src/app/Jobs/Success/Success.tsx +++ b/ui/src/app/Jobs/Success/Success.tsx @@ -79,6 +79,7 @@ const SuccessJobs: React.FunctionComponent = () => {Repository Name: {job.repoName}
S3 URL: {job.s3URL}
Model Name: {job.modelName}
+Command Run: {job.cmd}
diff --git a/ui/src/app/common/ModelJobs.tsx b/ui/src/app/common/ModelJobs.tsx index 086a9bee..8ea9dd90 100644 --- a/ui/src/app/common/ModelJobs.tsx +++ b/ui/src/app/common/ModelJobs.tsx @@ -13,4 +13,5 @@ export interface JobModel { installationID: string; s3URL: string; modelName: string; + cmd: string; } diff --git a/worker/cmd/generate.go b/worker/cmd/generate.go index 432d3848..9d4cb1d9 100644 --- a/worker/cmd/generate.go +++ b/worker/cmd/generate.go @@ -338,6 +338,7 @@ func (w *Worker) runPrecheck(lab, outputDir, modelName string) error { } cmdArgs := strings.Fields(commandStr) cmd := exec.Command(lab, cmdArgs...) + // Register the command for reporting/logging w.cmdRun = cmd.String() w.logger.Infof("Running the precheck command: %s", cmd.String()) @@ -960,6 +961,9 @@ func (w *Worker) datagenSvc(taxonomyFiles []string, outputDir string, numSamples w.logger.Infof("SDG Post Details: %v", request) + // Register the body for reporting/logging + w.cmdRun = string(jsonData) + response, err := httpClient.Do(request) if err != nil { return nil, fmt.Errorf("failed to execute request: %w", err)