Remove noisy negative-result messages from compile output#23878
Remove noisy negative-result messages from compile output#23878
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d823cd69-e421-44e1-9dda-613f5cd7e7fa Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Remove warning when stats list is empty (silently skip) - Remove 'No orphaned .lock.yml files found to purge' from verbose output - Update TestDisplayStatsTable_Empty to expect no output Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d823cd69-e421-44e1-9dda-613f5cd7e7fa Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Reduces compile-time console noise by removing “negative result” messages, and updates one workflow lockfile.
Changes:
- Suppress the “No workflow statistics to display” warning by returning silently on empty stats.
- Remove the verbose-mode “No orphaned .lock.yml files found to purge” message.
- Update the empty-stats unit test expectation; additionally updates a workflow
.lock.ymlfile (version/config changes).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/cli/compile_stats.go | Stops emitting a warning when there are no workflow stats to display. |
| pkg/cli/compile_stats_test.go | Adjusts the empty-stats test to expect no stderr output. |
| pkg/cli/compile_batch_operations.go | Removes a verbose-mode “no orphaned files” informational message. |
| .github/workflows/smoke-service-ports.lock.yml | Updates pinned versions/config and various workflow behaviors (appears unrelated to the stated PR goal). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func displayStatsTable(statsList []*WorkflowStats) { | ||
| compileStatsLog.Printf("Displaying stats table: workflow_count=%d", len(statsList)) | ||
| if len(statsList) == 0 { | ||
| fmt.Fprintln(os.Stderr, console.FormatWarningMessage("No workflow statistics to display")) | ||
| return | ||
| } |
There was a problem hiding this comment.
displayStatsTable now returns with no user-facing output when statsList is empty, but it still emits a debug log line to stderr before the empty check (compileStatsLog.Printf(...)). Because logger enablement is determined at init time from DEBUG/ACTIONS_RUNNER_DEBUG, this can cause unexpected stderr output (and will break the updated empty-output test) when debug logging is enabled. Consider moving the compileStatsLog.Printf after the len(statsList) == 0 early return, or otherwise avoid writing to stderr for the empty case.
See below for a potential fix:
if len(statsList) == 0 {
return
}
compileStatsLog.Printf("Displaying stats table: workflow_count=%d", len(statsList))
| GH_AW_INFO_EXPERIMENTAL: "false" | ||
| GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" | ||
| GH_AW_INFO_STAGED: "false" | ||
| GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","github"]' | ||
| GH_AW_INFO_FIREWALL_ENABLED: "true" | ||
| GH_AW_INFO_AWF_VERSION: "v0.25.1" | ||
| GH_AW_INFO_AWF_VERSION: "v0.25.5" | ||
| GH_AW_INFO_AWMG_VERSION: "" |
There was a problem hiding this comment.
This workflow lock file includes substantial changes (AWF/mcpg version bumps, new env exclusions, artifact patterns, detection job gating, etc.) that are unrelated to the PR’s stated goal of reducing make recompile CLI output noise. If these workflow changes are intentional, they should be called out in the PR description; otherwise consider reverting/splitting them into a separate PR to keep scope focused and reviewable.
|
@copilot merge main, recompile, review comments |
…t-text-compile-command # Conflicts: # .github/workflows/smoke-service-ports.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Ensures no debug log output occurs for the empty-list case, which would break the empty-output test when DEBUG logging is enabled. Also runs make recompile after merging main. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/70351163-57b6-4d6c-a3dc-6b5b4f150637 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done — merged main, recompiled all lock files, and addressed the review comment (moved Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
make recompilewas emitting two low-value "nothing happened" messages that cluttered the tail of every run.Changes
compile_stats.go:displayStatsTablenow returns silently when the stats list is empty (was:⚠ No workflow statistics to display). In directory-scan modeconfig.MarkdownFilesis empty, so stats are never collected — making this warning appear on every standardmake recompilerun.compile_batch_operations.go: Dropped the verbose-modeℹ No orphaned .lock.yml files found to purgemessage. Negative-result confirmations add noise without signal.compile_stats_test.go: UpdatedTestDisplayStatsTable_Emptyto assert zero output.Before / After