Skip to content

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

Merged
pelikhan merged 3 commits intomainfrom
go-logger/add-logging-2026-02-24-776c9441dbfb8ec0
Feb 24, 2026
Merged

[log] Add debug logging to 5 workflow pkg files#18208
pelikhan merged 3 commits intomainfrom
go-logger/add-logging-2026-02-24-776c9441dbfb8ec0

Conversation

@github-actions
Copy link
Contributor

Summary

  • trigger_parser.go: Added debug logging to parsePushTrigger (branch/tags patterns), parsePullRequestTrigger (merged condition), parseIssueTrigger (activity type with/without label filter), and parseManualTrigger (with/without input spec)
  • safe_outputs_env.go: Added logging to applySafeOutputEnvToMap (staged/trial mode details), buildSafeOutputJobEnvVars (staged flag and target repo source), and buildEngineMetadataEnvVars (engine id/version)
  • update_entity_helpers.go: Added entry/completion logging to parseUpdateEntityConfigWithFields showing entity type, config key, and field count
  • yaml.go: Added logging to OrderMapFields showing total and priority field counts
  • safe_outputs_domains_validation.go: Added logging for ecosystem identifier skips and validation pass/fail outcomes in both validateNetworkAllowedDomains and validateSafeOutputsAllowedDomains

All files already had their own logger.New("workflow:...") declarations; this PR adds meaningful call-site logging following the existing pkg:filename naming convention.

Test plan

  • make build passes with no compilation errors
  • go test ./pkg/workflow/... -short passes (all workflow tests green)
  • go vet ./pkg/workflow/... passes with no issues
  • No test files modified (*_test.go untouched)
  • No log arguments compute side effects or call functions

🤖 Generated with [Claude Code]((claude.com/redacted)

Generated by Go Logger Enhancement

  • expires on Feb 26, 2026, 8:35 PM UTC

Enhanced 5 workflow package files with meaningful debug logging to improve
observability and aid troubleshooting during development:

- trigger_parser.go: Log parsed trigger types (push-to-branch, push-tags,
  pull_request merged, issue with/without label filter, manual with/without input)
- safe_outputs_env.go: Log env var setup details (staged mode, target repo slug,
  upload assets config, engine metadata)
- update_entity_helpers.go: Log entity config parsing entry/completion with
  entity type, config key, and field count
- yaml.go: Log OrderMapFields field counts for YAML generation tracing
- safe_outputs_domains_validation.go: Log ecosystem identifier skips and
  validation pass/fail outcomes for network and safe-outputs domains

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added automation enhancement New feature or request labels Feb 24, 2026
@pelikhan pelikhan marked this pull request as ready for review February 24, 2026 21:07
Copilot AI review requested due to automatic review settings February 24, 2026 21:07
@pelikhan pelikhan merged commit 8cd53f9 into main Feb 24, 2026
@pelikhan pelikhan deleted the go-logger/add-logging-2026-02-24-776c9441dbfb8ec0 branch February 24, 2026 21:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds debug logging to 5 workflow package files to improve observability and troubleshooting capabilities. The logging follows the established logger.New("workflow:...") convention already present in these files and adds meaningful call-site logging at key decision points.

Changes:

  • Added debug logging to trigger parsing functions for various GitHub event types (push, pull_request, issue, manual)
  • Added logging to environment variable building functions for safe outputs configuration
  • Added entry/exit logging to entity config parsing and domain validation functions
  • Added logging to YAML field ordering operations

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/workflow/trigger_parser.go Added logging for push-to-branch, push-tags, pull_request merged, issue triggers (with/without label filter), and manual triggers (with/without input spec)
pkg/workflow/safe_outputs_env.go Added logging for safe output env vars application, upload assets configuration, staged flag setting, target repo slug configuration, and engine metadata building
pkg/workflow/update_entity_helpers.go Added entry and completion logging to parseUpdateEntityConfigWithFields showing entity type, config key, and field count
pkg/workflow/yaml.go Added logging to OrderMapFields showing total and priority field counts
pkg/workflow/safe_outputs_domains_validation.go Added logging for ecosystem identifier skips and validation pass/fail outcomes in both network and safe-outputs domain validation functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants