[Bug] Error when using ExecutionMode.VIRTUALENV #1248
Labels
area:execution
Related to the execution environment/mode, like Docker, Kubernetes, Local, VirtualEnv, etc
bug
Something isn't working
execution:virtualenv
Related to Virtualenv execution environment
triage-needed
Items need to be reviewed / assigned to milestone
Astronomer Cosmos Version
Other Astronomer Cosmos version (please specify below)
If "Other Astronomer Cosmos version" selected, which one?
1.7.0
dbt-core version
1.8.5
Versions of dbt adapters
dbt-athena-community==1.8.3
LoadMode
AUTOMATIC
ExecutionMode
VIRTUALENV
InvocationMode
None
airflow version
2.10.1
Operating System
Ubuntu 20.04.6 LTS
If a you think it's an UI issue, what browsers are you seeing the problem on?
No response
Deployment
Amazon (AWS) MWAA
Deployment details
No response
What happened?
Upgraded our MWAA env to 2.10.1 and reviewed our requirements.txt to upgrade the relevant packages. Upgraded astronomer-cosmos from 1.5.1 to 1.7.0. Attempted to follow the https://github.com/astronomer/astronomer-cosmos/blob/main/dev/dags/example_virtualenv.py example dag as we previously used the ExecutionMode.VIRTUALENV and it has changed since 1.6.0 (by the looks of it).
Relevant log output
How to reproduce
`
export AIRFLOW_HOME="/usr/local/airflow"
export DBT_VENV_PATH="${AIRFLOW_HOME}/dbt_venv"
export PIP_USER=false
export PIP_USER=true
export DAGS_HOME="${AIRFLOW_HOME}/dags"
export DBT_EXECUTABLE_PATH="${DBT_VENV_PATH}/bin/dbt"
export AWS_DEFAULT_REGION='ap-southeast-2'
export AIRFLOW__COSMOS__DBT_DOCS_CONN_ID="aws_default"
`
3. Add the following to requirements.txt
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.10.1/constraints-3.11.txt"
airflow-dbt-python==2.1.0
airflow-provider-great-expectations==0.2.7
apache-airflow-providers-amazon==8.28.0
apache-airflow-providers-apprise==1.4.0
apache-airflow-providers-atlassian-jira==2.7.0
apache-airflow-providers-microsoft-mssql==3.9.0
apache-airflow-providers-openlineage==1.11.0
apache-airflow-providers-oracle==3.11.0
apache-airflow-providers-postgres==5.12.0
apache-airflow-providers-sftp==4.11.0
apache-airflow-providers-tableau==4.6.0
astronomer-cosmos==1.7.0
awswrangler[openpyxl]==3.9.0
dbt-athena-community==1.8.4
dbt-core==1.8.7
dbt-postgres==1.8.2
email-validator==2.2.0
geopandas==1.0.1
geoalchemy2==0.14.1
jira==3.6.0
loguru==0.7.2
Office365-REST-Python-Client==2.5.9
openpyxl==3.1.5
pyarrow==14.0.2
pydantic==2.8.2
pydantic-settings==2.1.0
pyogrio==0.7.2
pytest==8.3.2
python-benedict==0.33.1
schema==0.7.5
virtualenv==20.26.3
xxhash==3.4.1
protobuf < 5.26.0
4. set up example dag: example_virtualenv.py
https://github.com/astronomer/astronomer-cosmos/blob/main/dev/dags/example_virtualenv.py
Anything else :)?
Not sure if i have something incorrectly set up but the following code seems to work when running with ExecutionMode.LOCAL> Not sure if I should just go with that or because we're running on MWAA we should continue to use Virtualenv.
My dag.py file:
Are you willing to submit PR?
Contact Details
[email protected]
The text was updated successfully, but these errors were encountered: