silverbullet1
07/12/2023, 7:01 PMsilverbullet1
07/12/2023, 7:02 PMFROM python:3.11
ARG PROJECT_NAME=redshift-to-postgres
RUN useradd -u 1001 meltano
COPY requirements.txt /tmp/
RUN pip install --requirement /tmp/requirements.txt
RUN mkdir -p $PROJECT_NAME
WORKDIR $PROJECT_NAME
COPY meltano.yml .
COPY tap-redshift .
COPY target-postgres .
RUN chown -R 1001:1001 /$PROJECT_NAME
RUN meltano config meltano set project_id $PROJECT_NAME
RUN meltano install
RUN chown -R 1001:1001 /home/meltano
USER meltano
ENTRYPOINT ["meltano", "run", "tap-redshift", "target-postgres" ]
I have done a git clone of https://github.com/MeltanoLabs/target-postgres/ and tap-redshift is something which I am developing on my local via SDK.silverbullet1
07/12/2023, 7:04 PMtarget-postgres
is using git, I tried removing .git
folder as well.edgar_ramirez_mondragon
07/12/2023, 7:06 PMpoetry-dynamic-versioning
in its build environment, which relies on git to determine the package version: https://github.com/MeltanoLabs/target-postgres/blob/e756da19d07960090c8422d46cc6a021341e8ef3/pyproject.toml#L54-L56
Since you're installing from source (-e .
), pip
is using the build-system toml table to create build venv. Installing from a wheel doesn't have that problemsilverbullet1
07/12/2023, 7:18 PMuser
07/12/2023, 7:24 PMmeltanolabs-target-postgres==0.0.5
visch
07/12/2023, 8:27 PMvisch
07/12/2023, 8:27 PMsilverbullet1
07/12/2023, 9:17 PMError: Block tap-redshift not found
and the same image on my production says
[2023-07-12, 21:37:47 UTC] {pod_launcher.py:159} INFO - [2m2023-07-12T21:37:47.429128Z[0m [[32m[1mdebug [0m] [1mInvoking: ['/redshift-to-postgres/.meltano/extractors/tap-redshift/venv/bin/tap-redshift', '--config', '/redshift-to-postgres/.meltano/run/tap-redshift/tap.f2580981-3c7d-4b91-8197-79314c8eb32b.config.json', '--discover'][0m
[2023-07-12, 21:37:47 UTC] {pod_launcher.py:159} INFO - [2m2023-07-12T21:37:47.505761Z[0m [[32m[1mdebug [0m] [1mDeleted configuration at /redshift-to-postgres/.meltano/run/tap-redshift/tap.f2580981-3c7d-4b91-8197-79314c8eb32b.config.json[0m
[2023-07-12, 21:37:47 UTC] {pod_launcher.py:159} INFO - [2m2023-07-12T21:37:47.515975Z[0m [[31m[1merror [0m] [1mCannot start plugin tap-redshift: Executable 'tap-redshift' could not be found. Extractor 'tap-redshift' may not have been installed yet using `meltano install extractor tap-redshift`, or the executable name may be incorrect.[0m
[2023-07-12, 21:37:47 UTC] {pod_launcher.py:159} INFO - [2m2023-07-12T21:37:47.516604Z[0m [[31m[1merror [0m] [1mBlock run completed. [0m [36mblock_type[0m=[35mExtractLoadBlocks[0m [36merr[0m=[35mRunnerError("Cannot start plugin tap-redshift: Executable 'tap-redshift' could not be found. Extractor 'tap-redshift' may not have been installed yet using `meltano install extractor tap-redshift`, or the executable name may be incorrect.")[0m [36mexit_codes[0m=[35m{}[0m [36mset_number[0m=[35m0[0m [36msuccess[0m=[35mFalse[0m
But I have done meltano install extractor tap-redshift
in my dockerfile, and it ran successfully.
why are both the errors different? I have a feeling that they are related 😮silverbullet1
07/12/2023, 9:19 PMvisch
07/12/2023, 9:19 PMtarget-postgres
sorry I wasn't specific 😅silverbullet1
07/12/2023, 9:20 PMsilverbullet1
07/12/2023, 9:21 PMsilverbullet1
07/12/2023, 9:43 PMsilverbullet1
07/12/2023, 10:01 PMpip freeze
but
meltano invoke target-postgres
gives,
2023-07-12T215955.251006Z [info ] Environment ‘dev’ is active
Need help fixing this problem? Visit http://melta.no/ for troubleshooting steps, or to
join our friendly Slack community.
Executable ‘target-postgres’ could not be found. Loader ‘target-postgres’ may not have been installed yet using meltano install loader target-postgres
, or the executable name may be incorrect.
How do I set the executable path correctly, @edgar_ramirez_mondragon / @visch ?user
07/12/2023, 10:02 PMmeltano install loader target-postgres --clean
silverbullet1
07/12/2023, 10:04 PMmeltano install loader target-postgres
still needs to be in dockerfile, even after pip install is there ?user
07/12/2023, 10:05 PMpip install
in the target venv?silverbullet1
07/12/2023, 10:09 PMmeltanolabs-target-postgres==0.0.5
in the requirements.txt
and it got installed in my container. My Dockerfile and meltano.yml is still the same.edgar_ramirez_mondragon
07/12/2023, 10:12 PMmeltano.yml
, not `requirements.txt`:
plugins:
loaders:
- name: target-postgres
namespace: target_postgres
pip_url: meltanolabs-target-postgres==0.0.5
requirements.txt
is for "system-level" dependencies that should be installed alongside Meltano, i.e. any packages you want to share a virtual env with Meltano. The pip_url
prop is for the individual actual plugin environments.user
07/12/2023, 10:12 PMsilverbullet1
07/12/2023, 10:23 PMsilverbullet1
07/14/2023, 8:34 PMvisch
07/14/2023, 8:35 PMvisch
07/14/2023, 8:35 PMsilverbullet1
07/14/2023, 8:35 PMvisch
07/14/2023, 8:35 PMvisch
07/14/2023, 8:47 PMsilverbullet1
07/14/2023, 8:50 PM