Skip to content

Fix awf logs command failure when binary not installed#15813

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-documentation-issues
Feb 15, 2026
Merged

Fix awf logs command failure when binary not installed#15813
pelikhan merged 2 commits intomainfrom
copilot/fix-documentation-issues

Conversation

Copy link
Contributor

Copilot AI commented Feb 14, 2026

The "Print firewall logs" step fails with awf: command not found when workflows error before the AWF installation step. The step runs unconditionally (if: always()) but assumes awf is available.

Changes

  • Add conditional check in generateFirewallLogParsingStep() before invoking awf logs summary
  • Fall back to simple message when binary unavailable
  • Recompiled all 154 workflow lock files

Implementation

# Only run awf logs summary if awf command exists
if command -v awf &> /dev/null; then
  awf logs summary | tee -a "$GITHUB_STEP_SUMMARY"
else
  echo 'AWF binary not installed, skipping firewall log summary'
fi

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
    • Triggering command: /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)
    • Triggering command: /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)
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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)
    • Triggering command: /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)
    • Triggering command: /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
    • Triggering command: /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)
    • Triggering command: /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)
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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)
    • Triggering command: /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)
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v6 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v6 --jq .object.sha d -n 10 (http block)
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha (http block)
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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)
    • Triggering command: /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)
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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/-
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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)
    • Triggering command: `/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go -d ot found" errors when workflows fail before the awf installation step.

Co-authored-�� 64/bin/go go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet` (http block)

  • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json cfg ndor/bin/git GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linuconfig (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name "prettier" --check 'scripts/**/*GOINSECURE GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login k/gh-aw/gh-aw/pkg/timeutil/formaGOINSECURE k/gh-aw/gh-aw/pkg/timeutil/formaGOMOD 64/bin/go GOSUMDB GOWORK 64/bin/go /opt/hostedtoolc-buildtags -o /tmp/go-build266-errorsas -trimpath 64/bin/go -p main -lang=go1.25 go (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login k/gh-aw/gh-aw/scripts/lint_errorGOINSECURE k/gh-aw/gh-aw/scripts/lint_errorGOMOD 64/bin/go GOSUMDB GOWORK 64/bin/go /opt/hostedtoolc/tmp/go-build524582798/b304/vet.cfg -o /tmp/go-build2660465930/b403/_pkGOINSECURE -trimpath 64/bin/go -p main -lang=go1.25 go (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Reference: https://github.com/github/gh-aw/actions/runs/22026401306/job/63643614467#step:8:1

Fix docs


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

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
Copilot AI requested a review from pelikhan February 15, 2026 00:13
@pelikhan pelikhan marked this pull request as ready for review February 15, 2026 00:15
Copilot AI review requested due to automatic review settings February 15, 2026 00:15
@pelikhan pelikhan merged commit b8f9f56 into main Feb 15, 2026
@pelikhan pelikhan deleted the copilot/fix-documentation-issues branch February 15, 2026 00:15
Copy link
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

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 awf before invoking awf 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.

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.

2 participants