Hi!
When I initialize dagger inside the folder of my project, then, every time I re-run my pipeline, the step cache appears to not be used at all. Is this normal? Here's what I mean.
I initialize dagger inside my project like this:
cd my-app
dagger init --sdk=elixir .
The make my module looks like this:
defmodule MyApp do
use Dagger.Mod.Object, name: "MyApp"
@doc """
Just a demonstration of an issue
"""
defn just_install_deps(src_dir: Dagger.Directory.t()) :: Dagger.Container.t() do
dag()
|> Dagger.Client.container()
|> Dagger.Container.from("hexpm/elixir:1.14.0-erlang-25.1.1-ubuntu-focal-20211006")
|> Dagger.Container.with_mounted_directory("/src", src_dir)
|> Dagger.Container.with_workdir("/src")
|> Dagger.Container.with_exec(~w"mix local.hex --force")
|> Dagger.Container.with_exec(~w"mix local.rebar --force")
|> Dagger.Container.with_exec(~w"mix deps.get")
|> Dagger.Container.with_exec(~w"mix deps.compile")
end
end
Now, every time I call - even without any modifications to files inside my app or dagger module...:
dagger call just-install-deps --src-dir .
...the step cache is not used, as if something invalidates it.