Deployment with edeliver/distillery results in no code change

I have a plan old Phoenix app with edeliver and distillery for deploy:

After running:

mix edeliver build release
mix edeliver deploy production
mix edeliver restart release

I hit certain urls that I know for a fact changed and I’m getting responses that correspond to a previous version.

Starting/stopping the release in the production server results in the same old code being run.

If I grep ps auxf I see the bash command that was used to run my release I noticed that some old versions of the app are being added to the path that runs the whole thing. Somehow, the version that is actually running is 0.0.10+154....:

  -- -root /usr/lib/erlang
  -progname home/deployer/myphoenixapp/releases/0.0.11+158-d902718/ -- -home /home/deployer --
  -boot_var ERTS_LIB_DIR /usr/lib/erlang/lib
  -config /home/deployer/myphoenixapp/var/sys.config
  -pa /home/deployer/myphoenixapp/lib/artificery-0.4.2/ebin 
  /home/deployer/myphoenixapp/lib/myphoenixapp-0.0.10+154-b0debe3/ebin # <- *****************
  /home/deployer/myphoenixapp/lib/myphoenixapp-0.0.10+155-5863311/ebin # <- old versions being added to the 'path'
  /home/deployer/myphoenixapp/lib/myphoenixapp-0.0.11+157-7cf022c/ebin # <- ******************
  -pa /home/deployer/myphoenixapp/lib/myphoenixapp-0.0.11+158-d902718/consolidated -boot /home/deployer/myphoenixapp/releases/0.0.11+158-d902718/myphoenixapp -name myphoenixapp@ -setcookie _X!VsJlx4B -smp auto -mode embedded -user Elixir.IEx.CLI -extra --no-halt +iex -- --

If I delete all the myphoenixapp-* from the lib directory (except the latest) one, then the release works as expected.

Am I doing something wrong? Is it normal for those old version to remain there?

I’m running distillery 2.0 and edeliver 1.6.0.

I’ve got the exact same issue, using the same versions. Did you ever fix that issue?

I added the following to my .deliver/config:

post_extract_release_archive() {
  status "Removing"
  __remote "
    [ -f ~/.profile ] && source ~/.profile
    set -e
1 Like

Yep, I finally found that distillery is the actual issue.

This is the distillery PR fixing the issue, though there hasn’t been a new release since.