`meltano schedule run` fails when `meltano` is not in `$PATH`
As reported by @Dherbst on Slack, meltano schedule run <schedule_name>
fails with file meltano not found
when meltano
is not in the $PATH
. As a workaround, he is now running meltano elt <extractor> <loader> --job_id=<schedule_name>
directly, which is equivalent but less straightforward.
The culprit appears to be MeltanoInvoker
, which is used by ScheduleService.run
to run the schedule's meltano elt
command.
It currently assumes that the meltano
executable can be executed by name (requiring it to be in the $PATH
), instead of simply reusing the executable that meltano schedule run
itself was called with.
We already have some logic in Project.activate
that determines the location of the meltano
executable and creates a symlink to it at .meltano/run/bin
. We can use similar logic in MeltanoInvoker
.