Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change example DAGs to use example_conn as opposed to airflow_db #1054

Merged
merged 8 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
hatch run tests.py${{ matrix.python-version }}-${{ matrix.airflow-version }}:test-integration
env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
AIRFLOW_CONN_AIRFLOW_DB: postgres://postgres:[email protected]:5432/postgres
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres
DATABRICKS_HOST: mock
DATABRICKS_WAREHOUSE_ID: mock
DATABRICKS_TOKEN: mock
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
DATABRICKS_UNIQUE_ID="${{github.run_id}}" hatch run tests.py${{ matrix.python-version }}-${{ matrix.airflow-version }}:test-integration-expensive
env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
AIRFLOW_CONN_AIRFLOW_DB: postgres://postgres:[email protected]:5432/postgres
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres
PYTHONPATH: /home/runner/work/astronomer-cosmos/astronomer-cosmos/:$PYTHONPATH
AIRFLOW_CONN_DATABRICKS_DEFAULT: ${{ secrets.AIRFLOW_CONN_DATABRICKS_DEFAULT }}
DATABRICKS_CLUSTER_ID: ${{ secrets.DATABRICKS_CLUSTER_ID }}
Expand All @@ -231,7 +231,7 @@ jobs:

env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
AIRFLOW_CONN_AIRFLOW_DB: postgres://postgres:[email protected]:5432/postgres
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres
PYTHONPATH: /home/runner/work/astronomer-cosmos/astronomer-cosmos/:$PYTHONPATH
AIRFLOW_CONN_DATABRICKS_DEFAULT: ${{ secrets.AIRFLOW_CONN_DATABRICKS_DEFAULT }}
DATABRICKS_CLUSTER_ID: ${{ secrets.DATABRICKS_CLUSTER_ID }}
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
hatch run tests.py${{ matrix.python-version }}-${{ matrix.airflow-version }}:test-integration-sqlite
env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
AIRFLOW_CONN_AIRFLOW_DB: postgres://postgres:[email protected]:5432/postgres
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres
AIRFLOW__CORE__DAGBAG_IMPORT_TIMEOUT: 90.0
PYTHONPATH: /home/runner/work/astronomer-cosmos/astronomer-cosmos/:$PYTHONPATH
COSMOS_CONN_POSTGRES_PASSWORD: ${{ secrets.COSMOS_CONN_POSTGRES_PASSWORD }}
Expand All @@ -295,7 +295,7 @@ jobs:

env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
AIRFLOW_CONN_AIRFLOW_DB: postgres://postgres:[email protected]:5432/postgres
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres
PYTHONPATH: /home/runner/work/astronomer-cosmos/astronomer-cosmos/:$PYTHONPATH

Run-Integration-Tests-DBT-1-5-4:
Expand Down Expand Up @@ -345,7 +345,7 @@ jobs:
hatch run tests.py${{ matrix.python-version }}-${{ matrix.airflow-version }}:test-integration-dbt-1-5-4
env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
AIRFLOW_CONN_AIRFLOW_DB: postgres://postgres:[email protected]:5432/postgres
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres
AIRFLOW__CORE__DAGBAG_IMPORT_TIMEOUT: 90.0
PYTHONPATH: /home/runner/work/astronomer-cosmos/astronomer-cosmos/:$PYTHONPATH
COSMOS_CONN_POSTGRES_PASSWORD: ${{ secrets.COSMOS_CONN_POSTGRES_PASSWORD }}
Expand All @@ -368,7 +368,7 @@ jobs:

env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
AIRFLOW_CONN_AIRFLOW_DB: postgres://postgres:[email protected]:5432/postgres
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres
PYTHONPATH: /home/runner/work/astronomer-cosmos/astronomer-cosmos/:$PYTHONPATH

Run-Performance-Tests:
Expand Down Expand Up @@ -424,7 +424,7 @@ jobs:
cat /tmp/performance_results.txt > $GITHUB_STEP_SUMMARY
env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
AIRFLOW_CONN_AIRFLOW_DB: postgres://postgres:[email protected]:5432/postgres
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres
AIRFLOW__CORE__DAGBAG_IMPORT_TIMEOUT: 90.0
PYTHONPATH: /home/runner/work/astronomer-cosmos/astronomer-cosmos/:$PYTHONPATH
COSMOS_CONN_POSTGRES_PASSWORD: ${{ secrets.COSMOS_CONN_POSTGRES_PASSWORD }}
Expand All @@ -437,7 +437,7 @@ jobs:
MODEL_COUNT: ${{ matrix.num-models }}
env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
AIRFLOW_CONN_AIRFLOW_DB: postgres://postgres:[email protected]:5432/postgres
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres
PYTHONPATH: /home/runner/work/astronomer-cosmos/astronomer-cosmos/:$PYTHONPATH

Code-Coverage:
Expand Down
4 changes: 2 additions & 2 deletions dev/dags/basic_cosmos_dag.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
An example DAG that uses Cosmos to render a dbt project.
An example DAG that uses Cosmos to render a dbt project into an Airflow DAG.
"""

import os
Expand All @@ -16,7 +16,7 @@
profile_name="default",
target_name="dev",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
disable_event_tracking=True,
),
Expand Down
4 changes: 2 additions & 2 deletions dev/dags/basic_cosmos_task_group.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
An example DAG that uses Cosmos to render a dbt project as a TaskGroup.
An example DAG that uses Cosmos to render a dbt project as an Airflow TaskGroup.
"""

import os
Expand All @@ -20,7 +20,7 @@
profile_name="default",
target_name="dev",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
)
Expand Down
4 changes: 2 additions & 2 deletions dev/dags/cosmos_manifest_example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
An example DAG that uses Cosmos to render a dbt project.
An example DAG that uses Cosmos to render a dbt project into Airflow using a dbt manifest file.
"""

import os
Expand All @@ -16,7 +16,7 @@
profile_name="default",
target_name="dev",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
dbt_config_vars=DbtProfileConfigVars(send_anonymous_usage_stats=True),
),
Expand Down
2 changes: 1 addition & 1 deletion dev/dags/cosmos_profile_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def cosmos_profile_mapping() -> None:
profile_name="default",
target_name="dev",
profile_mapping=get_automatic_profile_mapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
),
Expand Down
2 changes: 1 addition & 1 deletion dev/dags/cosmos_seed_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
profile_name="default",
target_name="dev",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
)
Expand Down
2 changes: 1 addition & 1 deletion dev/dags/dbt_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
profile_name="default",
target_name="dev",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
)
Expand Down
4 changes: 2 additions & 2 deletions dev/dags/example_model_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
An example DAG that uses Cosmos to render a dbt project.
An example DAG that uses Cosmos to render a dbt project as an Airflow DAG.
"""

import os
Expand All @@ -16,7 +16,7 @@
profile_name="default",
target_name="dev",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
)
Expand Down
4 changes: 2 additions & 2 deletions dev/dags/example_virtualenv.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
An example DAG that uses Cosmos to render a dbt project.
An example DAG that uses Cosmos to render a dbt project as an Airflow DAG.
"""

import os
Expand All @@ -17,7 +17,7 @@
profile_name="default",
target_name="dev",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
)
Expand Down
4 changes: 2 additions & 2 deletions dev/dags/performance_dag.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
An airflow DAG that uses Cosmos to render a dbt project for performance testing.
An Airflow DAG that uses Cosmos to render a dbt project for performance testing.
"""

import os
Expand All @@ -17,7 +17,7 @@
profile_name="default",
target_name="dev",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
)
Expand Down
4 changes: 2 additions & 2 deletions tests/dbt/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def postgres_profile_config() -> ProfileConfig:
profile_name="default",
target_name="default",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
)
Expand Down Expand Up @@ -265,7 +265,7 @@ def test_load_automatic_without_manifest_with_profile_mapping(mock_load_via_dbt_
profile_name="test",
target_name="test",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
)
Expand Down
2 changes: 1 addition & 1 deletion tests/operators/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
profile_name="default",
target_name="dev",
profile_mapping=PostgresUserPasswordProfileMapping(
conn_id="airflow_db",
conn_id="example_conn",
profile_args={"schema": "public"},
),
)
Expand Down
Loading