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

Version 0.12.0 access denied #95

Closed
gudlyf opened this issue Oct 22, 2018 · 10 comments
Closed

Version 0.12.0 access denied #95

gudlyf opened this issue Oct 22, 2018 · 10 comments
Labels

Comments

@gudlyf
Copy link

gudlyf commented Oct 22, 2018

Unable to install the latest rev with tfenv install latest:

$ tfenv install latest
[INFO] Installing Terraform v0.12.0
[INFO] Downloading release tarball from https://releases.hashicorp.com/terraform/0.12.0/terraform_0.12.0_darwin_amd64.zip

curl: (22) The requested URL returned error: 403
tfenv: tfenv-install: [ERROR] Tarball download failed

$ curl https://releases.hashicorp.com/terraform/0.12.0/terraform_0.12.0_darwin_amd64.zip
<html>
<head><title>403 Forbidden</title></head>
<body>
<h1>403 Forbidden</h1>
<ul>
<li>Code: AccessDenied</li>
<li>Message: Access Denied</li>
<li>RequestId: 4D023BBCC1D75718</li>
<li>HostId: OrVESzbzg6GGSIGvjNBARDzl4PqstNHYemdTmmKBe/O2OvqKD3AoGQEkaD/LhJocyw+A9q9BNB8=</li>
</ul>
<hr/>
</body>
</html>```
@iamhsa
Copy link
Contributor

iamhsa commented Oct 23, 2018

It's because 0.12.0 does not exist

$ tfenv list-remote
0.12.0-alpha1
...

I have make PR for this : #94
But currently unit tests are KO :-( ...
I'm looking why.

@geetarista
Copy link

If you look at the build history master has been failing for a few months:

https://travis-ci.org/Zordrak/tfenv/builds

@minamijoyo
Copy link

minamijoyo commented Oct 25, 2018

@iamhsa Hi,
Thank you for working on this.

At the time of writing, terraform v0.12-alpha1 still has some features unimplemented, it has many bugs, and it is not yet mature for general users to use it.
I think that it is very dangerous to install the alpha release with tfenv install latest, not knowing what you are doing.

See current limitations:
https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md#0120-alpha1-october-19-2018

and reported issues:
https://github.com/hashicorp/terraform/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Av0.12-alpha1

But, it would be great for terraform contributors if we can install with tfenv install 0.12.0-alpha1.

@iamhsa
Copy link
Contributor

iamhsa commented Oct 25, 2018

@minamijoyo Hi
Thanks for pointing this but I know the limitations on this version (it's an alpha), and you are right :
. it's dangerous
. it could be great to install it

Can we imagine something like :
tfenv install latest-stable and latest for unstable.
or
tfenv install latest-unstable and latest for stable

What do you think about that ?

@minamijoyo
Copy link

@iamhsa

I prefer the following:

  • tfenv install 0.12.0-alpha1 => install the specific version
  • tfenv install unstable => install the latest unstable (alpha or beta)
  • tfenv install stable => install the latest stable
  • tfenv install latest => just alias to stable

or simply

  • tfenv install 0.12.0-alpha1 => install the specific version
  • tfenv install edge => install the latest unstable (alpha or beta)
  • tfenv install latest => install the latest stable

But it's a matter of UX, I will leave it to the maintainer as to what is the best.

Thanks!

@iamhsa
Copy link
Contributor

iamhsa commented Oct 28, 2018

Hi
I pushed one correction in unit tests #94 : as nobody use 0.1.0 or 0.2.0 versions I removed them in one unit test, because it's seems no longer compatible with some version of macos.

If this PR will be accepted a workaround for install the latest stable version can be :

tfenv install $(tfenv list-remote | grep -vE 'alpha|beta|rc' | head -n 1)

Regards

@gudlyf
Copy link
Author

gudlyf commented Oct 28, 2018

I'm apparently not getting the most recent list of available versions:

$ tfenv -v
tfenv 0.6.0
$ tfenv list-remote | head -3
0.12.0
0.11.10
0.11.9

@iamhsa
Copy link
Contributor

iamhsa commented Oct 28, 2018

@gudlyf
You get this output with the current version of tfenv ( 0.6.0 = master branch of this repo).

With PR #94 :

$ tfenv list-remote | head -3
0.12.0-alpha1
0.11.10
0.11.9

You can check unit tests : https://travis-ci.org/Zordrak/tfenv/jobs/447474311

@Zordrak
Copy link
Collaborator

Zordrak commented Feb 9, 2019

I'm looking into this shortly. Bottom line is that latest should not be reporting alpha versions. It's normal to presume that when someone asks latest they will get the latest stable release.

The reason for the 403 on the 0.12 alphas is that for some reason the file names aren't as expected for the alphas e.g. terraform_0.12.0-alpha4_terraform_0.12.0-alpha4_linux_amd64.zip instead of terraform_0.12.0-alpha4_linux_amd64.zip

Certainly it would be valuable for someone to be able to install a 0.12 alpha by specifying it as a version, however this naming inconsistency makes me hesitant to hard code a case just for this scenario which may or may not be replicated in the future.

Step 1. Make latest stick to 0.11 stable
Step 2. Check validity of a case to handle 0.12
Step 3. ???
Step 4. Profit

@Zordrak Zordrak added the bug label Feb 9, 2019
@Zordrak
Copy link
Collaborator

Zordrak commented Feb 9, 2019

Fixed by #102

@Zordrak Zordrak closed this as completed Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants