heroku-buildpack-elixir icon indicating copy to clipboard operation
heroku-buildpack-elixir copied to clipboard

Versions not found if Major.Minor.Patch version is not specified

Open SampsonCrowley opened this issue 5 years ago • 7 comments

if you specify OTP 22.0 for instance, instead of using versioning to pull the closest match, the build fails.

If only a Major version or only a Major and Minor version are specified, and an exact match isn't found, the build should use the most up-to-date version for that Major.Minor combination

It was really surprising that symversioning isn't followed in the absence of an exact match, and instead the build just fails. If a Patch version was specified, and not found, THEN it should fail

SampsonCrowley avatar Jul 12 '19 20:07 SampsonCrowley

This is one of the most common issues I get emailed about from customers at gigalixir.

@HashNuke I don't mind taking a stab at this if you think this is something you would be willing to merge. I can see how some people might not like their version "altered" automatically.

One thing I can do right now, though, is improve the error message when a version isn't supported. What do you think?

Right now, it says something like this

remote: -----> Fetching Erlang 22.0.3 from https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14/OTP-22.0.3.tar.gz        
remote: -----> Installing Erlang 22.0.3 (changed)        
remote: 
remote: gzip: stdin: not in gzip format        
remote: tar: Child returned status 1        
remote: tar: Error is not recoverable: exiting now        

Perhaps something more useful like

Sorry, Erlang 22.0.3 isn't supported yet. For a list of supported versions, please see https://github.com/HashNuke/heroku-buildpack-elixir#version-support

What do you think?

jesseshieh avatar Jul 31 '19 22:07 jesseshieh

@jesseshieh I can't think of a single reason that someone who specified only a major / major.minor version would be mad that it used the latest patch when an exact match to their query doesn't exist

SampsonCrowley avatar Jul 31 '19 23:07 SampsonCrowley

this should definitely still fail if they specify a full semver and it's not found

SampsonCrowley avatar Jul 31 '19 23:07 SampsonCrowley

@jesseshieh That would be nice. Would be happy to merge a PR.

HashNuke avatar Aug 01 '19 00:08 HashNuke

I'm getting a very similar error message, but it doesn't matter what OTP version I'm trying to install:

remote: -----> Fetching Erlang 21.3
remote: -----> Installing Erlang 21.3 (changed)
remote:
remote: gzip: stdin: not in gzip format
remote: tar: Child returned status 1
remote: tar: Error is not recoverable: exiting now

can this be related, or should I open another ticket? I tried various versions listed here https://github.com/HashNuke/heroku-buildpack-elixir-otp-builds/blob/master/otp-versions

vmaark avatar Feb 14 '20 22:02 vmaark

This can happen if there was basically any kind of error downloading the file. I just tried it manually at https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14/OTP-21.3.tar.gz

and it seemed to work. Is it still happening for you or was it a transient issue? Did you get this error from Heroku or Gigalixir?

jesseshieh avatar Feb 15 '20 01:02 jesseshieh

I got it from heroku, and downloading manually did work for me too. I'll try later today, maybe it was a hiccup with heroku.

vmaark avatar Feb 15 '20 06:02 vmaark