Skip to content

Commit

Permalink
workflows: Fix Hubble flow capture in smoke tests
Browse files Browse the repository at this point in the history
The step "Capture cilium-sysdump" currently fails in smoke tests with:

    gzip: stdin: not in gzip format
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    Error: Process completed with exit code 2.

This is happening because we attempt to download the latest hubble
binary at URL github.com/cilium/hubble/releases/download/latest and fail
to decompress the downloaded file. That's because the downloaded file
contains only "Not found".

Indeed, URL cilium/hubble/releases/download/latest doesn't exist, the
correct URL is cilium/hubble/releases/latest/download. Nevermind that
other releases are downloaded at
github.com/cilium/hubble/releases/download/$TAG ¯\_(ツ)_/¯

Fixes: 0cbb855 (".github: Capture hubble flows when smoke test fails")
Signed-off-by: Paul Chaignon <paul@cilium.io>
  • Loading branch information
pchaigno authored and ti-mo committed Aug 13, 2021
1 parent a4ca179 commit 822bfa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-smoke-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
# file (EOF) on stdin and displaying no flows.
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
run: |
version="$(curl -sL0 'https://api.github.com/repos/cilium/hubble/releases/latest' | jq -r .tag_name)"
version=$(curl -s https://raw.githubusercontent.com/cilium/hubble/master/stable.txt)
curl -sLO "https://github.com/cilium/hubble/releases/download/${version}/hubble-linux-amd64.tar.gz"
tar zxf hubble-linux-amd64.tar.gz
chmod +x ./hubble
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests-smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ jobs:
# file (EOF) on stdin and displaying no flows.
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
run: |
curl -sLO https://github.com/cilium/hubble/releases/download/latest/hubble-linux-amd64.tar.gz
version=$(curl -s https://raw.githubusercontent.com/cilium/hubble/master/stable.txt)
curl -sLO "https://github.com/cilium/hubble/releases/download/${version}/hubble-linux-amd64.tar.gz"
tar zxf hubble-linux-amd64.tar.gz
chmod +x ./hubble
touch hubble-flows.json
Expand Down

0 comments on commit 822bfa5

Please sign in to comment.