Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Again sha256sum: WARNING as of today #118

Closed
rasdani opened this issue Apr 11, 2024 · 7 comments
Closed

Again sha256sum: WARNING as of today #118

rasdani opened this issue Apr 11, 2024 · 7 comments
Assignees

Comments

@rasdani
Copy link

rasdani commented Apr 11, 2024

Hit these today and a couple of weeks ago again...

#88
#89

version is set to latest in the GH action.

@ivanip-plb
Copy link

Hi there,

We have encountered this issue as well.
TS version: 1.64.1
Passed TS version to GitHub Action

-- Ivan @lifehome

@awly
Copy link
Contributor

awly commented Apr 16, 2024

This could be a caching issue in our https://pkgs.tailscale.com CDN, we've restarted the edge nodes to flush the cache.
Could you check if that fixed your issue?
If not, could you please paste as much of the action output as you can?

@ivanip-plb
Copy link

ivanip-plb commented Apr 17, 2024

Thanks @awly but I think we still not seeing 1.64.1 on pkgs.tailscale.com...
We can see the release on GitHub repo release tho

EDIT: We have now rolledback to 1.64.0 for failover.

-- Ivan @lifehome

@geofox
Copy link

geofox commented Apr 23, 2024

Hi there!

I'm encountering this issue as well with latest TS version: 1.64.2.

Warning: Input 'authkey' has been deprecated with message: An OAuth API client https://tailscale.com/s/oauth-clients is recommended instead of an authkey
Run tailscale/github-action@7a0b30ed3517c2244d1330e39467b95f067a33bd
  with:
    authkey: ***
    version: 1.64.2
 (...)
Run if [ X64 = "ARM64" ]; then
  if [ X64 = "ARM64" ]; then
    TS_ARCH="arm64"
  elif [ X64 = "ARM" ]; then
    TS_ARCH="arm"
  elif [ X64 = "X86" ]; then
    TS_ARCH="386"
  elif [ X64 = "X64" ]; then
    TS_ARCH="amd64"
  else
    TS_ARCH="amd64"
  fi
  MINOR=$(echo "$VERSION" | awk -F '.' {'print $2'})
  if [ $((MINOR % 2)) -eq 0 ]; then
    URL="https://pkgs.tailscale.com/stable/tailscale_${VERSION}_${TS_ARCH}.tgz"
  else
    URL="https://pkgs.tailscale.com/unstable/tailscale_${VERSION}_${TS_ARCH}.tgz"
  fi
  if ! [[ "$SHA256SUM" ]] ; then
    SHA256SUM="$(curl -H user-agent:tailscale-github-action -L "${URL}.sha256")"
  fi
  curl -H user-agent:tailscale-github-action -L "$URL" -o tailscale.tgz --max-time 300
  echo "Expected sha256: $SHA256SUM"
  echo "Actual sha256: $(sha256sum tailscale.tgz)"
  echo "$SHA256SUM  tailscale.tgz" | sha256sum -c
  tar -C /tmp -xzf tailscale.tgz
  rm tailscale.tgz
  TSPATH=/tmp/tailscale_${VERSION}_${TS_ARCH}
  sudo mv "${TSPATH}/tailscale" "${TSPATH}/tailscaled" /usr/bin
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
(...)
    VERSION: 1.64.2
    SHA256SUM: 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    19  100    19    0     0    245      0 --:--:-- --:--:-- --:--:--   246
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    10  100    10    0     0    194      0 --:--:-- --:--:-- --:--:--   196
Expected sha256: failed to get hash
Actual sha256: 7515bf959b73b956ceb967351c7e299cbb3668a53d35f9c770eb72e00d93ced6  tailscale.tgz
sha256sum: 'standard input': no properly formatted SHA256 checksum lines found
Error: Process completed with exit code 1.

@awly
Copy link
Contributor

awly commented Apr 24, 2024

Ahh, I see what's happening.
We didn't build 1.64.1 or 1.64.2 for Linux because neither version contained any changes for Linux (only Synology and Windows).

So when the action runs

    SHA256SUM="$(curl -H user-agent:tailscale-github-action -L "${URL}.sha256")"

It's getting a 500 response and failed to get hash as the body (which you can see logged in Expected sha256.
And downloading the actual tarball

  curl -H user-agent:tailscale-github-action -L "$URL" -o tailscale.tgz --max-time 300

Gets a 404 response with body Not Found which is written into tailscale.tgz.
You can verify that with:

$ echo 'Not Found' | sha256sum
7515bf959b73b956ceb967351c7e299cbb3668a53d35f9c770eb72e00d93ced6  -

For your actions, please use 1.64.0.
I will update the script to catch when a version is not available and return a better message.

@awly
Copy link
Contributor

awly commented Apr 24, 2024

Generally, you can see the latest available Linux version at https://pkgs.tailscale.com/stable/#static.
Or with this on the CLI: curl 'https://pkgs.tailscale.com/stable/?mode=json' | jq .TarballsVersion.

As of today, Github releases are not the most accurate way to find latest available versions for all platforms.

awly added a commit that referenced this issue Apr 24, 2024
If package or SHA download from pkgs.tailscale.com fails with a non-200
repsonse code, make the whole action fail. This catches things like
incorrect versions.

Updates #118
awly added a commit that referenced this issue Apr 24, 2024
If package or SHA download from pkgs.tailscale.com fails with a non-200
repsonse code, make the whole action fail. This catches things like
incorrect versions.

Updates #118
@awly awly self-assigned this Apr 24, 2024
awly added a commit that referenced this issue Apr 24, 2024
If package or SHA download from pkgs.tailscale.com fails with a non-200
repsonse code, make the whole action fail. This catches things like
incorrect versions.

Updates #118
@awly
Copy link
Contributor

awly commented Apr 24, 2024

OK, this should now fail slightly more obviously with tailscale/github-action@main

@awly awly closed this as completed Apr 24, 2024
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

No branches or pull requests

4 participants