Skip to content

[WIP] Fix inconsistent logging guard in error constructors#27990

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-inconsistent-logging-guard
Apr 23, 2026
Merged

[WIP] Fix inconsistent logging guard in error constructors#27990
pelikhan merged 2 commits intomainfrom
copilot/fix-inconsistent-logging-guard

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

  • Locate current error constructor logging patterns and related tests
  • Run baseline validation (build/tests) before code changes
  • Add errorHelpersLog.Enabled() guards to NewValidationError and NewConfigurationError
  • Add focused tests for guarded logging behavior
  • Run targeted workflow package tests
  • Run full required pre-commit validation (make agent-finish)
  • Run parallel validation (Code Review + CodeQL) and address any findings

@pelikhan pelikhan marked this pull request as ready for review April 23, 2026 06:06
Copilot AI review requested due to automatic review settings April 23, 2026 06:07
@pelikhan pelikhan merged commit 42428d9 into main Apr 23, 2026
16 of 19 checks passed
@pelikhan pelikhan deleted the copilot/fix-inconsistent-logging-guard branch April 23, 2026 06:07
Copilot stopped work on behalf of pelikhan due to an error April 23, 2026 06:07
Copilot AI requested a review from pelikhan April 23, 2026 06:07
Copy link
Copy Markdown
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

Adds consistent errorHelpersLog.Enabled() guards around debug logging in workflow error constructors to match the existing guarded pattern used elsewhere.

Changes:

  • Guard errorHelpersLog.Printf(...) calls in NewValidationError
  • Guard errorHelpersLog.Printf(...) calls in NewConfigurationError
Show a summary per file
File Description
pkg/workflow/workflow_errors.go Adds Enabled() checks before emitting constructor debug logs for validation/config errors.

Copilot's findings

Tip

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@github-actions github-actions Bot mentioned this pull request Apr 23, 2026
github-actions Bot added a commit that referenced this pull request Apr 23, 2026
…rrors.go

PR #27990 fixed the missing Enabled() guard on errorHelpersLog calls.
Apply the same pattern consistently to errorAggregationLog and
sharedWorkflowLog calls in the same file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent logging guard in error constructors causes unconditional log allocations

3 participants