[log] Add debug logging to 5 workflow pkg files#18208
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parsePushTrigger(branch/tags patterns),parsePullRequestTrigger(merged condition),parseIssueTrigger(activity type with/without label filter), andparseManualTrigger(with/without input spec)applySafeOutputEnvToMap(staged/trial mode details),buildSafeOutputJobEnvVars(staged flag and target repo source), andbuildEngineMetadataEnvVars(engine id/version)parseUpdateEntityConfigWithFieldsshowing entity type, config key, and field countOrderMapFieldsshowing total and priority field countsvalidateNetworkAllowedDomainsandvalidateSafeOutputsAllowedDomainsAll files already had their own
logger.New("workflow:...")declarations; this PR adds meaningful call-site logging following the existingpkg:filenamenaming convention.Test plan
make buildpasses with no compilation errorsgo test ./pkg/workflow/... -shortpasses (all workflow tests green)go vet ./pkg/workflow/...passes with no issues*_test.gountouched)🤖 Generated with [Claude Code]((claude.com/redacted)