8000 OTP version undefined · Issue #56 · erlef/setup-beam · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

OTP version undefined #56

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

Closed
jordanbcooper opened this issue Jul 8, 2021 · 19 comments · Fixed by #57
Closed

OTP version undefined #56

jordanbcooper opened this issue Jul 8, 2021 · 19 comments · Fixed by #57

Comments

@jordanbcooper
Copy link

Unsure if this is from today's changes, but we suddenly get:

Installing Erlang/OTP undefined - built on ubuntu-20.04 /home/runner/work/_actions/erlef/setup-elixir/v1/dist/install-otp.sh ubuntu-20.04 undefined Error: The process '/home/runner/work/_actions/erlef/setup-elixir/v1/dist/install-otp.sh' failed with exit code 8

We're not having this issue with OTP 24.0.3, but it seems to be a sudden issue with otp-version: 22.3.4.2 ?

@jordanbcooper
Copy link
Author

@paulo-ferraz-oliveira Would this have anything to do with your recent merge?

@paulo-ferraz-oliveira
Copy link
Collaborator

@paulo-ferraz-oliveira Would this have anything to do with your recent merge?

I'm not sure. Could you point me to a .yml so I can examine it better?

Are you actually using 22.3.4.2 as the input?

@jordanbcooper
Copy link
Author
jordanbcooper commented Jul 8, 2021

Yes, we are actually using that as the input:
image

@paulo-ferraz-oliveira
Copy link
Collaborator

It seems it's possible today's release broke your build. Could you retry with option version-type: 'strict'?

@jordanbcooper
Copy link
Author

We JUST tried that one too,
image

Output:

`Installing Erlang/OTP OTP-22.3.4.2 - built on ubuntu-20.04
/home/runner/work/_actions/erlef/setup-elixir/v1/dist/install-otp.sh ubuntu-20.04 OTP-22.3.4.2

Installed Erlang/OTP version follows
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.7.2.1
Error: Requested Elixir / Erlang/OTP version (v1.11.0-otp-22 / OTP-22.3.4.2) should not contain '-otp-...'`

@paulo-ferraz-oliveira
Copy link
Collaborator

Did you try without '-otp-...'? Because that should be inferred from the Erlang version.

@paulo-ferraz-oliveira
Copy link
Collaborator

The action is semver based, as much as possible, but some versions (like OTP's) are not, which makes us have to choose between offering a "range" -like function or be strict in versions (which is why the option I just mentioned was introduced).

As an example, take '22.3'. Some might want '22.3' exactly, some might want '22.3.1' and some '22.3.1'. We chose "ranges" by default, but it might not suit everyone: we hope it suits the majority, since this was the default behaviour.

@jordanbcooper
Copy link
Author

I see. Without OTP, going back to 1.11.0 and using strict we get this:

image

@paulo-ferraz-oliveira
Copy link
Collaborator

Did you remove the v from the Elixir version?

I'm drafting #57, as a means to potentially solve your issue. This was a hidden bug, as previous behaviour was supposed to be semver -based, but apparently was not (fixing that surfaced your issue).

@vanvoljg
Copy link
vanvoljg commented Jul 8, 2021

I have a similar error that started happening this morning. It's slightly different, but feels like it may be related.

Actions output:

Screenshot_20210708_100225

Config:

env:
  MIX_ENV: test
  OTP_VERSION_SPEC: "24.0.2"
  ELIXIR_VERSION_SPEC: "1.12.1"

jobs:
  compile:
    name: Compile
    steps:
      - uses: erlef/setup-beam@v1
        id: setup
        with:
          otp-version: ${{ env.OTP_VERSION_SPEC }}
          elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
          version-type: "strict"

@jordanbcooper
Copy link
Author
8000

Adding the v back to the elixir version fixed this for us @paulo-ferraz-oliveira , thank you

@paulo-ferraz-oliveira
Copy link
Collaborator

Adding the v back to the elixir version fixed this for us @paulo-ferraz-oliveira , thank you

You can check the behaviour here: https://github.com/erlef/setup-beam/runs/3021625662?check_suite_focus=true#step:3:3

@paulo-ferraz-oliveira
Copy link
Collaborator

Hey, @vanvoljg. Your issue does seem similar, but I'll have to test further. You shouldn't need the strict, in your case, though. And if you do use it, you need a v in the Elixir version.

@vanvoljg
Copy link
vanvoljg commented Jul 8, 2021

You shouldn't need the strict, in your case, though. And if you do use it, you need a v in the Elixir version.

I wondered if it would be required, but tested just in case. Thanks for the clarification!

If it helps you, I got the exact same error both with and without strict version type.

@paulo-ferraz-oliveira
Copy link
Collaborator

You shouldn't need the strict, in your case, though. And if you do use it, you need a v in the Elixir version.

I wondered if it would be required, but tested just in case. Thanks for the clarification!

If it helps you, I got the exact same error both with and without strict version type.

Can you add a v and check if that helps? (won't be the best solution, though - I'm working on it)

@vanvoljg
Copy link
vanvoljg commented Jul 8, 2021

@paulo-ferraz-oliveira I added it and, unfortunately, it returns the same error.

Also realized I omitted a step in the config I mentioned. I don't know if will matter, but - uses: actions/checkout@v2 is also in there.

env:
  MIX_ENV: test
  OTP_VERSION_SPEC: "24.0.2"
  ELIXIR_VERSION_SPEC: "v1.12.1"
  # Change either of these if you want to bust the cache:
  DEPS_CACHE_PREFIX: v1-
  BUILD_CACHE_PREFIX: v1-


jobs:
  compile:
    name: Compile
    steps:
      - uses: actions/checkout@v2
      - uses: erlef/setup-beam@v1
        id: setup
        with:
          otp-version: ${{ env.OTP_VERSION_SPEC }}
          elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
          version-type: "strict"

@paulo-ferraz-oliveira
Copy link
Collaborator

@vanvoljg, I'll create a test specific to your issue. In the meantime, you might want to use @v1.7.2, instead of @v1, to keep the behaviour you had before.

@paulo-ferraz-oliveira
Copy link
Collaborator

A new version will hopefully be out today that'll solve the Elixir versioning issue as well as the strict Erlang versioning.

@paulo-ferraz-oliveira
Copy link
Collaborator

https://github.com/erlef/setup-beam/releases/tag/v1.8.1 is released. Let us know if you have issues using it.

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

Successfully merging a pull request may close this issue.

3 participants
0