airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Change the Link implementation in Google Provider

Open molcay opened this issue 6 months ago • 2 comments

This PR will change the Link implementation in Google Provider to make it clean.

The PR consists of the following:

  • Move the not standardized persist method to the base class.
  • Define extra_links_params method in the operator level to pass static arguments (project_id, location, etc) to the link

I was also planning to get rid of all persist calls with only the operator properties but I realized that the operator instance (operator: BaseOperator) in the get_link method is different in Airflow 2 and 3. Hence, for Airflow 3, on the operator side we don't need to use Link.persist(context=context) but for Airflow 2 we need to use it. After fully migrating to Airflow 3 we may get rid of all usage of persist with context=context


^ Add meaningful description above Read the Pull Request Guidelines for more information. In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed. In case of a new dependency, check compliance with the ASF 3rd Party License Policy. 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 airflow-core/newsfragments.

molcay avatar Jun 10 '25 13:06 molcay

Hi @potiuk ! Can you please check this one? A big update for the Google provider. Thanks :)

VladaZakharova avatar Jun 17 '25 09:06 VladaZakharova

Ineed huge change but easy to review as most of it is the same. Currently Conflicts need to be resolved but I already reviewed it and it's good to go as long as CI agrees.

potiuk avatar Jun 17 '25 12:06 potiuk

@potiuk, I think the CI is finally green :) and also thank you for the review 🙇🏼

molcay avatar Jun 18 '25 08:06 molcay

:tada:

potiuk avatar Jun 18 '25 09:06 potiuk