fix(dags): use global bin paths and add BashOperator import fallback
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 32s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m9s
Build and Push Docker Images / Build Integrator (push) Successful in 56s
Build and Push Docker Images / Build Kestra Init (push) Successful in 31s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 49s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 0s
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 32s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m9s
Build and Push Docker Images / Build Integrator (push) Successful in 56s
Build and Push Docker Images / Build Kestra Init (push) Successful in 31s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 49s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 0s
- MELTANO_BIN/DBT_BIN pointed to .venv/bin/ but Dockerfile installs globally - Add try/except for BashOperator import to handle both Airflow 3 provider path and legacy path, preventing silent DAG import failures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,12 +15,16 @@ from __future__ import annotations
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
from airflow import DAG
|
from airflow import DAG
|
||||||
from airflow.providers.standard.operators.bash import BashOperator
|
|
||||||
from airflow.utils.task_group import TaskGroup
|
from airflow.utils.task_group import TaskGroup
|
||||||
|
|
||||||
|
try:
|
||||||
|
from airflow.providers.standard.operators.bash import BashOperator
|
||||||
|
except ImportError:
|
||||||
|
from airflow.operators.bash import BashOperator
|
||||||
|
|
||||||
PIPELINE_DIR = "/opt/pipeline"
|
PIPELINE_DIR = "/opt/pipeline"
|
||||||
MELTANO_BIN = f"{PIPELINE_DIR}/.venv/bin/meltano"
|
MELTANO_BIN = "meltano"
|
||||||
DBT_BIN = f"{PIPELINE_DIR}/.venv/bin/dbt"
|
DBT_BIN = "dbt"
|
||||||
|
|
||||||
default_args = {
|
default_args = {
|
||||||
"owner": "school-compare",
|
"owner": "school-compare",
|
||||||
|
|||||||
Reference in New Issue
Block a user