Move skip-if-match/skip-if-no-match console output to debug logging#16671
Move skip-if-match/skip-if-no-match console output to debug logging#16671
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR reduces console noise during compilation by moving skip-if-match and skip-if-no-match diagnostic messages from verbose console output to debug logging. These configuration messages are now only displayed when the DEBUG=workflow:stop_after (or DEBUG=*) environment variable is set.
Changes:
- Removed verbose flag checks from skip-if-match/skip-if-no-match configuration logging
- Converted console output calls to debug logger calls using the existing
stopAfterLoglogger - Applied changes symmetrically to both skip-if-match and skip-if-no-match functions
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if workflowData.SkipIfMatch != nil { | ||
| if workflowData.SkipIfMatch.Max == 1 { | ||
| fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("Skip-if-match query configured: %s (max: 1 match)", workflowData.SkipIfMatch.Query))) | ||
| stopAfterLog.Printf("Skip-if-match query configured: %s (max: 1 match)", workflowData.SkipIfMatch.Query) | ||
| } else { | ||
| fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("Skip-if-match query configured: %s (max: %d matches)", workflowData.SkipIfMatch.Query, workflowData.SkipIfMatch.Max))) | ||
| stopAfterLog.Printf("Skip-if-match query configured: %s (max: %d matches)", workflowData.SkipIfMatch.Query, workflowData.SkipIfMatch.Max) | ||
| } | ||
| } |
There was a problem hiding this comment.
While the conversion of skip-if-match console output to debug logging is good, there's an inconsistency with similar stop-after diagnostic messages in the same file (lines 81, 83, 90, 103, 105) that still use fmt.Fprintln(os.Stderr, console.FormatInfoMessage(...)) with verbose checks. For consistency and to reduce console noise uniformly, consider converting those messages to debug logging as well using stopAfterLog.Printf(). All these messages are diagnostic information in the same category (workflow:stop_after namespace), so they should follow the same pattern.
Console output for skip-if-match and skip-if-no-match configuration was always printed during compilation, adding noise to the output. These messages are diagnostic information that should only appear when debugging.
Changes
stopAfterLogloggerDEBUG=workflow:stop_afterenvironment variableBefore:
After:
Messages now appear only when
DEBUG=workflow:stop_afterorDEBUG=*is set, reducing console noise while preserving diagnostic capabilities.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw npm 64/bin/go git init�� 64/bin/go 1PS_GbLMV9hN /opt/hostedtoolcache/node/24.13.0/x64/bin/node ath ../../../.prgit ../../../**/*.jsrev-parse 64/bin/go node(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v3/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha 15/001/test-frontmatter-with-nested-objects.md GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE fileutil GOMODCACHE go env 0658-37522/test-2358302073/.github/workflows GO111MODULE nfig/composer/vendor/bin/sh GOINSECURE GOMOD ode-gyp-bin/node--show-toplevel ortcfg(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha audit-workflows.md GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/link env 2007526/b401/repoutil.test GO111MODULE 2007526/b401/importcfg.link GOINSECURE GOMOD GOMODCACHE wmvwlVjEnf88q/rlg_4reGrU6lgaN24-vo/9kfMsjtzGOFIi51OI_-c/tFE_Q0UwmvwlVjEnf88q(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha vaScript2681355415/001/test-simple-frontmatter.md GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 2007526/b292/vet.cfg GOINSECURE GOMOD GOMODCACHE node(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha /tmp/go-build4232007526/b406/_pkg_.a -trimpath /usr/bin/git -p github.com/githurev-parse -lang=go1.25 git -C /tmp/gh-aw-test-runs/20260218-230658-37522/test-257671567 status /usr/bin/git .github/workflowgit -nolocalimports -importcfg git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v5/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha ty-test.md GO111MODULE tions/setup/node_modules/.bin/node GOINSECURE GOMOD GOMODCACHE go tion�� -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha 64/bin/go sh om/testorg/testrepo.git tierignore ache/go/1.25.0/xrev-parse 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile -o r/repo.git -trimpath /usr/bin/git -p main -lang=go1.25 git(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -c go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -json GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build4232007526/b108/vet.cfg /usr/bin/git -json GO111MODULE ode_modules/.bin--show-toplevel git(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v8/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -c=4 -nolocalimports -importcfg /tmp/go-build2726142616/b386/importcfg -pack /home/REDACTED/.cache/go-build/28/2888c116b4dd41c7e454d91f71379455c9ea3ccc6f11da9d7908e60710d24506-d node /opt�� prettier --write 64/bin/go !../../../pkg/wo/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile --ignore-path ../../../.pretti/tmp/go-build2726142616/b389/_pkg_.a go(http block)Co-authoenv run-script/lib/n-json go env h ../../../.prettierignore GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go` (http block)
Co-authostatus 64/bin/go go` (http block)
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.