Skip to content

[log] Add debug logging to 5 workflow pkg files#30747

Merged
pelikhan merged 1 commit intomainfrom
add-debug-logging-workflow-pkg-25d32afd90a26b14
May 7, 2026
Merged

[log] Add debug logging to 5 workflow pkg files#30747
pelikhan merged 1 commit intomainfrom
add-debug-logging-workflow-pkg-25d32afd90a26b14

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 7, 2026

Adds meaningful debug log calls to code paths that previously had no visibility under DEBUG=workflow:*.

Changes

pkg/workflow/runtime_overrides.go

  • Log when a runtime ID is not in existing requirements (entering the else branch)
  • Log when cloning a known runtime with custom action config vs. using it as-is
  • Log when creating a new RuntimeRequirement from a known runtime
  • Log when skipping an unknown runtime with no action-repo specified

pkg/workflow/engine_api_targets.go

  • GetCopilotAPITarget: entry log + log which resolution path is taken (explicit api-target vs. derived from GITHUB_COPILOT_BASE_URL)
  • GetGeminiAPITarget: entry log + log which path is taken (custom GEMINI_API_BASE_URL, default endpoint, or empty)

pkg/workflow/slash_command_parser.go

  • expandSlashCommandShorthand: log the expansion (/commandslash_command + workflow_dispatch)

pkg/workflow/label_trigger_parser.go

  • parseLabelTriggerShorthand: log when input does not match any label trigger pattern
  • getItemTypeName: log the resolved human-readable type name

pkg/workflow/service_ports.go

  • parsePortSpec: log entry with spec value and type
  • Log when integer port specs are parsed successfully
  • Log when UDP or unsupported-protocol ports are skipped
  • Log when a port range is expanded (count and bounds)

Testing

All changes follow the established logger patterns for each file. The make build target fails in this environment due to a pre-existing Go toolchain version mismatch (go.mod requires 1.25.8, environment has 1.24.13 with GOTOOLCHAIN=local). The changes are syntactically valid additions of log.Print/log.Printf calls using pre-existing logger variables.

Generated by Go Logger Enhancement · ● 1.8M ·

  • expires on May 9, 2026, 4:42 AM UTC

Adds meaningful debug log calls to branches and functions that
previously had no visibility when running with DEBUG=workflow:*.

Files changed:
- runtime_overrides.go: log unknown runtime handling and new requirement creation
- engine_api_targets.go: log entry and resolution path for GetCopilotAPITarget/GetGeminiAPITarget
- slash_command_parser.go: log expandSlashCommandShorthand expansion
- label_trigger_parser.go: log non-matching patterns and getItemTypeName result
- service_ports.go: log parsePortSpec entry, port range parsing, and protocol skips

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels May 7, 2026
@pelikhan pelikhan merged commit 9bc24fc into main May 7, 2026
@pelikhan pelikhan deleted the add-debug-logging-workflow-pkg-25d32afd90a26b14 branch May 7, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant