Skip to content

fix(google-ads): support flat extra format from connection form#62791

Open
yuseok89 wants to merge 4 commits intoapache:mainfrom
yuseok89:fix/google-ads-hook-extra-format
Open

fix(google-ads): support flat extra format from connection form#62791
yuseok89 wants to merge 4 commits intoapache:mainfrom
yuseok89:fix/google-ads-hook-extra-format

Conversation

@yuseok89
Copy link
Contributor

@yuseok89 yuseok89 commented Mar 3, 2026

This PR resolves a mismatch between the Google Ads connection form and the hook's expected input format. I discovered this issue while testing another PR(#61334). When users filled in the connection form (developer token, client ID, client secret, refresh token), the values were stored as flat keys in extra. However, the hook only read the nested google_ads_client structure, causing connection failures.

Before

Error when entering values via the connection form:

image

What the hook expected (nested format):

image

After

Supported connection form fields (flat format stored in extra):

image

How the connection was tested:

ads_hook = GoogleAdsHook(gcp_conn_id=..., google_ads_conn_id=...)
accessible = ads_hook.list_accessible_customers()  # Succeeds with flat extra

The hook now accepts both:

  • Flat format (from connection form): developer_token, client_id, etc. at top level
  • Nested format (legacy): google_ads_client with nested keys

Connection works when entering values via the connection form.

image
Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    • Cursor

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@yuseok89 yuseok89 requested a review from shahar1 as a code owner March 3, 2026 15:11
@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant