brandon_isom
07/09/2021, 7:59 PMmeltano elt
will try to completely reinstall the target, dependencies and all, and the tap just keeps on trucking, so the pipe is gone by the time the target gets to poetry run target-test $* < /dev/stdin
I whipped up a repro case with freshly generated sdk tap and target that is a tap-test
that basically yields from a range(100)
and a target-test
that just writes lines to a text file, just to make sure I wasn't holding it wrong.
Console output in threadbrandon_isom
07/09/2021, 8:00 PMbrandon_isom
07/09/2021, 8:02 PMmeltano files add docker
ARG MELTANO_IMAGE=meltano/meltano:latest
FROM $MELTANO_IMAGE
WORKDIR /project
# Install any additional requirements
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# Install all plugins into the `.meltano` directory
COPY ./meltano.yml .
ADD load/ .
ADD extract/ .
RUN meltano install
# Pin `discovery.yml` manifest by copying cached version to project root
RUN cp -n .meltano/cache/discovery.yml . 2>/dev/null || :
# Don't allow changes to containerized project files
ENV MELTANO_PROJECT_READONLY 1
# Copy over remaining project files
COPY . .
# Expose default port used by `meltano ui`
#EXPOSE 5000
ENTRYPOINT ["meltano"]
aaronsteers
07/09/2021, 8:06 PMaaronsteers
07/09/2021, 8:15 PMpoetry install
being inside the target .sh
script. I would try removing poetry install
from the shell script and making sure poetry install runs in another way - perhaps during within the dockerfile (you'll just need to cd into the directory first).aaronsteers
07/09/2021, 8:16 PMbrandon_isom
07/09/2021, 8:17 PMbrandon_isom
07/09/2021, 8:18 PMdocker run --rm repro elt tap-test target-test
aaronsteers
07/09/2021, 8:18 PMbrandon_isom
07/09/2021, 8:18 PMdocker build . -t repro
aaronsteers
07/09/2021, 8:19 PMcd /path/to/target && poetry install
within the dockerfile and then removing that install from the target-mytarget.sh shell script?brandon_isom
07/09/2021, 8:30 PMARG MELTANO_IMAGE=meltano/meltano:latest
FROM $MELTANO_IMAGE
WORKDIR /project
# Install any additional requirements
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# Install all plugins into the `.meltano` directory
# Copy over remaining project files
COPY . .
RUN cd load/target-test && poetry install
RUN cd extract/tap-test && poetry install
RUN meltano install
# Pin `discovery.yml` manifest by copying cached version to project root
RUN cp -n .meltano/cache/discovery.yml . 2>/dev/null || :
# Don't allow changes to containerized project files
ENV MELTANO_PROJECT_READONLY 1
ENTRYPOINT ["meltano"]
brandon_isom
07/09/2021, 8:31 PM➜ repro git:(repro) ✗ docker run --rm repro elt tap-test target-test
meltano | Running extract & load...
meltano | No state was found, complete import.
target-test | /project/load/target-test/target-test.sh: 14: /project/load/target-test/target-test.sh: cannot open /dev/stdin: No such device or address
meltano | Loading failed (2): /project/load/target-test/target-test.sh: 14: /project/load/target-test/target-test.sh: cannot open /dev/stdin: No such device or address
meltano | ELT could not be completed: Loader failed
ELT could not be completed: Loader failed
aaronsteers
07/09/2021, 8:35 PMbrandon_isom
07/09/2021, 8:35 PMaaronsteers
07/09/2021, 8:38 PMbrandon_isom
07/09/2021, 8:50 PMmeltano elt tap-test target-test
still blows up but meltano invoke tap-test | meltano invoke target-test
works fineaaronsteers
07/09/2021, 8:51 PMaaronsteers
07/09/2021, 8:53 PMaaronsteers
07/09/2021, 8:55 PMaaronsteers
07/09/2021, 8:57 PMpip_url
and removing executable
(if it matches your use case) would also presumably solve this. (Albeit not ideal for iterative testing.)brandon_isom
07/09/2021, 9:01 PMpip_url: ./load/target-glue
and then RUN cd load/target-test && poetry build
then the meltano install
works just finebrandon_isom
07/09/2021, 9:01 PMdocker run --rm repro elt tap-test target-test
works finebrandon_isom
07/09/2021, 9:01 PMbrandon_isom
07/09/2021, 9:03 PMaaronsteers
07/09/2021, 9:05 PMbrandon_isom
07/09/2021, 9:10 PM