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: Fix incremental events streams #32102

Merged

Conversation

tolik0
Copy link
Contributor

@tolik0 tolik0 commented Nov 2, 2023

What

This PR resolves issues with incremental streams that utilize the Change Events resource.
Closes: https://github.com/airbytehq/oncall/issues/3257

How

  • Fixed the state format error.
  • Implemented stream slice division into smaller chunks to avoid the query_error: FILTER_HAS_TOO_MANY_VALUES error.

Copy link

vercel bot commented Nov 2, 2023

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

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 3, 2023 8:40am

Copy link
Contributor

github-actions bot commented Nov 2, 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.

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Nov 2, 2023
@tolik0 tolik0 marked this pull request as ready for review November 2, 2023 16:08
@tolik0 tolik0 requested a review from bazarnov November 2, 2023 16:08
@octavia-squidington-iv octavia-squidington-iv requested a review from a team November 2, 2023 16:10
Copy link
Collaborator

@davydov-d davydov-d left a comment

Choose a reason for hiding this comment

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

Can you please describe what the state used to be and what it will be?
What did slices look like and what will they look like?

@octavia-squidington-iv octavia-squidington-iv requested a review from a team November 2, 2023 17:16
Copy link
Collaborator

@davydov-d davydov-d left a comment

Choose a reason for hiding this comment

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

also, given changes like these, I'd ask you to cover them with unit tests

@octavia-squidington-iv octavia-squidington-iv requested a review from a team November 2, 2023 17:23
Copy link
Collaborator

@bazarnov bazarnov left a comment

Choose a reason for hiding this comment

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

Unit Test is required for the new method added. LGTM, otherwise.

@tolik0 tolik0 force-pushed the tolik0/source-google-ads/fix-incremental-events-streams branch from ea19d76 to 3ffa6ac Compare November 2, 2023 21:30
@tolik0
Copy link
Contributor Author

tolik0 commented Nov 2, 2023

@davydov-d The state structure itself has stayed the same. The issue with the previous version was that the state after the first sync wasn't in the expected format; specifically, it was missing the customer ID. Here's the correct version of the state:

{
  "stream_state": {
    "change_status": {
      "12345678": {
        "change_status.last_change_date_time": "2023-08-01 13:20:01.003295"
      }
    }
  }
}

Regarding the slices, their structure remains the same. The only modification I made was to split slice parameter updated_ids into smaller chunks to avoid errors. You can take a look at the corresponding unit tests for more details on this.

Copy link
Collaborator

@davydov-d davydov-d left a comment

Choose a reason for hiding this comment

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

👍

@tolik0 tolik0 merged commit bc500ee into master Nov 3, 2023
25 checks passed
@tolik0 tolik0 deleted the tolik0/source-google-ads/fix-incremental-events-streams branch November 3, 2023 09:59
@tolik0 tolik0 self-assigned this Nov 17, 2023
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