Problem
parseUpdateEntityConfig in pkg/workflow/update_entity_helpers.go logs identical messages to two different loggers at the same call site, producing duplicate output in debug logs.
Locations
Lines 128–129 — identical message logged twice:
updateEntityHelpersLog.Printf("Parsing %s configuration", params.ConfigKey)
logger.Printf("Parsing %s configuration", params.ConfigKey)
Lines 136–137 — near-duplicate messages logged twice:
updateEntityHelpersLog.Printf("Invalid target-repo configuration for %s", params.ConfigKey)
logger.Print("Invalid target-repo configuration")
updateEntityHelpersLog is logger.New("workflow:update_entity_helpers") while logger is the caller-provided logger (e.g. logger.New("workflow:update_issues")). Both emit the same message to different prefixed channels.
Impact
Every call to parseUpdateEntityConfig (which handles update-issue, update-pull-request, update-discussion, etc.) emits each status message twice. This doubles the noise in debug output and makes logs harder to read when diagnosing config parsing issues.
Recommendation
Remove the updateEntityHelpersLog calls at lines 128 and 136 — they duplicate what the caller-provided logger already says. Keep the logger calls (they carry more specific context via their prefix):
// Before
updateEntityHelpersLog.Printf("Parsing %s configuration", params.ConfigKey)
logger.Printf("Parsing %s configuration", params.ConfigKey)
// After
logger.Printf("Parsing %s configuration", params.ConfigKey)
// Before
updateEntityHelpersLog.Printf("Invalid target-repo configuration for %s", params.ConfigKey)
logger.Print("Invalid target-repo configuration")
// After
logger.Printf("Invalid target-repo configuration for %s", params.ConfigKey)
Note: the file-level updateEntityHelpersLog is still useful for the detail-only log on line 141 ("Parsed target config for %s: target=%s") which has no counterpart in the caller logger. Keep that one.
Severity
- Low — no functional impact, debug log noise only
Validation
Generated by Sergo - Serena Go Expert · ● 901.5K · ◷
Problem
parseUpdateEntityConfiginpkg/workflow/update_entity_helpers.gologs identical messages to two different loggers at the same call site, producing duplicate output in debug logs.Locations
Lines 128–129 — identical message logged twice:
Lines 136–137 — near-duplicate messages logged twice:
updateEntityHelpersLogislogger.New("workflow:update_entity_helpers")whileloggeris the caller-provided logger (e.g.logger.New("workflow:update_issues")). Both emit the same message to different prefixed channels.Impact
Every call to
parseUpdateEntityConfig(which handlesupdate-issue,update-pull-request,update-discussion, etc.) emits each status message twice. This doubles the noise in debug output and makes logs harder to read when diagnosing config parsing issues.Recommendation
Remove the
updateEntityHelpersLogcalls at lines 128 and 136 — they duplicate what the caller-providedloggeralready says. Keep theloggercalls (they carry more specific context via their prefix):Note: the file-level
updateEntityHelpersLogis still useful for the detail-only log on line 141 ("Parsed target config for %s: target=%s") which has no counterpart in the caller logger. Keep that one.Severity
Validation
go build ./pkg/workflow/passesgo test ./pkg/workflow/...passes