Fix awf logs command failure when binary not installed#15813
Merged
Conversation
Add conditional check for awf binary existence before running logs command. This prevents "command not found" errors when workflows fail before the awf installation step. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix documentation for better clarity
Fix awf logs command failure when binary not installed
Feb 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the "Print firewall logs" step fails with awf: command not found errors when workflows fail before the AWF binary is installed. The step runs unconditionally with if: always() to capture diagnostic information, but previously assumed the awf binary would always be available.
Changes:
- Added conditional check using
command -v awfbefore invokingawf logs summary - Falls back to informational message when binary is unavailable
- Recompiled all 154 workflow lock files to propagate the change
Reviewed changes
Copilot reviewed 151 out of 151 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/workflow/copilot_srt.go | Added conditional check in generateFirewallLogParsingStep() to verify awf binary exists before running awf logs summary |
| .github/workflows/*.lock.yml (154 files) | Recompiled workflow files reflecting the source code change with consistent conditional check pattern |
💡 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.
The "Print firewall logs" step fails with
awf: command not foundwhen workflows error before the AWF installation step. The step runs unconditionally (if: always()) but assumesawfis available.Changes
generateFirewallLogParsingStep()before invokingawf logs summaryImplementation
This prevents errors in cleanup steps while maintaining diagnostic output when the binary is present.
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(http block)/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 l ary.lock.yml s.lock.yml sues�� ent.js lock.yml r: $owner, name: $name) { hasDiscussionsEnabled } } e-checker.lock.yinfocmp .yml ndexer.lock.yml yml(http block)/usr/bin/gh gh repo view --json owner,name --jq .owner.login + "/" + .name x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE -T/_BxSrvr518bVzIowa0fT/5ZdtXnpY-tests(http block)https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha runs/20260215-000950-31981/test-884476002/.github/workflows go ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile l GO111MODULE 64/bin/go ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile pack�� 4554290/b412/_pkg_.a --revs 4554290/b412=> --thin --delta-base-offrev-parse -q infocmp(http block)https://api.github.com/repos/actions/ai-inference/git/ref/tags/v2/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v2 --jq .object.sha(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha(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 0950-31981/test-1058052380/.github/workflows GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/cgo -V=f�� rd GOPROXY ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOSUMDB GOWORK 64/bin/go ache/go/1.25.0/x64/pkg/tool/linuorigin(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 -unreachable=false /tmp/go-build524582798/b204/vet.cfg /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 -ato�� -bool -buildtags 0/x64/bin/node -errorsas -ifaceassert -nilfunc git(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha UGHoYtrm6 /tmp/go-build524582798/b213/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu-nilfunc ck 'scripts/**/*git GO111MODULE 64/bin/go ortcfg -ato�� g/stringutil/identifiers.go g/stringutil/paths.go /usr/bin/git -errorsas -ifaceassert -nilfunc git(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha user.name Test User /usr/bin/git -json GO111MODULE x_amd64/vet git rev-�� --show-toplevel JPSS3kBf_jbJ /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel 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 -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linuinitial commit env -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 4554290/b414/testutil.test -trimpath 4554290/b414/importcfg.link -p main -lang=go1.25 4qBSgoBRlrikz/avxLPGO5v5ZsAOsG8WsF/788KaSlanoh1QIKEP8dB/iAJz33n4qBSgoBRlrikz rev-�� ry=1 -goversion 4554290/b414/_pkg_.a -c=4 -nolocalimports -importcfg git(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel resolved$ /usr/bin/git -json GO111MODULE x_amd64/vet git conf�� user.email test@example.com /opt/hostedtoolcache/node/24.13.0/x64/bin/node -json GO111MODULE 64/pkg/tool/linu--show-toplevel /opt/hostedtoolcache/node/24.13.0/x64/bin/node(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/actions/download-artifact/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v7/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha(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 go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build4164554290/b001/importcfg -pack /tmp/go-build4164554290/b001/_testmain.go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -c=4 -nolocalimports -importcfg /tmp/go-build4164554290/b385/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil_test.go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build4164554290/b389/importcfg -pack /tmp/go-build4164554290/b389/_testmain.go red-�� -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha 4554290/b388/_pkg_.a /tmp/go-build524582798/b209/vet.cfg 4554290/b388=> ck 'scripts/**/*git b/gh-aw/pkg/giturev-parse 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linuremote.origin.url estl�� -instructions-test-522027059/.github/workflows -buildtags 4554290/b403/repoutil.test l -ifaceassert -nilfunc 4554290/b403/repoutil.test(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/v5/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha 4554290/b386/fileutil.test /tmp/go-build524582798/b206/vet.cfg x_amd64/link -json GO111MODULE 64/bin/go x_amd64/link -ato�� ry=1 -buildtags 4554290/b386/_pkg_.a -errorsas -ifaceassert -nilfunc 3D/WNEPFS_i731ZvubPW_w0/HxzdFUyaMfa_0JXGP7CA(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v6 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v6 --jq .object.sha d -n 10(http block)/usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v6 --jq .object.sha TOKEN"; }; f get-f TOKEN"; }; f getowner=github r: $owner, name:-f hub.com/.extrahe/usr/bin/gh(http block)https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0/usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha(http block)https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6/usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/docker/login-action/git/ref/tags/v3/usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha(http block)https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5/usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha(http block)https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3/usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha(http block)/usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha ock.yml ml(http block)https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts/usr/bin/gh gh run download 1 --dir test-logs/run-1 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json cfg /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts/usr/bin/gh gh run download 12345 --dir test-logs/run-12345 cfg x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json cfg /opt/hostedtoolcache/go/1.25.0/x-nolocalimports GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts/usr/bin/gh gh run download 12346 --dir test-logs/run-12346 cfg x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json cfg /opt/hostedtoolcache/go/1.25.0/x-importcfg GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts/usr/bin/gh gh run download 2 --dir test-logs/run-2 cfg x_amd64/compile GOINSECURE GOMOD GOMODCACHE sgw2_FH/u8JdOIC9JPSS3kBf_jbJ env -json cfg x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link(http block)https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts/usr/bin/gh gh run download 3 --dir test-logs/run-3 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json cfg /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts/usr/bin/gh gh run download 4 --dir test-logs/run-4 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts/usr/bin/gh gh run download 5 --dir test-logs/run-5 cfg x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env ty-test.md cfg /opt/hostedtoolcache/go/1.25.0/x-importcfg GOINSECURE GOMOD GOMODCACHE RN/AERBTSiwFBTdGDiIa9qx/amxpLx1v-buildtags(http block)https://api.github.com/repos/github/gh-aw/actions/workflows/usr/bin/gh gh workflow list --json name,state,path --check scripts/**/*.js 64/bin/go .prettierignore -f 64/bin/go go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet(http block)/usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet(http block)/usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE 64/pkg/tool/linu-dwarf=false env -json cfg 64/pkg/tool/linu-nolocalimports GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/c4e091835c7a94dc7d3acb8ed3ae145afb4995f3/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/c4e091835c7a94dc7d3acb8ed3ae145afb4995f3 --jq .object.sha(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha 1058052380/.github/workflows GO111MODULE cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/cgo env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuorigin(http block)https://api.github.com/repos/githubnext/agentics/git/ref/tags/-/usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha(http block)https://api.github.com/repos/nonexistent/repo/actions/runs/12345/usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE sQ/vhWiHsIFjr6MtTK7uioo/m6ss-PUIrev-parse env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/owner/repo/actions/workflows/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go -d --jq 64/bin/go go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet(http block)Co-authored-�� 64/bin/go go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet` (http block)
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.