Bug: operator_args
are modified in place in the Airflow converter
#833
Labels
area:config
Related to configuration, like YAML files, environment variables, or executer configuration
dbt:run
Primarily related to dbt run command or functionality
execution:local
Related to Local execution environment
parsing:custom
Related to custom parsing, like custom DAG parsing, custom DBT parsing, etc
A user reported this in the Slack thread here. Even though we deprecated
operator_args
vars
andenv
in favor ofProjectConfig.dbt_vars
andProjectConfig.env_vars
, there is now a problem where if a user suppliesoperator_args
to multipleDbtDag
orDbtTaskGroup
's with vars on env, they will only be used in the first dag/task group object.Example problem (copied from the user report)
The responsible lines for this bug are in the converter is below:
astronomer-cosmos/cosmos/converter.py
Lines 224 to 225 in 714ecbd
The fix is really straightforward, to use
get
instead ofpop
in the lines above, this is ok because Cosmos will already raise an exception if bothoperator_args
andProjectConfig
with env vars or dbt vars are both set here.The text was updated successfully, but these errors were encountered: