ali5ter / homebrew-vke-cli

🍺 macOS Homebrew formula to install VMware Cloud PKS (formally VKE) CLI
2 stars 0 forks source link

brew upgrade throwing SHA mismatch with latest build #1

Closed embano1 closed 3 years ago

embano1 commented 6 years ago

See here: https://github.com/ali5ter/homebrew-vke-cli/commit/d917914891feb764287cf11e9db2c63e88b27108

ali5ter commented 6 years ago

I'm not having much luck with getting brew upgrade/reinstall to delete the archived download. This is what makes the SHA check fail.

Manually removing the archived file allows the updated binary to be downloaded so the SHA check works, providing a clean upgrade.

However, I'd like to know how I get brew to clear out the archived download.

ali5ter commented 6 years ago

Interestingly, the last couple of updates to the tap have reinstalled the VKE cli perfectly... downloaded the new binary and SHA checked without issue. Thing is, nothing changed about the way I update the tap.

@embano1 have you had this experience?

embano1 commented 6 years ago

Having no luck here with this formula :(

➜  ~ brew update
Updated 5 taps (ali5ter/vke-cli, homebrew/bundle, homebrew/cask, homebrew/core and linuxkit/linuxkit).

➜  ~ brew info vke-cli
ali5ter/vke-cli/vke-cli: stable 0.9.0.58-1c86326
Command-line tool for VMware Kuberentes Engine
https://cloud.vmware.com/vmware-kubernetes-engine
/usr/local/Cellar/vke-cli/0.9 (3 files, 27.2MB)
  Built from source on 2018-08-29 at 23:35:19
/usr/local/Cellar/vke-cli/0.9.0.53-d398955 (3 files, 26.6MB) *
  Built from source on 2018-10-08 at 17:34:59
From: https://github.com/ali5ter/homebrew-vke-cli/blob/master/vke-cli.rb

➜  ~ brew outdated
ansible (2.6.5) < 2.7.0
hugo (0.49) < 0.49.2
node (10.11.0) < 10.12.0
ali5ter/vke-cli/vke-cli (0.9, 0.9.0.53-d398955) < 0.9.0.58-1c86326

➜  ~ brew upgrade vke-cli
==> Upgrading 1 outdated package:
ali5ter/vke-cli/vke-cli 0.9.0.53-d398955 -> 0.9.0.58-1c86326
==> Upgrading ali5ter/vke-cli/vke-cli
==> Downloading https://s3-us-west-2.amazonaws.com/cascade-cli-download/pre-prod-us-west-2/latest/mac/vke
Already downloaded: /Users/mgasch/Library/Caches/Homebrew/downloads/06d3b4d83c75122e23ecbd9aed361432fad5e436d93cf7e20f929d47d02093e2--vke
Error: An exception occurred within a child process:
  ChecksumMismatchError: SHA256 mismatch
Expected: f21d4083739d8ffced51190d4c0e88f2772da27f726fffed65b409f08cbaa8d1
Actual: bf4a2f1be14d6aceab2ca8235e1b40526d8f306ae0a5cbe54ce3c3453e501721
Archive: /Users/mgasch/Library/Caches/Homebrew/downloads/06d3b4d83c75122e23ecbd9aed361432fad5e436d93cf7e20f929d47d02093e2--vke
To retry an incomplete download, remove the file above.

Even worse, I cannot install it anymore.

➜  ~ brew uninstall --force vke-cli
➜  ~ rm Library/Caches/Homebrew/downloads/*vke
➜  ~ brew install vke-cli
==> Installing vke-cli from ali5ter/vke-cli
==> Downloading https://s3-us-west-2.amazonaws.com/cascade-cli-download/pre-prod-us-west-2/latest/mac/vke
######################################################################## 100.0%
Error: An exception occurred within a child process:
  ChecksumMismatchError: SHA256 mismatch
Expected: f21d4083739d8ffced51190d4c0e88f2772da27f726fffed65b409f08cbaa8d1
Actual: 871138c72cd0609522f36bbf759b1ff0fa6eff23847f427f7d11e832f4e828d8
Archive: /Users/mgasch/Library/Caches/Homebrew/downloads/06d3b4d83c75122e23ecbd9aed361432fad5e436d93cf7e20f929d47d02093e2--vke
To retry an incomplete download, remove the file above.

Please notice the different actual SHA checksums. Perhaps there is an issue now with the CLI on S3 and your formula as it pulls latest?

embano1 commented 6 years ago

I think it's because the vke CLI has changed meanwhile since it's an external dependency you don't copy into the repo/ not versioned.

After curl (as of Oct 13th, 8pm):

➜  Downloads shasum -a 256 vke
871138c72cd0609522f36bbf759b1ff0fa6eff23847f427f7d11e832f4e828d8  vke
ali5ter commented 6 years ago

Sounds credible. I could check for binary update on a tighter cycle but ideally, the eng team would take over the creation of this tap as part of their CD pipeline.

ali5ter commented 6 years ago

@embano1 the last couple of commits have been automatically triggered within 30 minutes of a build. Wondering if you've seen any improvement?

embano1 commented 6 years ago

@ali5ter nice, it's gotten better. Tried ~30min ago and it failed due to mismatch. Saw your recent commit update which fixed it (for now). Thx