superfly / flyctl

Command line tools for fly.io services
https://fly.io
Apache License 2.0
1.43k stars 240 forks source link

Elixir buildpack is offensively slow #387

Closed mrkurt closed 2 years ago

mrkurt commented 3 years ago

Describe the bug I'm running flyctl deploy in the papercups repo using the autodetected buildpack settings. It's very slow, even on subsequent runs. This one is using the remote builder, but it's slow with local docker running too.

Some of this might just be the buildpack, but I think we can speed it up with some of the buildpack caching stuff.

** Add fly.toml

app = "papercups-example"

kill_signal = "SIGINT"
kill_timeout = 5

[build]
  builder = "heroku/buildpacks:18"
  buildpacks = ["https://cnb-shim.herokuapp.com/v1/hashnuke/elixir"]

Command output:

This took >6min

flyctl deploy  3.77s user 3.97s system 1% cpu 6:46.76 total
➜  papercups git:(master) ✗ time flyctl deploy
Deploying papercups-example
==> Validating app configuration
--> Validating app configuration done
Services
TCP 80/443 ⇢ 8080
Remote builder fly-builder-lively-violet-9253 ready
==> Building image with Buildpacks
get fd &{0xc0000bc060} &{0xc00055c300}
18: Pulling from heroku/buildpacks
Digest: sha256:99f5e057d659096d46d373933f9c13737006735f7911ae882effbc24938b43ed
Status: Image is up to date for heroku/buildpacks:18
get fd &{0xc0000bc060} &{0xc00055c300}
18: Pulling from heroku/pack
Digest: sha256:0d76e6f9c98d6b795bc879527d628764fe1fe8a96d19c3afc4e953dd011380c9
Status: Image is up to date for heroku/pack:18
Downloading from https://cnb-shim.herokuapp.com/v1/hashnuke/elixir
1.89 MB/-1 B
===> DETECTING
hashnuke/elixir 0.1
===> ANALYZING
Previous image with name "registry.fly.io/papercups-example:deployment-1616864697" not found
===> RESTORING
===> BUILDING
-----> Will export the following config vars:
       * MIX_ENV=prod
-----> Checking Erlang and Elixir versions
       Will use the following versions:
       * Stack heroku-18
       * Erlang 23.0.2
       * Elixir v1.11.3
-----> Stack changed, will rebuild
-----> Fetching Erlang 23.0.2 from https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14/OTP-23.0.2.tar.gz
-----> Installing Erlang 23.0.2 (changed)

-----> Fetching Elixir v1.11.3 for OTP 23 from https://repo.hex.pm/builds/elixir/v1.11.3-otp-23.zip
-----> Installing Elixir v1.11.3 (changed)
-----> Installing Hex
* creating /home/heroku/.mix/archives/hex-0.21.1
-----> Installing rebar
* creating /home/heroku/.mix/rebar
* creating /home/heroku/.mix/rebar3
-----> Fetching app dependencies with mix
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  certifi 2.5.2
  connection 1.0.4
  corsica 1.1.3
  cowboy 2.8.0
  cowboy_telemetry 0.3.0
  cowlib 2.9.1
  customerio 0.2.2
  db_connection 2.2.2
  decimal 1.9.0
  ecto 3.4.6
  ecto_sql 3.4.5
  ex_aws 2.1.6
  ex_aws_s3 2.0.2
  ex_json_schema 0.7.4
  floki 0.30.0
  gen_smtp 0.15.0
  gettext 0.18.0
  google_api_gmail 0.13.1
  google_gax 0.4.0
  hackney 1.16.0
  html_entities 0.5.1
  idna 6.0.1
  jason 1.2.2
  mail 0.2.2
  metrics 1.0.1
  mime 1.4.0
  mimerl 1.2.0
  oauth2 0.9.4
  oban 2.1.0
  paginator 1.0.4
  parse_trans 3.3.0
  phoenix 1.5.5
  phoenix_ecto 4.1.0
  phoenix_html 2.14.2
  phoenix_live_dashboard 0.2.7
  phoenix_live_view 0.14.0
  phoenix_pubsub 2.0.0
  phoenix_swagger 0.8.2
  plug 1.10.4
  plug_cowboy 2.4.0
  plug_crypto 1.2.0
  poison 3.1.0
  postgrex 0.15.5
  pow 1.0.20
  pow_postgres_store 1.0.0-rc2
  ranch 1.7.1
  scrivener 2.7.0
  scrivener_ecto 2.7.0
  sentry 8.0.0
  ssl_verify_fun 1.1.6
  stripity_stripe 2.9.0
  swoosh 1.0.0
  telemetry 0.4.2
  telemetry_metrics 0.5.0
  telemetry_poller 0.5.1
  tesla 1.3.3
  tzdata 1.0.5
  unicode_util_compat 0.5.0
  uri_query 0.1.2
  uuid 1.1.8
All dependencies are up to date
-----> Copying hex from /home/heroku/.mix/archives/hex-0.21.1
-----> Compiling
===> Compiling parse_trans
===> Failed to restore /workspace/deps/parse_trans/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Compiling mimerl
===> Failed to restore /workspace/deps/mimerl/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

==> connection
Compiling 1 file (.ex)
warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:429

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:431

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:491

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:540

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:581

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:625

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:628

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:631

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:657

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:660

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:663

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:744

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:770

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/connection.ex:813

Generated connection app
===> Compiling metrics
===> Failed to restore /workspace/deps/metrics/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Compiling unicode_util_compat
===> Failed to restore /workspace/deps/unicode_util_compat/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Compiling idna
===> Failed to restore /workspace/deps/idna/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

==> gettext
Compiling 1 file (.erl)
Compiling 20 files (.ex)
Generated gettext app
===> Compiling ranch
===> Failed to restore /workspace/deps/ranch/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

==> uri_query
Compiling 1 file (.ex)
Generated uri_query app
===> Compiling telemetry
===> Failed to restore /workspace/deps/telemetry/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

==> telemetry_metrics
Compiling 7 files (.ex)
warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/telemetry_metrics/console_reporter.ex:123

Generated telemetry_metrics app
===> Compiling telemetry_poller
===> Failed to restore /workspace/deps/telemetry_poller/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

==> decimal
Compiling 4 files (.ex)
Generated decimal app
==> jason
Compiling 8 files (.ex)
Generated jason app
warning: String.strip/1 is deprecated. Use String.trim/1 instead
  /workspace/deps/poison/mix.exs:4: Poison.Mixfile

==> poison
Compiling 4 files (.ex)
warning: Integer.to_char_list/2 is deprecated. Use Integer.to_charlist/2 instead
  lib/poison/encoder.ex:173: Poison.Encoder.BitString.seq/1

Generated poison app
==> ssl_verify_fun
Compiling 7 files (.erl)
Generated ssl_verify_fun app
===> Compiling gen_smtp
===> Failed to restore /workspace/deps/gen_smtp/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

src/smtp_util.erl:73: Warning: crypto:hmac/3 is deprecated and will be removed in OTP 24; use use crypto:mac/4 instead

==> scrivener
Compiling 4 files (.ex)
Generated scrivener app
==> html_entities
Compiling 2 files (.ex)
Generated html_entities app
==> floki
Compiling 2 files (.erl)
Compiling 24 files (.ex)
Generated floki app
===> Compiling certifi
===> Failed to restore /workspace/deps/certifi/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Compiling hackney
===> Failed to restore /workspace/deps/hackney/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

==> customerio
Compiling 3 files (.ex)
Generated customerio app
==> ex_aws
Compiling 26 files (.ex)
Generated ex_aws app
==> ex_aws_s3
Compiling 7 files (.ex)
Generated ex_aws_s3 app
==> stripity_stripe
Compiling 78 files (.ex)
warning: redefining @doc attribute previously set at line 32.

Please remove the duplicate docs. If instead you want to override a previously defined @doc, attach the @doc attribute to a function head:

    @doc """
    new docs
    """
    def create(...)

  lib/stripe/subscriptions/usage.ex:37: Stripe.SubscriptionItem.Usage.create/3

Generated stripity_stripe app
==> tzdata
Compiling 17 files (.ex)
warning: unknown compiler variable "______" (expected one of __MODULE__, __ENV__, __DIR__, __CALLER__, __STACKTRACE__)
  lib/tzdata/parser.ex:27: Tzdata.Parser.process_tz_list/1

warning: Supervisor.Spec.worker/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
Found at 2 locations:
  lib/tzdata/tzdata_app.ex:10: Tzdata.App.start/2
  lib/tzdata/tzdata_app.ex:13: Tzdata.App.start/2

Generated tzdata app
==> db_connection
Compiling 14 files (.ex)
warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection/connection.ex:72

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:720

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:810

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:1032

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:1114

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:1125

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:1138

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:1151

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:1166

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:1180

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:1387

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection.ex:1443

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/db_connection/holder.ex:319

Generated db_connection app
==> ecto
Compiling 55 files (.ex)
Generated ecto app
==> ex_json_schema
Compiling 12 files (.ex)
Generated ex_json_schema app
==> phoenix_pubsub
Compiling 11 files (.ex)
Generated phoenix_pubsub app
==> oauth2
Compiling 13 files (.ex)
Generated oauth2 app
===> Compiling cowlib
===> Failed to restore /workspace/deps/cowlib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Compiling cowboy
===> Failed to restore /workspace/deps/cowboy/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling cowboy_telemetry
===> Failed to restore /workspace/deps/cowboy_telemetry/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

==> uuid
Compiling 1 file (.ex)
warning: :crypto.hash/2 defined in application :crypto is used by the current application but the current application does not depend on :crypto. To fix this, you must do one of:

  1. If :crypto is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :crypto is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :crypto, you may optionally skip this warning by adding [xref: [exclude: [:crypto]]] to your "def project" in mix.exs

Found at 2 locations:
  lib/uuid.ex:498: UUID.namebased_uuid/2
  lib/uuid.ex:502: UUID.namebased_uuid/2

warning: :crypto.strong_rand_bytes/1 defined in application :crypto is used by the current application but the current application does not depend on :crypto. To fix this, you must do one of:

  1. If :crypto is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :crypto is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :crypto, you may optionally skip this warning by adding [xref: [exclude: [:crypto]]] to your "def project" in mix.exs

Found at 3 locations:
  lib/uuid.ex:340: UUID.uuid4/1
  lib/uuid.ex:469: UUID.uuid1_clockseq/0
  lib/uuid.ex:492: UUID.uuid1_node/1

Generated uuid app
==> mime
Compiling 2 files (.ex)
Generated mime app
==> tesla
Compiling 26 files (.ex)
warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/tesla/middleware/telemetry.ex:59

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/tesla/middleware/timeout.ex:48

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/tesla/mock.ex:237

warning: :hackney.body/1 defined in application :hackney is used by the current application but the current application does not depend on :hackney. To fix this, you must do one of:

  1. If :hackney is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :hackney is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :hackney, you may optionally skip this warning by adding [xref: [exclude: [:hackney]]] to your "def project" in mix.exs

  lib/tesla/adapter/hackney.ex:91: Tesla.Adapter.Hackney.handle/1

warning: :hackney.request/5 defined in application :hackney is used by the current application but the current application does not depend on :hackney. To fix this, you must do one of:

  1. If :hackney is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :hackney is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :hackney, you may optionally skip this warning by adding [xref: [exclude: [:hackney]]] to your "def project" in mix.exs

Found at 2 locations:
  lib/tesla/adapter/hackney.ex:71: Tesla.Adapter.Hackney.request/5
  lib/tesla/adapter/hackney.ex:75: Tesla.Adapter.Hackney.request_stream/5

warning: :hackney.send_body/2 defined in application :hackney is used by the current application but the current application does not depend on :hackney. To fix this, you must do one of:

  1. If :hackney is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :hackney is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :hackney, you may optionally skip this warning by adding [xref: [exclude: [:hackney]]] to your "def project" in mix.exs

  lib/tesla/adapter/hackney.ex:76: Tesla.Adapter.Hackney.request_stream/5

warning: :hackney.start_response/1 defined in application :hackney is used by the current application but the current application does not depend on :hackney. To fix this, you must do one of:

  1. If :hackney is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :hackney is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :hackney, you may optionally skip this warning by adding [xref: [exclude: [:hackney]]] to your "def project" in mix.exs

  lib/tesla/adapter/hackney.ex:77: Tesla.Adapter.Hackney.request_stream/5

warning: MIME.from_path/1 defined in application :mime is used by the current application but the current application does not depend on :mime. To fix this, you must do one of:

  1. If :mime is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mime is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mime, you may optionally skip this warning by adding [xref: [exclude: [MIME]]] to your "def project" in mix.exs

  lib/tesla/multipart.ex:102: Tesla.Multipart.add_file/3

warning: :telemetry.execute/3 defined in application :telemetry is used by the current application but the current application does not depend on :telemetry. To fix this, you must do one of:

  1. If :telemetry is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :telemetry is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :telemetry, you may optionally skip this warning by adding [xref: [exclude: [:telemetry]]] to your "def project" in mix.exs

Found at 4 locations:
  lib/tesla/middleware/telemetry.ex:85: Tesla.Middleware.Telemetry.emit_start/1
  lib/tesla/middleware/telemetry.ex:93: Tesla.Middleware.Telemetry.emit_stop/2
  lib/tesla/middleware/telemetry.ex:102: Tesla.Middleware.Telemetry.emit_legacy_event/2
  lib/tesla/middleware/telemetry.ex:111: Tesla.Middleware.Telemetry.emit_exception/2

Generated tesla app
==> google_gax
Compiling 5 files (.ex)
Generated google_gax app
==> google_api_gmail
Compiling 46 files (.ex)
Generated google_api_gmail app
==> postgrex
Compiling 61 files (.ex)
Generated postgrex app
==> ecto_sql
Compiling 26 files (.ex)
Generated ecto_sql app
==> mail
Compiling 13 files (.ex)
warning: :crypto.strong_rand_bytes/1 defined in application :crypto is used by the current application but the current application does not depend on :crypto. To fix this, you must do one of:

  1. If :crypto is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :crypto is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :crypto, you may optionally skip this warning by adding [xref: [exclude: [:crypto]]] to your "def project" in mix.exs

  lib/mail/message.ex:174: Mail.Message.generate_boundary/0

Generated mail app
==> oban
Compiling 23 files (.ex)
warning: incompatible types:

    map() !~ atom()

in expression:

    # lib/oban/queue/executor.ex:231
    exec.meta()

where "exec" was given the type map() (due to calling var.field) in:

    # lib/oban/queue/executor.ex:228
    exec.duration

where "exec" was given the type map() (due to calling var.field) in:

    # lib/oban/queue/executor.ex:228
    exec.queue_time

where "exec" was given the type map() (due to calling var.field) in:

    # lib/oban/queue/executor.ex:228
    exec.queue_time

where "exec" was given the type atom() (due to calling var.fun()) in:

    # lib/oban/queue/executor.ex:231
    exec.meta()

HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()

Conflict found at
  lib/oban/queue/executor.ex:231: Oban.Queue.Executor.execute_exception/1

warning: incompatible types:

    %{var1 => dynamic(), optional(dynamic()) => dynamic()} !~ %Oban.Queue.Executor{conf: dynamic(), duration: dynamic(), error: dynamic(), job: dynamic(), kind: dynamic(), meta: dynamic(), queue_time: dynamic(), safe: dynamic(), snooze: dynamic(), stacktrace: dynamic(), start_mono: dynamic(), start_time: dynamic(), state: dynamic(), stop_mono: dynamic(), worker: dynamic()}

in expression:

    # lib/oban/queue/executor.ex:60
    %{exec | key => value}

where "exec" was given the type %Oban.Queue.Executor{conf: dynamic(), duration: dynamic(), error: dynamic(), job: dynamic(), kind: dynamic(), meta: dynamic(), queue_time: dynamic(), safe: dynamic(), snooze: dynamic(), stacktrace: dynamic(), start_mono: dynamic(), start_time: dynamic(), state: dynamic(), stop_mono: dynamic(), worker: dynamic()} in:

    # lib/oban/queue/executor.ex:59
    %Oban.Queue.Executor{} = exec

where "exec" was given the type %{var1 => dynamic(), optional(dynamic()) => dynamic()} in:

    # lib/oban/queue/executor.ex:60
    %{exec | key => value}

Conflict found at
  lib/oban/queue/executor.ex:60: Oban.Queue.Executor.put/3

Generated oban app
==> scrivener_ecto
Compiling 2 files (.ex)
Generated scrivener_ecto app
==> plug_crypto
Compiling 5 files (.ex)
Generated plug_crypto app
==> paginator
Compiling 6 files (.ex)
Generated paginator app
==> plug
Compiling 1 file (.erl)
Compiling 40 files (.ex)
warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/plug/conn/wrapper_error.ex:23

Generated plug app
==> plug_cowboy
Compiling 5 files (.ex)
Generated plug_cowboy app
==> swoosh
Compiling 32 files (.ex)
Generated swoosh app
==> corsica
Compiling 2 files (.ex)
Generated corsica app
==> sentry
Compiling 15 files (.ex)
Generated sentry app
==> phoenix_swagger
Compiling 11 files (.ex)
warning: ExJsonSchema.Schema.get_fragment!/2 defined in application :ex_json_schema is used by the current application but the current application does not depend on :ex_json_schema. To fix this, you must do one of:

  1. If :ex_json_schema is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :ex_json_schema is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :ex_json_schema, you may optionally skip this warning by adding [xref: [exclude: [ExJsonSchema.Schema]]] to your "def project" in mix.exs

  lib/phoenix_swagger/test/schema_test.ex:103: PhoenixSwagger.SchemaTest.validate_resp_schema/3

warning: ExJsonSchema.Schema.resolve/1 defined in application :ex_json_schema is used by the current application but the current application does not depend on :ex_json_schema. To fix this, you must do one of:

  1. If :ex_json_schema is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :ex_json_schema is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :ex_json_schema, you may optionally skip this warning by adding [xref: [exclude: [ExJsonSchema.Schema]]] to your "def project" in mix.exs

Found at 2 locations:
  lib/phoenix_swagger/test/schema_test.ex:57: PhoenixSwagger.SchemaTest.read_swagger_schema/1
  lib/phoenix_swagger/validator.ex:137: PhoenixSwagger.Validator.collect_schema_attrs/1

warning: ExJsonSchema.Validator.validate/2 defined in application :ex_json_schema is used by the current application but the current application does not depend on :ex_json_schema. To fix this, you must do one of:

  1. If :ex_json_schema is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :ex_json_schema is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :ex_json_schema, you may optionally skip this warning by adding [xref: [exclude: [ExJsonSchema.Validator]]] to your "def project" in mix.exs

  lib/phoenix_swagger/validator.ex:86: PhoenixSwagger.Validator.validate/2

warning: ExJsonSchema.Validator.validate_fragment/3 defined in application :ex_json_schema is used by the current application but the current application does not depend on :ex_json_schema. To fix this, you must do one of:

  1. If :ex_json_schema is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :ex_json_schema is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :ex_json_schema, you may optionally skip this warning by adding [xref: [exclude: [ExJsonSchema.Validator]]] to your "def project" in mix.exs

  lib/phoenix_swagger/test/schema_test.ex:104: PhoenixSwagger.SchemaTest.validate_resp_schema/3

warning: Code.ensure_compiled?/1 is deprecated. Use Code.ensure_compiled/1 instead (see the proper disclaimers in its docs)
  lib/mix/tasks/swagger.generate.ex:152: Mix.Tasks.Phx.Swagger.Generate.generate_swagger_path_function/4

Generated phoenix_swagger app
==> phoenix_html
Compiling 8 files (.ex)
Generated phoenix_html app
==> phoenix
Compiling 66 files (.ex)
Generated phoenix app
==> pow
Compiling 116 files (.ex)
warning: :mnesia.add_table_copy/3 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:389: Pow.Store.Backend.MnesiaCache.sync_table/2

warning: :mnesia.change_config/2 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:403: Pow.Store.Backend.MnesiaCache.connect_to_cluster/1

warning: :mnesia.change_table_copy_type/3 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:359: Pow.Store.Backend.MnesiaCache.change_table_copy_type/1

warning: :mnesia.create_table/2 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:380: Pow.Store.Backend.MnesiaCache.create_table/1

warning: :mnesia.delete/1 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

Found at 2 locations:
  lib/pow/store/backend/mnesia_cache.ex:279: Pow.Store.Backend.MnesiaCache.table_delete/2
  lib/pow/store/backend/mnesia_cache.ex:432: Pow.Store.Backend.MnesiaCache.init_invalidators/2

warning: :mnesia.dirty_read/1 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:239: Pow.Store.Backend.MnesiaCache.fetch/2

warning: :mnesia.dirty_select/2 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:250: Pow.Store.Backend.MnesiaCache.table_all/2

warning: :mnesia.foldl/3 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:420: Pow.Store.Backend.MnesiaCache.init_invalidators/2

warning: :mnesia.set_master_nodes/2 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:352: Pow.Store.Backend.MnesiaCache.set_mnesia_master_nodes/1

warning: :mnesia.subscribe/1 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache/unsplit.ex:77: Pow.Store.Backend.MnesiaCache.Unsplit.init/1

warning: :mnesia.sync_transaction/1 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

Found at 3 locations:
  lib/pow/store/backend/mnesia_cache.ex:262: Pow.Store.Backend.MnesiaCache.table_insert/3
  lib/pow/store/backend/mnesia_cache.ex:276: Pow.Store.Backend.MnesiaCache.table_delete/2
  lib/pow/store/backend/mnesia_cache.ex:419: Pow.Store.Backend.MnesiaCache.init_invalidators/2

warning: :mnesia.system_info/1 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

Found at 5 locations:
  lib/pow/store/backend/mnesia_cache.ex:212: Pow.Store.Backend.MnesiaCache.refresh_invalidators_in_cluster/1
  lib/pow/store/backend/mnesia_cache.ex:345: Pow.Store.Backend.MnesiaCache.set_mnesia_master_nodes/1
  lib/pow/store/backend/mnesia_cache/unsplit.ex:100: Pow.Store.Backend.MnesiaCache.Unsplit.autoheal/2
  lib/pow/store/backend/mnesia_cache/unsplit.ex:123: Pow.Store.Backend.MnesiaCache.Unsplit.affected_tables/1
  lib/pow/store/backend/mnesia_cache/unsplit.ex:181: Pow.Store.Backend.MnesiaCache.Unsplit.sorted_cluster_islands/1

warning: :mnesia.table_info/2 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache/unsplit.ex:138: Pow.Store.Backend.MnesiaCache.Unsplit.get_all_nodes_for_table/1

warning: :mnesia.wait_for_tables/2 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:399: Pow.Store.Backend.MnesiaCache.wait_for_table/1

warning: :mnesia.write/1 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:

  1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs

  lib/pow/store/backend/mnesia_cache.ex:267: Pow.Store.Backend.MnesiaCache.table_insert/3

warning: Supervisor.Spec.worker/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/pow/application.ex:14: Pow.Application.start/2

warning: Code.ensure_compiled?/1 is deprecated. Use Code.ensure_compiled/1 instead (see the proper disclaimers in its docs)
  lib/pow/extension/base.ex:76: Pow.Extension.Base.has?/2

Generated pow app
==> pow_postgres_store
Compiling 3 files (.ex)
warning: variable "errors" is unused (if the variable is not meant to be used, prefix it with an underscore)
  lib/mix/gen_schema.ex:37: Mix.Tasks.Pow.Postgres.Gen.Schema.run/1

Generated pow_postgres_store app
==> phoenix_live_view
Compiling 18 files (.ex)
Generated phoenix_live_view app
==> phoenix_live_dashboard
Compiling 33 files (.ex)
Generated phoenix_live_dashboard app
==> phoenix_ecto
Compiling 7 files (.ex)
warning: incompatible types:

    map() !~ atom()

in expression:

    # lib/phoenix_ecto/check_repo_status.ex:41
    repo.config()

where "repo" was given the type map() (due to calling var.field) in:

    # lib/phoenix_ecto/check_repo_status.ex:39
    repo.__adapter__

where "repo" was given the type map() (due to calling var.field) in:

    # lib/phoenix_ecto/check_repo_status.ex:41
    repo.__adapter__

where "repo" was given the type map() (due to calling var.field) in:

    # lib/phoenix_ecto/check_repo_status.ex:41
    repo.__adapter__

where "repo" was given the type atom() (due to calling var.fun()) in:

    # lib/phoenix_ecto/check_repo_status.ex:41
    repo.config()

HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()

Conflict found at
  lib/phoenix_ecto/check_repo_status.ex:41: Phoenix.Ecto.CheckRepoStatus.check_storage_up!/1

warning: incompatible types:

    map() !~ atom()

in expression:

    # lib/phoenix_ecto/plug.ex:58
    repo.config()

where "repo" was given the type map() (due to calling var.field) in:

    # lib/phoenix_ecto/plug.ex:58
    repo.__adapter__

where "repo" was given the type atom() (due to calling var.fun()) in:

    # lib/phoenix_ecto/plug.ex:58
    repo.config()

HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()

Conflict found at
  lib/phoenix_ecto/plug.ex:58: Plug.Exception.Phoenix.Ecto.StorageNotCreatedError.storage_up/1

Generated phoenix_ecto app
==> chat_api
Compiling 181 files (.ex)
Generated chat_api app
-----> Creating .profile.d with env vars
-----> Writing export for multi-buildpack support
===> EXPORTING
Adding layer 'hashnuke/elixir:profile'
Adding 1/1 app layer(s)
Adding layer 'launcher'
Adding layer 'config'
Adding layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Setting default process type 'web'
*** Images (944e736b4c3f):
      registry.fly.io/papercups-example:deployment-1616864697
Adding cache layer 'hashnuke/elixir:shim'
--> Building image done
==> Pushing image to fly
The push refers to repository [registry.fly.io/papercups-example]
13657e53d91b: Layer already exists
9e6bacb51141: Layer already exists
126dd5439845: Layer already exists
2ff62dd8b708: Pushed
911870c321d2: Layer already exists
b629c962f6e0: Layer already exists
6c329f6dcdb4: Layer already exists
84bd1c707db2: Layer already exists
62525cc8cec8: Layer already exists
07adad8f2cae: Layer already exists
0dd1581dbc3c: Layer already exists
837d6facb613: Layer already exists
deployment-1616864697: digest: sha256:327777225985fef457e3606a75b98b75606272adbd2fc0a6768963f71af3eecd size: 2822
--> Pushing image done
Image: registry.fly.io/papercups-example:deployment-1616864697
Image size: 766 MB
jsierles commented 3 years ago

@brainlid Do you think it's still best for us to use the Elixir buildpack for out of the box deployment? Is there a better one?

jsierles commented 2 years ago

Now we're using a Dockerfile for Elixir, this problem rarely comes up. Closing for now.