-
Notifications
You must be signed in to change notification settings - Fork 29
Add noop message parsing to logs and audit commands #4428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -52,6 +52,7 @@ type WorkflowRun struct { | |||||||
| ErrorCount int | ||||||||
| WarningCount int | ||||||||
| MissingToolCount int | ||||||||
| NoopCount int | ||||||||
| LogsPath string | ||||||||
| } | ||||||||
|
|
||||||||
|
|
@@ -65,6 +66,7 @@ type ProcessedRun struct { | |||||||
| AccessAnalysis *DomainAnalysis | ||||||||
| FirewallAnalysis *FirewallAnalysis | ||||||||
| MissingTools []MissingToolReport | ||||||||
| Noops []NoopReport | ||||||||
| MCPFailures []MCPFailureReport | ||||||||
| JobDetails []JobInfoWithDuration | ||||||||
| } | ||||||||
|
|
@@ -79,6 +81,14 @@ type MissingToolReport struct { | |||||||
| RunID int64 `json:"run_id,omitempty"` // Added for tracking which run reported this | ||||||||
| } | ||||||||
|
|
||||||||
| // NoopReport represents a noop message reported by an agentic workflow | ||||||||
| type NoopReport struct { | ||||||||
| Message string `json:"message"` | ||||||||
| Timestamp string `json:"timestamp,omitempty"` | ||||||||
| WorkflowName string `json:"workflow_name,omitempty"` // Added for tracking which workflow reported this | ||||||||
| RunID int64 `json:"run_id,omitempty"` // Added for tracking which run reported this | ||||||||
| } | ||||||||
|
|
||||||||
| // MCPFailureReport represents an MCP server failure detected in a workflow run | ||||||||
| type MCPFailureReport struct { | ||||||||
| ServerName string `json:"server_name"` | ||||||||
|
|
@@ -124,6 +134,7 @@ type RunSummary struct { | |||||||
| AccessAnalysis *DomainAnalysis `json:"access_analysis"` // Network access analysis | ||||||||
| FirewallAnalysis *FirewallAnalysis `json:"firewall_analysis"` // Firewall log analysis | ||||||||
| MissingTools []MissingToolReport `json:"missing_tools"` // Missing tool reports | ||||||||
| Noops []NoopReport `json:"noops"` // Noop messages | ||||||||
| MCPFailures []MCPFailureReport `json:"mcp_failures"` // MCP server failures | ||||||||
| ArtifactsList []string `json:"artifacts_list"` // List of downloaded artifact files | ||||||||
| JobDetails []JobInfoWithDuration `json:"job_details"` // Job execution details | ||||||||
|
|
@@ -230,7 +241,9 @@ type DownloadResult struct { | |||||||
| AccessAnalysis *DomainAnalysis | ||||||||
| FirewallAnalysis *FirewallAnalysis | ||||||||
| MissingTools []MissingToolReport | ||||||||
| Noops []NoopReport | ||||||||
| MCPFailures []MCPFailureReport | ||||||||
| JobDetails []JobInfoWithDuration | ||||||||
| Error error | ||||||||
| Skipped bool | ||||||||
| LogsPath string | ||||||||
|
|
@@ -701,7 +714,9 @@ func DownloadWorkflowLogs(workflowName string, count int, startDate, endDate, ou | |||||||
| AccessAnalysis: result.AccessAnalysis, | ||||||||
| FirewallAnalysis: result.FirewallAnalysis, | ||||||||
| MissingTools: result.MissingTools, | ||||||||
| Noops: result.Noops, | ||||||||
| MCPFailures: result.MCPFailures, | ||||||||
| JobDetails: result.JobDetails, | ||||||||
| } | ||||||||
| processedRuns = append(processedRuns, processedRun) | ||||||||
| batchProcessed++ | ||||||||
|
|
@@ -795,9 +810,10 @@ func DownloadWorkflowLogs(workflowName string, count int, startDate, endDate, ou | |||||||
| processedRuns = processedRuns[:count] | ||||||||
| } | ||||||||
|
|
||||||||
| // Update MissingToolCount in runs | ||||||||
| // Update MissingToolCount and NoopCount in runs | ||||||||
| for i := range processedRuns { | ||||||||
| processedRuns[i].Run.MissingToolCount = len(processedRuns[i].MissingTools) | ||||||||
| processedRuns[i].Run.NoopCount = len(processedRuns[i].Noops) | ||||||||
| } | ||||||||
|
|
||||||||
| // Build continuation data if timeout was reached and there are processed runs | ||||||||
|
|
@@ -880,7 +896,9 @@ func downloadRunArtifactsConcurrent(runs []WorkflowRun, outputDir string, verbos | |||||||
| AccessAnalysis: summary.AccessAnalysis, | ||||||||
| FirewallAnalysis: summary.FirewallAnalysis, | ||||||||
| MissingTools: summary.MissingTools, | ||||||||
| Noops: summary.Noops, | ||||||||
| MCPFailures: summary.MCPFailures, | ||||||||
|
||||||||
| MCPFailures: summary.MCPFailures, | |
| MCPFailures: summary.MCPFailures, | |
| JobDetails: summary.JobDetails, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 3db46d7. Added JobDetails field to DownloadResult initialization when loading from cached summary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
ProcessedRunstruct is missing theJobDetailsfield in its initialization. TheJobDetailsfield exists in the struct (line 71) and is populated inresult.JobDetailsfrom cached summaries (line 900), but when constructing aProcessedRunfrom a fresh download result, the field is not being assigned.This should be:
Note: This is a pre-existing bug not introduced by this PR, but should be fixed for completeness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 3db46d7. Added JobDetails field to ProcessedRun initialization.