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

Update contributing docs for running integration tests #638

Merged

Conversation

jbandoro
Copy link
Collaborator

@jbandoro jbandoro commented Nov 1, 2023

Description

In order to run the integration tests locally without errors I had to set more environment variables than the ones that are currently in the docs. If these were excluded I would get errors like:

tests/test_example_dags_no_connections.py:59: in <module>
    @pytest.mark.parametrize("dag_id", get_dag_ids())
tests/test_example_dags_no_connections.py:54: in get_dag_ids
    dag_bag = get_dag_bag()
tests/test_example_dags_no_connections.py:49: in get_dag_bag
    assert not db.import_errors
E   AssertionError: assert not {'/Users/justin.bandoro/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last...ema.yml from project jaffle_shop: Parsing Error\n    Env var required but not provided: \'DATABRICKS_CLUSTER_ID\'\n\n'}
E    +  where {'/Users/justin.bandoro/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last...ema.yml from project jaffle_shop: Parsing Error\n    Env var required but not provided: \'DATABRICKS_CLUSTER_ID\'\n\n'} = <airflow.models.dagbag.DagBag object at 0x1579cd000>.import_errors

Let me know if I missed something that was already in the docs, this PR might help anyone else trying to run integration tests for the first time.

Related Issue(s)

None

Breaking Change?

None

Checklist

  • I have made corresponding changes to the documentation (if required)

@jbandoro jbandoro requested a review from a team as a code owner November 1, 2023 01:36
@jbandoro jbandoro requested a review from a team November 1, 2023 01:36
Copy link

netlify bot commented Nov 1, 2023

👷 Deploy Preview for amazing-pothos-a3bca0 processing.

Name Link
🔨 Latest commit 8efa3f7
🔍 Latest deploy log https://app.netlify.com/sites/amazing-pothos-a3bca0/deploys/6541ab84b4a8d20008fbe973

@jbandoro jbandoro temporarily deployed to external November 1, 2023 01:36 — with GitHub Actions Inactive
Copy link
Collaborator

@tatiana tatiana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very valuable contribution, thanks, @jbandoro !

@tatiana tatiana merged commit 156e51d into astronomer:main Nov 2, 2023
27 of 40 checks passed
tatiana pushed a commit that referenced this pull request Nov 6, 2023
To run the integration tests locally without errors, developers have to
set more environment variables than the ones that are currently in the
docs. If these were excluded, they would get errors like:

```shell
tests/test_example_dags_no_connections.py:59: in <module>
    @pytest.mark.parametrize("dag_id", get_dag_ids())
tests/test_example_dags_no_connections.py:54: in get_dag_ids
    dag_bag = get_dag_bag()
tests/test_example_dags_no_connections.py:49: in get_dag_bag
    assert not db.import_errors
E   AssertionError: assert not {'/Users/justin.bandoro/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last...ema.yml from project jaffle_shop: Parsing Error\n    Env var required but not provided: \'DATABRICKS_CLUSTER_ID\'\n\n'}
E    +  where {'/Users/justin.bandoro/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last...ema.yml from project jaffle_shop: Parsing Error\n    Env var required but not provided: \'DATABRICKS_CLUSTER_ID\'\n\n'} = <airflow.models.dagbag.DagBag object at 0x1579cd000>.import_errors
```

(cherry picked from commit 156e51d)
tatiana added a commit that referenced this pull request Nov 6, 2023
Bug fixes

* Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in #634
* Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in #615

Others

* Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in #629
* Update contributing docs for running integration tests by @jbandoro in #638
* Fix CI issue running integration tests by @tatiana in #640 and #644
* pre-commit updates in #637
@tatiana tatiana mentioned this pull request Nov 6, 2023
tatiana pushed a commit that referenced this pull request Nov 6, 2023
To run the integration tests locally without errors, developers have to
set more environment variables than the ones that are currently in the
docs. If these were excluded, they would get errors like:

```shell
tests/test_example_dags_no_connections.py:59: in <module>
    @pytest.mark.parametrize("dag_id", get_dag_ids())
tests/test_example_dags_no_connections.py:54: in get_dag_ids
    dag_bag = get_dag_bag()
tests/test_example_dags_no_connections.py:49: in get_dag_bag
    assert not db.import_errors
E   AssertionError: assert not {'/Users/justin.bandoro/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last...ema.yml from project jaffle_shop: Parsing Error\n    Env var required but not provided: \'DATABRICKS_CLUSTER_ID\'\n\n'}
E    +  where {'/Users/justin.bandoro/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last...ema.yml from project jaffle_shop: Parsing Error\n    Env var required but not provided: \'DATABRICKS_CLUSTER_ID\'\n\n'} = <airflow.models.dagbag.DagBag object at 0x1579cd000>.import_errors
```

(cherry picked from commit 156e51d)
tatiana added a commit that referenced this pull request Nov 6, 2023
Bug fixes

* Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in #634
* Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in #615

Others

* Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in #629
* Update contributing docs for running integration tests by @jbandoro in #638
* Fix CI issue running integration tests by @tatiana in #640 and #644
* pre-commit updates in #637
@tatiana tatiana added this to the 1.2.2 milestone Nov 7, 2023
tatiana added a commit that referenced this pull request Nov 7, 2023
Bug fixes

* Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in #634
* Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in #615

Others

* Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in #629
* Update contributing docs for running integration tests by @jbandoro in #638
* Fix CI issue running integration tests by @tatiana in #640 and #644
* pre-commit updates in #637

(cherry picked from commit fa0620a)
tatiana added a commit that referenced this pull request Dec 5, 2023
[Justin Bandoro](https://www.linkedin.com/in/justin-bandoro-592b14a7/)
(@jbandoro) is a Data Engineer at Kevala Inc. He's based in San
Francisco (USA) and has been an early adopter of Cosmos, using it
regularly at his company.

Not only has he been using Cosmos since the early stages, but he has
consistently improved Cosmos since January 2023:
![Screenshot 2023-12-04 at 16 28
29](https://github.com/astronomer/astronomer-cosmos/assets/272048/43197938-d1ab-431f-b101-b6026e5cd3ab)

Some of his contributions include new features, code quality,
documentation and overall improvements. Some examples:
* Speed up integration tests in 67% #732 
* Prevent override of dbt profile fields #702
* Add support for env vars in `RenderConfig` in #690 
* Use symbolic links to run local tasks, avoiding to copy potentially
huge dbt project folders in #660
* Improve documentation in #638
* Automated and improved the code complexity checks in #629
* Added `DbtDocsGCSOperator` in #616 
* Added support for Python 3.7 in #88 and #214

Additionally, he has been interacting with users in the #airflow-dbt
Slack channel in a very collaborative and supportive way.

We want to promote him as a Cosmos committer and maintainer for all
these, recognising his constant efforts and achievements towards our
community. Thank you very much, @jbandoro !
arojasb3 pushed a commit to arojasb3/astronomer-cosmos that referenced this pull request Jul 14, 2024
Bug fixes

* Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in astronomer#634
* Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in astronomer#615

Others

* Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in astronomer#629
* Update contributing docs for running integration tests by @jbandoro in astronomer#638
* Fix CI issue running integration tests by @tatiana in astronomer#640 and astronomer#644
* pre-commit updates in astronomer#637

(cherry picked from commit fa0620a)
arojasb3 pushed a commit to arojasb3/astronomer-cosmos that referenced this pull request Jul 14, 2024
[Justin Bandoro](https://www.linkedin.com/in/justin-bandoro-592b14a7/)
(@jbandoro) is a Data Engineer at Kevala Inc. He's based in San
Francisco (USA) and has been an early adopter of Cosmos, using it
regularly at his company.

Not only has he been using Cosmos since the early stages, but he has
consistently improved Cosmos since January 2023:
![Screenshot 2023-12-04 at 16 28
29](https://github.com/astronomer/astronomer-cosmos/assets/272048/43197938-d1ab-431f-b101-b6026e5cd3ab)

Some of his contributions include new features, code quality,
documentation and overall improvements. Some examples:
* Speed up integration tests in 67% astronomer#732 
* Prevent override of dbt profile fields astronomer#702
* Add support for env vars in `RenderConfig` in astronomer#690 
* Use symbolic links to run local tasks, avoiding to copy potentially
huge dbt project folders in astronomer#660
* Improve documentation in astronomer#638
* Automated and improved the code complexity checks in astronomer#629
* Added `DbtDocsGCSOperator` in astronomer#616 
* Added support for Python 3.7 in astronomer#88 and astronomer#214

Additionally, he has been interacting with users in the #airflow-dbt
Slack channel in a very collaborative and supportive way.

We want to promote him as a Cosmos committer and maintainer for all
these, recognising his constant efforts and achievements towards our
community. Thank you very much, @jbandoro !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants