Skip to content

Fix dynamic imports in google ads vendored in library#30544

Merged
potiuk merged 1 commit into
mainfrom
further-fix-to-googleads-vendoring
Apr 8, 2023
Merged

Fix dynamic imports in google ads vendored in library#30544
potiuk merged 1 commit into
mainfrom
further-fix-to-googleads-vendoring

Conversation

@potiuk

@potiuk potiuk commented Apr 8, 2023

Copy link
Copy Markdown
Member

This is a further fix to vendor-in google-ads library:

  • moving from _vendor to google_vendor is needed to keep the tree structure separate from google package used in google provider. If we do not do that, ads library will find "google" package when walking up the tree and will determine that this is the "top" google package

  • dynamic imports of ads library imports have been updated to also import from the vendored-in library

  • only v12 version is supported

Closes: #30526


^ 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 newsfragments.

@potiuk potiuk force-pushed the further-fix-to-googleads-vendoring branch from 7a1f530 to 794b50f Compare April 8, 2023 15:17
This is a further fix to vendor-in google-ads library:

* moving from _vendor to google_vendor is needed to keep
  the tree structure separate from `google` package used
  in google provider. If we do not do that, ads library
  will find "google" package when walking up the tree
  and will determine that this is the "top" google package

* dynamic imports of ads library imports have been updated
  to also import from the vendored-in library

* only v12 version is supported

Closes: #30526
@potiuk potiuk force-pushed the further-fix-to-googleads-vendoring branch from 794b50f to b563385 Compare April 8, 2023 15:58
@potiuk potiuk merged commit d9896fd into main Apr 8, 2023
potiuk added a commit to potiuk/airflow that referenced this pull request Apr 10, 2023
potiuk added a commit that referenced this pull request Apr 10, 2023
@collinmcnulty

Copy link
Copy Markdown
Contributor

Just for completeness: I was able to test this and demonstrate that we could use the google secrets manager from the provider and the vendored in package. We got a 503 bad file descriptor error, but I think that's from a syntax difference in the ads API.

potiuk added a commit to potiuk/airflow that referenced this pull request Apr 15, 2023
We've recently added google_venor package to vendor-in ads library,
and we had to do it outside of regular google provider package,
because internally the library assumed our google package is top
level package when discovering the right relative imports (apache#30544).

This confused the pre-commit that updates provider depedencies to
not recognise the package and print warnings about bad classification.

Special case handling will classify it to google provider.
potiuk added a commit that referenced this pull request Apr 15, 2023
We've recently added google_venor package to vendor-in ads library,
and we had to do it outside of regular google provider package,
because internally the library assumed our google package is top
level package when discovering the right relative imports (#30544).

This confused the pre-commit that updates provider depedencies to
not recognise the package and print warnings about bad classification.

Special case handling will classify it to google provider.
wookiist pushed a commit to wookiist/airflow that referenced this pull request Apr 19, 2023
)

We've recently added google_venor package to vendor-in ads library,
and we had to do it outside of regular google provider package,
because internally the library assumed our google package is top
level package when discovering the right relative imports (apache#30544).

This confused the pre-commit that updates provider depedencies to
not recognise the package and print warnings about bad classification.

Special case handling will classify it to google provider.
ephraimbuddy pushed a commit that referenced this pull request Apr 21, 2023
We've recently added google_venor package to vendor-in ads library,
and we had to do it outside of regular google provider package,
because internally the library assumed our google package is top
level package when discovering the right relative imports (#30544).

This confused the pre-commit that updates provider depedencies to
not recognise the package and print warnings about bad classification.

Special case handling will classify it to google provider.

(cherry picked from commit d87eefc)
@potiuk potiuk deleted the further-fix-to-googleads-vendoring branch May 6, 2023 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools area:providers provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Google vendored-in googleads missed one import

3 participants