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

Replace Distillery with Elixir releases #801

Merged
merged 7 commits into from May 28, 2019

Conversation

Projects
None yet
3 participants
@wojtekmach
Copy link
Member

commented Apr 26, 2019

No description provided.

@wojtekmach wojtekmach force-pushed the wm-elixir-releases branch from 796a72b to fbce0b8 Apr 26, 2019

@@ -1,4 +1,29 @@
FROM elixir:1.8.1-alpine as build
# FROM elixir:1.8.1-alpine as build
# begin custom Elixir image

This comment has been minimized.

Copy link
@wojtekmach

wojtekmach Apr 26, 2019

Author Member

this is because there are no published Elixir master images that I'm aware of.

@@ -0,0 +1,14 @@
## Customize flags given to the VM: http://erlang.org/doc/man/erl.html

This comment has been minimized.

Copy link
@wojtekmach

wojtekmach Apr 26, 2019

Author Member

this is a stock vm.args.eex, maybe we should just remove it. Or keep it, in case we ever need to put something here? (though, in that case we could just run mix release.init again or just create it from scratch)

This comment has been minimized.

Copy link
@ericmj

ericmj Apr 28, 2019

Member

My plan is to play around with this stuff [1] so we can keep it for now.

https://elixirforum.com/t/performance-of-erlang-elixir-in-docker-kubernetes/21493/18

Show resolved Hide resolved rel/start.eex Outdated
@@ -33,34 +33,34 @@ defmodule Hexpm.ReleaseTasks do
stop()
end

def migrate() do
def migrate(args \\ []) do

This comment has been minimized.

Copy link
@wojtekmach

wojtekmach Apr 26, 2019

Author Member

I was able to run seeds/migration/etc like this:

bin/hexpm eval 'Hexpm.ReleaseTasks.migrate()'

in order to pass args, however, instead of "--step 1" like before, now we have to do it like this:

bin/hexpm eval 'Hexpm.ReleaseTasks.migrate(~w(--step 1))

we can probably write some wrapper scripts for it for convenience, not sure.

This comment has been minimized.

Copy link
@josevalim

josevalim Apr 26, 2019

Member

Or using environment variables. We could support argv in eval but I am not sure if we should, since it wouldn't work for RPC.

This comment has been minimized.

Copy link
@wojtekmach

wojtekmach Apr 26, 2019

Author Member

since we're already evaling, @josevalim suggested we may as well just do:

bin/hexpm eval 'Hexpm.ReleaseTasks.migrate(step: 1)

that seems nicer.

@wojtekmach

This comment has been minimized.

Copy link
Member Author

commented Apr 26, 2019

On Travis, we still run Elixir v1.8.1, and that's because it doesn't seem they allow us to run Elixir master. After there's an RC etc, we'd be able to replace use Mix.Config with import Config, use System.fetch_env! etc - for now, these are only used in config/releases.exs which is only used by Elixir releases.

@wojtekmach wojtekmach marked this pull request as ready for review Apr 27, 2019

## -name/-sname/-setcookie are given via the CLI, do not set them here

## Preloads all modules instead of loading them dynamically
-mode embedded

This comment has been minimized.

Copy link
@josevalim

josevalim May 18, 2019

Member

This line should be removed according to Elixir master.

@wojtekmach wojtekmach force-pushed the wm-elixir-releases branch 3 times, most recently from 3896e0c to 49d8be5 May 23, 2019

@wojtekmach

This comment has been minimized.

Copy link
Member Author

commented May 23, 2019

@ericmj I think this is ready to go, I was able to connect to a node, published a test package (see: https://github.com/hexpm/test_apps) and I didn't hit any issues. Could you do some tests too?

@ericmj

This comment has been minimized.

Copy link
Member

commented May 23, 2019

Thanks! Will do.

@wojtekmach wojtekmach force-pushed the wm-elixir-releases branch from e562e71 to 9f2563b May 25, 2019

ericmj added some commits May 28, 2019

defp run_script() do
[script | args] = argv()
System.argv(args)
# TODO: Move all scripts to release tasks

This comment has been minimized.

Copy link
@sourcelevel-bot
@sourcelevel-bot

This comment has been minimized.

Copy link

commented May 28, 2019

Ebert has finished reviewing this Pull Request and has found:

  • 1 possible new issue (including those that may have been commented here).

But beware that this branch is 2 commits behind the hexpm:master branch, and a review of an up to date branch would produce more accurate results.

You can see more details about this review at https://ebertapp.io/github/hexpm/hexpm/pulls/801.

@ericmj

ericmj approved these changes May 28, 2019

@ericmj ericmj merged commit 9c216f8 into master May 28, 2019

4 checks passed

Build (138366431608) Summary
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
ebert Ebert has found 1 possible new issue.
Details

@ericmj ericmj deleted the wm-elixir-releases branch May 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.