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 custom queries #33603
🐛 Source Google Ads: Fix custom queries #33603
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Before Merging a Connector Pull RequestWow! 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:
If the checklist is complete, but the CI check is failing,
|
acee414
to
62ff722
Compare
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. |
f9933ed
to
d56a474
Compare
@@ -7,7 +7,7 @@ | |||
|
|||
# pin protobuf==3.20.0 as other versions may cause problems on different architectures | |||
# (see https://github.com/airbytehq/airbyte/issues/13580) | |||
MAIN_REQUIREMENTS = ["airbyte-cdk>=0.51.3", "google-ads==22.1.0", "protobuf", "pendulum"] | |||
MAIN_REQUIREMENTS = ["airbyte-cdk>=0.51.3", "google-ads==22.1.0", "protobuf", "pendulum>=3.0.0"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would not this cause any problem?
pendulum was pinned to <3.0
in CDK
#33572
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinned <3.0.0
to align with the CDK
3321b2b
to
fa07d34
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tolik0 I'd prefer that we merge this change in after code freeze.
Did you perform any sort of manual testing to make sure the migration work?
I'd suggest pre-releasing a version and manually test in on an internal cloud workspace to make sure no breaking change is introduced.
class MigrateCustomQuery: | ||
""" | ||
This class stands for migrating the config at runtime, | ||
while providing the backward compatibility when falling back to the previous source version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please share how backward compatibility is guaranteed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the docs. Backward compatibility is achieved by creating a new property instead of editing an existing one.
@@ -84,7 +84,7 @@ | |||
"order": 6, | |||
"format": "date" | |||
}, | |||
"custom_queries": { | |||
"custom_queries_array": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we renaming the field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This property was renamed for backwards compatibility. When falling back to the previous version old property will be used.
] | ||
|
||
|
||
class MigrateCustomQuery: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@airbytehq/connector-extensibility would you consider adding a migration abstract class to the CDK to expose a common migration interface?
| `0.1.1` | 2021-06-23 | [4288](https://github.com/airbytehq/airbyte/pull/4288) | Fix `Bugfix: Correctly declare required parameters` | | ||
| Version | Date | Pull Request | Subject | | ||
|:---------|:-----------|:---------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `3.1.0` | 2023-12-18 | [33603](https://github.com/airbytehq/airbyte/pull/33603) | Fix custom queries | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please be more descriptive about the changes you made? If it's a minor bump it means that you introduced a new feature and not only a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
6a4332d
to
80f9396
Compare
d88368c
to
f7f04af
Compare
f7f04af
to
be9cb5e
Compare
What
This PR addresses two key issues in the custom queries: automatic addition of
segments.date
in the query, which hindered some custom queries, and incorrect field type forDATE
fields. The changes resolve the following issues:How
This update introduces a config migration for existing custom queries to align with the new format. It enables the creation of custom queries without the automatic breakdown by time, maintaining compatibility with all previous query formats. Additionally, it corrects the field type for
DATE
fields by identifying and listing fields that are truly of typedate
. This correction addresses an issue caused by Google Ads not differentiating between date and datetime fields.