Skip to content

Conversation

@josh-fell
Copy link
Contributor

@josh-fell josh-fell commented Nov 3, 2021

The GoogleCampaignManagerDownloadReportOperator, GoogleDisplayVideo360DownloadReportOperator, and GoogleSearchAdsDownloadReportOperator perform a string validation on the bucket_name arg in their constructor. This arg is a templated field which means the input could be an XComArg. Unfortunately, this string validation fails with AttributeError: 'XComArg' object has no attribute 'startswith' when the input arg for bucket_name is an XComArg.

This PR ensures that, if desired, the bucket_name arg can be successfully passed to these operators as an XComArg.

Also included in this PR is some DRY refactoring of the operator unit tests to use some global variables across tests.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.

@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Nov 3, 2021
@josh-fell josh-fell marked this pull request as ready for review November 3, 2021 16:48
@josh-fell josh-fell requested a review from turbaszek as a code owner November 3, 2021 16:48
@josh-fell josh-fell changed the title Handle XComArg input for bucket_name in Google Marketing Platform operators Move bucket_name validation out of __init__ in Google Marketing Platform operators Nov 8, 2021
@josh-fell josh-fell force-pushed the google-marketing-platform-ops-xcomargs branch from d8bbadb to 1fd8fe8 Compare November 17, 2021 04:20
@uranusjr
Copy link
Member

LGTM, retrying tests.

@uranusjr uranusjr closed this Nov 17, 2021
@uranusjr uranusjr reopened this Nov 17, 2021
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Nov 17, 2021
@josh-fell josh-fell force-pushed the google-marketing-platform-ops-xcomargs branch from 1fd8fe8 to 8fce460 Compare November 28, 2021 18:02
@potiuk potiuk merged commit fb478c0 into apache:main Nov 28, 2021
@potiuk
Copy link
Member

potiuk commented Nov 28, 2021

MSSql errors were unrelated ..

@josh-fell josh-fell deleted the google-marketing-platform-ops-xcomargs branch November 29, 2021 02:14
dillonjohnson pushed a commit to dillonjohnson/airflow that referenced this pull request Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers okay to merge It's ok to merge this PR as it does not require more tests provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants