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

Add support to apache-airflow-providers-cncf-kubernetes < 7.4.0 #553

Merged
merged 3 commits into from
Sep 27, 2023

Conversation

tatiana
Copy link
Collaborator

@tatiana tatiana commented Sep 26, 2023

Try to import KubernetesPodOperator from airflow.providers.cncf.kubernetes.operators.kubernetes_pod (apache-airflow-providers-cncf-kubernetes < 7.4.0), if it is not available in airflow.providers.cncf.kubernetes.operators.pod (apache-airflow-providers-cncf-kubernetes >= 7.4.0).

Users using apache-airflow-providers-cncf-kubernetes < 7.4.0 would get the error message:

Could not import KubernetesPodOperator. Ensure you've installed the Kubernetes provider 
separately or with with `pip install astronomer-cosmos[...,kubernetes]`.

As reported in the #airflow-dbt channel in the Apache Airflow Slack, by Aditya Sharma:
https://apache-airflow.slack.com/archives/C059CC42E9W/p1695076622562159

@tatiana tatiana requested a review from a team as a code owner September 26, 2023 10:13
@tatiana tatiana requested a review from a team September 26, 2023 10:13
@netlify
Copy link

netlify bot commented Sep 26, 2023

👷 Deploy Preview for amazing-pothos-a3bca0 processing.

Name Link
🔨 Latest commit 5225716
🔍 Latest deploy log https://app.netlify.com/sites/amazing-pothos-a3bca0/deploys/6512cb58f384520008aaec7f

@tatiana tatiana temporarily deployed to internal September 26, 2023 10:13 — with GitHub Actions Inactive
@tatiana tatiana added this to the 1.1.2 milestone Sep 26, 2023
@tatiana tatiana temporarily deployed to internal September 26, 2023 11:46 — with GitHub Actions Inactive
@tatiana tatiana temporarily deployed to internal September 26, 2023 12:15 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (d70e6d7) 92.41% compared to head (5225716) 92.44%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #553      +/-   ##
==========================================
+ Coverage   92.41%   92.44%   +0.02%     
==========================================
  Files          49       49              
  Lines        1952     1959       +7     
==========================================
+ Hits         1804     1811       +7     
  Misses        148      148              
Files Coverage Δ
cosmos/__init__.py 100.00% <100.00%> (ø)
cosmos/operators/kubernetes.py 71.71% <100.00%> (+1.19%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tatiana tatiana merged commit 9be9d3b into main Sep 27, 2023
41 checks passed
@tatiana tatiana deleted the support-older-k8s-provider-lower branch September 27, 2023 09:52
tatiana added a commit that referenced this pull request Sep 27, 2023
Bug fixes

* Fix using ``ExecutionMode.KUBERNETES`` by @pgoslatara and @tatiana in #554
* Add support to ``apache-airflow-providers-cncf-kubernetes < 7.4.0`` by @tatiana in #553
* Improve error message in ``config.py`` by @meyobagero in #532
* Use ``returncode`` instead of ``stderr`` to determine dbt graph loading errors by @cliff-lau-cloverhealth in #547
* Fix only create task group and test task only if model has test by @raffifu in #543
* Fix ``on_warning_callback`` behaviour on ``DbtTestLocalOperator`` by @edgga, @marco9663 and @tatiana in #558
* Fix ``DbtTestOperator`` when test does not have ``test_metadata`` by @tatiana in #558
* Fix ``target-path`` not specified issue in ``dbt-project.yml`` by @tatiana in #533

Others

* Docs: add reference links to dbt and Airflow columns by @TJaniF in #542
* pre-commit updates #552 and #546
@tatiana tatiana mentioned this pull request Sep 27, 2023
tatiana added a commit that referenced this pull request Sep 27, 2023
Try to import `KubernetesPodOperator` from
`airflow.providers.cncf.kubernetes.operators.kubernetes_pod`
(`apache-airflow-providers-cncf-kubernetes` < 7.4.0), if it is not
available in `airflow.providers.cncf.kubernetes.operators.pod`
(`apache-airflow-providers-cncf-kubernetes` >= 7.4.0).

Users using `apache-airflow-providers-cncf-kubernetes < 7.4.0` would get
the error message:
```
Could not import KubernetesPodOperator. Ensure you've installed the Kubernetes provider 
separately or with with `pip install astronomer-cosmos[...,kubernetes]`.
```

As reported in the #airflow-dbt channel in the Apache Airflow Slack, by
Aditya Sharma:
https://apache-airflow.slack.com/archives/C059CC42E9W/p1695076622562159
tatiana added a commit that referenced this pull request Sep 27, 2023
Bug fixes

* Fix using `ExecutionMode.KUBERNETES` by @pgoslatara and @tatiana in #554
* Add support to `apache-airflow-providers-cncf-kubernetes < 7.4.0` by @tatiana in #553
* Improve error message in `config.py` by @meyobagero in #532
* Use `returncode` instead of `stderr` to determine dbt graph loading errors by @cliff-lau-cloverhealth in #547
* Fix `on_warning_callback` behaviour on `DbtTestLocalOperator` by @edgga, @marco9663 and @tatiana in #558
* Fix `DbtTestOperator` when test does not have `test_metadata` by @tatiana in #558
* Fix `target-path` not specified issue in `dbt-project.yml` by @tatiana in #533

Others

* Docs: add reference links to dbt and Airflow columns by @TJaniF in #542
* pre-commit updates #552 and #546
tatiana added a commit that referenced this pull request Sep 27, 2023
Bug fixes

* Fix using `ExecutionMode.KUBERNETES` by @pgoslatara and @tatiana in #554
* Add support to `apache-airflow-providers-cncf-kubernetes < 7.4.0` by @tatiana in #553
* Fix `on_warning_callback` behaviour on `DbtTestLocalOperator` by @edgga, @marco9663 and @tatiana in #558
* Use `returncode` instead of `stderr` to determine dbt graph loading errors by @cliff-lau-cloverhealth in #547
* Improve error message in `config.py` by @meyobagero in #532
* Fix `DbtTestOperator` when test does not have `test_metadata` by @tatiana in #558
* Fix `target-path` not specified issue in `dbt-project.yml` by @tatiana in #533

Others

* Docs: add reference links to dbt and Airflow columns by @TJaniF in #542
* pre-commit updates #552 and #546
tatiana added a commit that referenced this pull request Sep 27, 2023
Bug fixes

* Fix using `ExecutionMode.KUBERNETES` by @pgoslatara and @tatiana in #554
* Add support to `apache-airflow-providers-cncf-kubernetes < 7.4.0` by @tatiana in #553
* Fix `on_warning_callback` behaviour on `DbtTestLocalOperator` by @edgga, @marco9663 and @tatiana in #558
* Use `returncode` instead of `stderr` to determine dbt graph loading errors by @cliff-lau-cloverhealth in #547
* Improve error message in `config.py` by @meyobagero in #532
* Fix `DbtTestOperator` when test does not have `test_metadata` by @tatiana in #558
* Fix `target-path` not specified issue in `dbt-project.yml` by @tatiana in #533

Others

* Docs: add reference links to dbt and Airflow columns by @TJaniF in #542
* pre-commit updates #552 and #546

(cherry picked from commit 427f713)
tatiana added a commit that referenced this pull request Sep 27, 2023
Bug fixes

* Fix using `ExecutionMode.KUBERNETES` by @pgoslatara and @tatiana in #554
* Add support to `apache-airflow-providers-cncf-kubernetes < 7.4.0` by @tatiana in #553
* Fix `on_warning_callback` behaviour on `DbtTestLocalOperator` by @edgga, @marco9663 and @tatiana in #558
* Use `returncode` instead of `stderr` to determine dbt graph loading errors by @cliff-lau-cloverhealth in #547
* Improve error message in `config.py` by @meyobagero in #532
* Fix `DbtTestOperator` when test does not have `test_metadata` by @tatiana in #558
* Fix `target-path` not specified issue in `dbt-project.yml` by @tatiana in #533

Others

* Docs: add reference links to dbt and Airflow columns by @TJaniF in #542
* pre-commit updates #552 and #546

(cherry picked from commit 427f713)
(cherry picked from commit 61e4460)
@tatiana tatiana mentioned this pull request Sep 27, 2023
tatiana added a commit that referenced this pull request Sep 28, 2023
This PR is a subset of the actual Release 1.1.2 (#560), since - for this
release - we had to revert a
[commit](#560 (comment))
which we don't intend to revert on the project's main branch.

Bug fixes

* Fix using `ExecutionMode.KUBERNETES` by @pgoslatara and @tatiana in
#554
* Add support to `apache-airflow-providers-cncf-kubernetes < 7.4.0` by
@tatiana in #553
* Fix `on_warning_callback` behaviour on `DbtTestLocalOperator` by
@edgga, @marco9663 and @tatiana in #558
* Use `returncode` instead of `stderr` to determine dbt graph loading
errors by @cliff-lau-cloverhealth in #547
* Improve error message in `config.py` by @meyobagero in #532
* Fix `DbtTestOperator` when test does not have `test_metadata` by
@tatiana in #558
* Fix `target-path` not specified issue in `dbt-project.yml` by @tatiana
in #533

Others

* Docs: add reference links to dbt and Airflow columns by @TJaniF in
#542
* pre-commit updates #552 and #546
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants