Danny
06/29/2020, 7:41 PMdagster:
image: company/project
build: .
command: sh -c "cp pipelines/dagster.yaml tmp/dagster/ && dagit -h 0.0.0.0 -p 9090 -w pipelines/workspace.yaml"
environment:
DAGSTER_HOME: tmp/dagster
ports:
- 9090:9090
volumes:
- ./tmp/dagster:/src/tmp/dagster
Worked fine on 0.7.13, but today I upgraded to 0.8.5 and getting this error:
dagster.core.errors.DagsterInvariantViolationError: DAGSTER_HOME must be absolute path: tmp/dagster
Changing the path to be absolute in the docker compose file is a no go, it'll break on another dev's machine. Any non-hacky suggestions?Danny
06/29/2020, 7:42 PMDanny
06/29/2020, 7:52 PMtmp/dagster
to the absolute path inside the container, which doesn't change between machines. What my brain was trying to say 😃 was that when devs try hacking locally using the same setup as our docker compose as above, but outside of any container, it breaks.Danny
06/29/2020, 7:55 PMcd /home/danny/project
cp pipelines/dagster.yaml tmp/dagster
DAGSTER_HOME=/home/danny/project/tmp/dagster dagit -h 0.0.0.0 -p 9090 -w pipelines/workspace.yaml
It'll fail when another dev chose to run out of /home/josh/project
Danny
06/29/2020, 7:56 PMDanny
06/29/2020, 8:16 PMalex
06/29/2020, 8:17 PM~
if you want user relative pathsalex
06/29/2020, 8:26 PM/src/tmp/dagster
? (assuming the workdir of the image is /src/
Danny
06/29/2020, 8:32 PMDanny
06/29/2020, 8:33 PM~
won't help because some deployments or devs might have it under /opt/project
etc etcDanny
06/29/2020, 8:37 PMDAGSTER_HOME=.
messes things up due to cron being in the picture. I've never dug into the internals so can't speak about a better solution here, except to say that the current 3 line "fix" will probably cause upgrade friction to other users like myself, and I wish there was an alternative that stayed relaxed about the path.alex
06/29/2020, 8:50 PMalex
06/29/2020, 9:00 PMSCRIPT=`realpath $0`
SCRIPTPATH=`dirname $SCRIPT`
DAGSTER_HOME="$SCRIPTPATH/tmp/dagster"
to resolve the shell script relative path to absolute before setting the env var