airbyte icon indicating copy to clipboard operation
airbyte copied to clipboard

:bug: Source Google Ads: added handling for 401 error while parsing response. added metrics.cost_micros to ad_groups stream

Open darynaishchenko opened this issue 1 year ago • 3 comments

What

resolved: https://github.com/airbytehq/oncall/issues/3466 401 Request is missing required authentication credential

resolved: https://github.com/airbytehq/airbyte/issues/19455

How

Added config error in case of 401 error. Updated ad_groups schema.

darynaishchenko avatar Dec 14 '23 14:12 darynaishchenko

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2024 3:54pm

vercel[bot] avatar Dec 14 '23 14:12 vercel[bot]

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • [x] PR name follows PR naming conventions
  • [x] Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • [x] Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • [x] You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • [x] Secrets in the connector's spec are annotated with airbyte_secret
  • [x] All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • [x] Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • [x] Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • [x] If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

github-actions[bot] avatar Dec 14 '23 14:12 github-actions[bot]

[!WARNING] 🚨 Connector code freeze is in effect until 2024-01-02. This PR is changing connector code. Please contact the current OC engineers if you want to merge this change to master.

github-actions[bot] avatar Dec 21 '23 09:12 github-actions[bot]

@darynaishchenko, the update to add a new field to the ad_group stream is leading to errors for users with the connector set up using a manager account. This is because metrics are not accessible for manager accounts. Here's a snippet from the log indicating the issue:

2024-01-11 18:05:50 source > Marking stream ad_group as STARTED
2024-01-11 18:05:50 source > Syncing stream: ad_group 
2024-01-11 18:05:51 source > Request made: ClientCustomerId: 9016006472, Host: googleads.googleapis.com, Method: /google.ads.googleads.v15.services.GoogleAdsService/Search, RequestId: 07AX5lxXUaVGq_jhuKSV3w, IsFault: True, FaultMessage: Metrics cannot be requested for a manager account. To retrieve metrics, issue separate requests against each client account under the manager account.
2024-01-11 18:05:51 source > Finished syncing ad_group
2024-01-11 18:05:51 source > SourceGoogleAds runtimes:
Syncing stream ad_group 0:00:00.317514
2024-01-11 18:05:51 source > (<_InactiveRpcError of RPC that terminated with:
        status = StatusCode.INVALID_ARGUMENT
        details = "Request contains an invalid argument."
        debug_error_string = "UNKNOWN:Error received from peer ipv4:142.251.208.170:443 {created_time:"2024-01-11T18:05:51.006095582+00:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}"
>, <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.INVALID_ARGUMENT
        details = "Request contains an invalid argument."
        debug_error_string = "UNKNOWN:Error received from peer ipv4:142.251.208.170:443 {created_time:"2024-01-11T18:05:51.006095582+00:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}"
>, errors {
  error_code {
    query_error: REQUESTED_METRICS_FOR_MANAGER

Since blocking this stream for manager accounts impacts other customers' data, I suggest we revert this change.

tolik0 avatar Jan 11 '24 18:01 tolik0