Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Source Google Ads: Delete required start date #30071

Merged

Conversation

tolik0
Copy link
Contributor

@tolik0 tolik0 commented Sep 1, 2023

What

  • Delete start_date from required parameters
  • Fix pagination

How

Set the default value for start_date as two years ago because incremental queries should include WHERE date clause.
Fix pagination to iterate over the pages of response.

Recommended reading order

start_date:

  1. streams.py
  2. source.py

pagination:

  1. google_ads.py

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

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:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • 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
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • 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
  • 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.

@tolik0 tolik0 changed the title ource google ads:delete required start datetime Source Google Ads: Delete required start date Sep 1, 2023
@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Sep 1, 2023
@tolik0 tolik0 changed the title Source Google Ads: Delete required start date 🐛 Source Google Ads: Delete required start date Sep 1, 2023
@tolik0 tolik0 marked this pull request as ready for review September 1, 2023 08:43
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

source-google-ads test report (commit 00cf0172c2) - ❌

⏲️ Total pipeline duration: 48.22s

Step Result
Connector package install
Build source-google-ads docker image for platform linux/x86_64
Unit tests
Code format checks
Validate airbyte-integrations/connectors/source-google-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-google-ads test

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

source-google-ads test report (commit feacc8bd99) - ✅

⏲️ Total pipeline duration: 16mn23s

Step Result
Connector package install
Build source-google-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-google-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-google-ads test

@tolik0 tolik0 self-assigned this Sep 1, 2023
ignored_fields:
accounts:
- name: customer.optimization_score_weight
bypass_reason: "can be updated, also it is sometimes integer, sometimes float"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can manually validate typing and update it if needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -59,7 +59,7 @@ def chunk_date_range(
"""
today = pendulum.today(tz=time_zone)
end_date = min(pendulum.parse(end_date, tz=time_zone), today) if end_date else today
start_date = pendulum.parse(start_date, tz=time_zone)
start_date = pendulum.parse(start_date, tz=time_zone) if start_date else pendulum.now().subtract(years=2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the start date is not specified, we ought to attempt to retrieve all available data. Alternatively, we can include a comment indicating that the date range query parameters are mandatory, prompting us to assign a default start date if it is absent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Date range in mandatory parameter for the query.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

source-google-ads test report (commit 9f0a88a939) - ✅

⏲️ Total pipeline duration: 17mn30s

Step Result
Connector package install
Build source-google-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-google-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-google-ads test

@tolik0 tolik0 requested a review from lazebnyi September 4, 2023 16:20
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

source-google-ads test report (commit 8d93f365b5) - ❌

⏲️ Total pipeline duration: 01mn07s

Step Result
Connector package install
Build source-google-ads docker image for platform linux/x86_64
Unit tests
Code format checks
Validate airbyte-integrations/connectors/source-google-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-google-ads test

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

source-google-ads test report (commit 8003eb3e71) - ✅

⏲️ Total pipeline duration: 14mn28s

Step Result
Connector package install
Build source-google-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-google-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-google-ads test

@@ -42,7 +42,7 @@
"type": ["null", "number"]
},
"customer.optimization_score_weight": {
"type": ["null", "number"]
"type": ["null", "number", "integer"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure that we support two types for one field

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we also have this type of matching in a few different connectors:
source-clockify
source-amplitude
And other
It also doesn't raise errors.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we can update typing during parse response.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

source-google-ads test report (commit 65c171b776) - ❌

⏲️ Total pipeline duration: 29mn48s

Step Result
Connector package install
Build source-google-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-google-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-google-ads test

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

source-google-ads test report (commit 468fbb3b78) - ❌

⏲️ Total pipeline duration: 29mn25s

Step Result
Connector package install
Build source-google-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-google-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-google-ads test

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

source-google-ads test report (commit 62aa09e496) - ✅

⏲️ Total pipeline duration: 20mn14s

Step Result
Connector package install
Build source-google-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-google-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-google-ads test

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

source-google-ads test report (commit ff9eed9879) - ✅

⏲️ Total pipeline duration: 07mn03s

Step Result
Connector package install
Build source-google-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-google-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-google-ads test

@tolik0 tolik0 merged commit 8fe6989 into master Sep 7, 2023
23 of 24 checks passed
@tolik0 tolik0 deleted the tolik0/source-google-ads/delete-required-start-datetime branch September 7, 2023 14:38
@sentry-io
Copy link

sentry-io bot commented Sep 7, 2023

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ google.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC that terminated with: /airbyte/integration_code/source_google_ads/goo... View Issue

Did you find this useful? React with a 👍 or 👎

@oswaldobiolo
Copy link

Hey guys.
After updating my connector version to 0.80, it started showing the following error.
Also, it became very slow after upgrading to this version. Yesterday took more than 4 hours
I rolled back to version 0.7.4 and it works fine again, running in less than 40 minutes

@tolik0
Copy link
Contributor Author

tolik0 commented Sep 12, 2023

@oswaldobiolo Apologies for the 0.80 issues. A pagination fix is in #28970, expected to merge today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/google-ads
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants