rigerta
03/21/2023, 3:19 PMdocker run -it new-meltano-version invoke airflow scheduler
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Need help fixing this problem? Visit <http://melta.no/> for troubleshooting steps, or to
join our friendly Slack community.
This Meltano project is deployed as read-only
Can you point me to the right direction of how to start debugging this? Dockerfile in thread ๐งต โฌ๏ธrigerta
03/21/2023, 3:20 PMARG MELTANO_IMAGE=meltano/meltano:v2.16.1-python3.8
FROM $MELTANO_IMAGE
WORKDIR /projects
# Install any additional requirements
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# To fix the pg_config executable not found error
RUN apt-get update && \
apt-get install libpq-dev -y && \
apt-get clean;
# Install all plugins into the `.meltano` directory
COPY ./meltano.yml .
RUN meltano install
RUN meltano upgrade files
# Add Java JDK for
RUN apt-get update && \
apt-get install -y openjdk-11-jdk && \
apt-get clean;
# 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" ]
CMD [ "invoke", "airflow", "scheduler" ]rigerta
03/21/2023, 3:25 PMdocker run -it new-meltano-version installWill Da Silva (Arch)
03/21/2023, 3:28 PMENV MELTANO_PROJECT_READONLY 1 is in the Dockerfile, I wouldn't expect the install command to work. What changes have been made to the Dockerfile between now and when it was last working? Was the only change the Meltano version bump?rigerta
03/21/2023, 3:30 PMrigerta
03/21/2023, 3:30 PMWill Da Silva (Arch)
03/21/2023, 3:32 PMMELTANO_PROJECT_READONLY set to 1, with --log-level=debug passed to meltano?rigerta
03/21/2023, 3:36 PMrigerta
03/21/2023, 3:45 PMrigerta
03/21/2023, 3:45 PMrigerta
03/21/2023, 3:46 PMWill Da Silva (Arch)
03/21/2023, 3:47 PMpat_nadolny
03/21/2023, 3:50 PMairflow.exceptions.AirflowConfigException: error: cannot use sqlite with the LocalExecutor message makes it seem like your configuration for using the postgres database isnt working and its falling back to the default sqlite option. Is it possible to share your meltano.yml? What meltano version are you going from/to?rigerta
03/21/2023, 3:52 PMversion: 1
send_anonymous_usage_stats: false
plugins:
extractors:
- name: tap-xactly
namespace: tap_xactly
pip_url: git+<https://gitlab.com/gitlab-data/meltano_taps.git#subdirectory=tap-xactly>
executable: tap-xactly
capabilities:
- catalog
- discover
- state
settings:
- name: user
- name: password
- name: client_id
- name: consumer
loaders:
- name: target-snowflake--edcast
inherit_from: target-snowflake
variant: meltano
pip_url: git+<https://gitlab.com/gitlab-data/target-snowflake-edcast>
config:
account: gitlab
database: RDEMIRI_PROD
warehouse: LOADING
role: MELTANO
username: $TARGET_EDCAST_SNOWFLAKE_USERNAME
password: $TARGET_EDCAST_SNOWFLAKE_PASSWORD
orchestrators:
- name: airflow
pip_url: psycopg2 apache-airflow==1.10.13 --constraint <https://raw.githubusercontent.com/apache/airflow/constraints-1.10.13/constraints-3.8.txt>
files:
- name: airflow
pip_url: git+<https://gitlab.com/meltano/files-airflow.git>
schedules:
- name: xactly-to-snowflake
interval: 00 0,5 * * *
extractor: tap-xactly
loader: target-snowflake--edcast
transform: skip
start_date: 2021-07-13
project_id: 60140d5b-32f1-49b1-aa37-e7a48dd2ec43rigerta
03/21/2023, 3:53 PMrigerta
03/21/2023, 3:53 PMrigerta
03/21/2023, 4:04 PMpip_url: apache-airflow==2.3.2 --constraint <https://raw.githubusercontent.com/apache/airflow/constraints-2.3.2/constraints-3.8.txt>pat_nadolny
03/21/2023, 4:09 PMpat_nadolny
03/21/2023, 4:09 PMrigerta
03/21/2023, 4:15 PM# Kubernetes Secrets :: Airflow
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
valueFrom:
secretKeyRef:
name: airflow
key: db_connection
- name: AIRFLOW__CORE__DAGBAG_IMPORT_TIMEOUT
value: "120"
- name: AIRFLOW__CORE__EXECUTOR
value: "LocalExecutor"
However, currently I have a new error (debugging, fun ๐) :
[error ] Traceback (most recent call last): โ
โ File "/projects/.meltano/orchestrators/airflow/venv/bin/airflow", line 5, in <module> โ
โ from airflow.__main__ import main โ
โ File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/__init__.py", line 47, in <module> โ
โ settings.initialize() โ
โ File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/settings.py", line 564, in initialize โ
โ configure_orm() โ
โ File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/settings.py", line 270, in configure_orm โ
โ engine = create_engine(SQL_ALCHEMY_CONN, connect_args=connect_args, **engine_args) โ
โ File "<string>", line 2, in create_engine โ
โ File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 298, in warned โ
โ return fn(*args, **kwargs) โ
โ File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/sqlalchemy/engine/create.py", line 548, in create_engine โ
โ dbapi = dialect_cls.dbapi(**dbapi_args) โ
โ File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 753, in dbapi โ
โ import psycopg2 โ
โ ModuleNotFoundError: No module named 'psycopg2'rigerta
03/21/2023, 4:37 PMrigerta
03/21/2023, 6:03 PM