You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "kacpermuda (via GitHub)" <gi...@apache.org> on 2025/03/20 12:46:03 UTC

[PR] fix: add explicit requirement for OpenLineage provider>=2.0.0 on OL function [airflow]

kacpermuda opened a new pull request, #47999:
URL: https://github.com/apache/airflow/pull/47999

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   `generate_openlineage_events_from_dbt_cloud_run` assumed the OL provider has some features that were introduced in 2.0.0 version. Added an explicit requirement on the function, so that it throws `AirflowOptionalProviderFeatureException` if the OL provider version is not enough.
   
   As the function checking the provider version is in common.compat, I needed to add compat provider as requirement for DBT cloud provider.
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: add explicit requirement for OpenLineage provider>=2.0.0 on OL function [airflow]

Posted by "kacpermuda (via GitHub)" <gi...@apache.org>.
kacpermuda commented on code in PR #47999:
URL: https://github.com/apache/airflow/pull/47999#discussion_r2005618173


##########
providers/dbt/cloud/pyproject.toml:
##########
@@ -58,6 +58,7 @@ requires-python = "~=3.9"
 # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
 dependencies = [
     "apache-airflow>=2.9.0",
+    "apache-airflow-providers-common-compat>=1.6.0",

Review Comment:
   Done. Is it ok now?



##########
providers/dbt/cloud/pyproject.toml:
##########
@@ -58,6 +58,7 @@ requires-python = "~=3.9"
 # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
 dependencies = [
     "apache-airflow>=2.9.0",
+    "apache-airflow-providers-common-compat>=1.6.0",

Review Comment:
   Done. Is it ok now @eladkal ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: add explicit requirement for OpenLineage provider>=2.0.0 on OL function [airflow]

Posted by "mobuchowski (via GitHub)" <gi...@apache.org>.
mobuchowski commented on PR #47999:
URL: https://github.com/apache/airflow/pull/47999#issuecomment-2747321006

   @potiuk your suggestions make sense to me.
   
   >I have no good idea yet how to store that information in an easy way to know it without going to PyPI and checking
   
   I think for now we need to rely on contributors (and possibly reviewers) checking it manually... maybe this should live in `common` providers documentation?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: add explicit requirement for OpenLineage provider>=2.0.0 on OL function [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #47999:
URL: https://github.com/apache/airflow/pull/47999


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: add explicit requirement for OpenLineage provider>=2.0.0 on OL function [airflow]

Posted by "kacpermuda (via GitHub)" <gi...@apache.org>.
kacpermuda commented on code in PR #47999:
URL: https://github.com/apache/airflow/pull/47999#discussion_r2005586139


##########
providers/dbt/cloud/pyproject.toml:
##########
@@ -58,6 +58,7 @@ requires-python = "~=3.9"
 # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
 dependencies = [
     "apache-airflow>=2.9.0",
+    "apache-airflow-providers-common-compat>=1.6.0",

Review Comment:
   Let me remove it as optional dependency, now that I've added it to required dependency



##########
providers/dbt/cloud/pyproject.toml:
##########
@@ -58,6 +58,7 @@ requires-python = "~=3.9"
 # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
 dependencies = [
     "apache-airflow>=2.9.0",
+    "apache-airflow-providers-common-compat>=1.6.0",

Review Comment:
   Let me remove it as optional dependency, now that I've added it as required dependency



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: add explicit requirement for OpenLineage provider>=2.0.0 on OL function [airflow]

Posted by "kacpermuda (via GitHub)" <gi...@apache.org>.
kacpermuda commented on PR #47999:
URL: https://github.com/apache/airflow/pull/47999#issuecomment-2758503834

   @potiuk The general idea sounds good to me, I'm not sure I follow on how exactly you'd expect it to be done, but I'm eager to make it work. I think this time Elad already bumped the version and prepared the rc1, so I have no need to bum,p the common.compat anymore, but for the next feature I'll make sure to follow this approach. If this makes sense, let me know if we should merge this one then?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: add explicit requirement for OpenLineage provider>=2.0.0 on OL function [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #47999:
URL: https://github.com/apache/airflow/pull/47999#issuecomment-2745155077

   Nice. But I think we should make an explicit bump as a separate PR in `common.compat`. This is something that we should start doing to keep the common.compat more of a managed "what's in which version". 
   
   I think #47909 was a bit wrong in the sense that it did not bump common.compat version to 1.6.0 - such bump should happen there, because that's where the functionality was added, not here where the functionality is "used". 
   
   We can rectify by extracting `common.compat` version bump to a separate PR from this one.
   
   We have no good mechanisms for full automation here (yet - maybe we should introduce it at some point of time), but for now I think it could be relatively easy thing to follow a process similar to this:
   
   1) Make a PR that changes both common.compat - including major version bump - and the provider to use the new feature and make it green (do not merge - it should be draft).
   
   2) Split out the PR part for `common.compat` - where both "common.compat" change and "minor version bump" are done.
   We should also handle the case where we already have an unreleased `common.compat" minor version bumped and we want to add "another" functionality to it - then we do not need to bump the minor version. That part is a bit tricky, because we need to somewhere have the information "common.compat already had minor version bumped but it is not yet relased". I have no good idea yet how to store that information in an easy way to know it without going to PyPI and checking (also being aware that we are just voting new providers including commopn.compate which is a bit of an edge case).  Merge it first.
   
   3) Rebase the original PR (effectively removing the common.compat change from it) and merging only changes related to the provider that needs new "common.compat") - `dbt` in this case.
   
   
   WDYT. @kacpermuda @mobuchowski @eladkal ? Maybe you have some other ideas here and maybe we should write-down a small description on how we approach common.compat changes? 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: add explicit requirement for OpenLineage provider>=2.0.0 on OL function [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #47999:
URL: https://github.com/apache/airflow/pull/47999#discussion_r2005578837


##########
providers/dbt/cloud/pyproject.toml:
##########
@@ -58,6 +58,7 @@ requires-python = "~=3.9"
 # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
 dependencies = [
     "apache-airflow>=2.9.0",
+    "apache-airflow-providers-common-compat>=1.6.0",

Review Comment:
   Is it right?
   `common.compat` is optional dependency
   
   https://github.com/apache/airflow/blob/935d2831fe8fd509b618a738bf00e0c34e186e11/providers/dbt/cloud/pyproject.toml#L66-L75



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: add explicit requirement for OpenLineage provider>=2.0.0 on OL function [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #47999:
URL: https://github.com/apache/airflow/pull/47999#discussion_r2008720457


##########
providers/dbt/cloud/pyproject.toml:
##########
@@ -58,6 +58,7 @@ requires-python = "~=3.9"
 # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
 dependencies = [
     "apache-airflow>=2.9.0",
+    "apache-airflow-providers-common-compat>=1.6.0",

Review Comment:
   Yep. It's good. Now. this is how it should be now :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org