-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
🚨🚨 Migrate source-zendesk-talk
to low code
#35780
🚨🚨 Migrate source-zendesk-talk
to low code
#35780
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
b61f3ee
to
0f1e57b
Compare
|
||
definitions: | ||
authenticator: | ||
class_name: source_zendesk_talk.components.ZendeskTalkAuthenticator |
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 not to use the SelectiveAuthenticator
component?
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 did of course look at that component, but I chose not to use it because I did not see a way to define both the legacy and updated config structure used with BasicHttpAuthenticator
the way the python connector did.
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 think it's okay to change the config structure and make a breaking change?
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 really don't like this idea because if we need to revert, we can't. With such a big change as changing the implementation almost completely, it seems rather risky. I know there is a concern about velocity regarding this as well and I'm not sur how to balance that
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.
if we need to revert, we can't. With such a big change as changing the implementation almost completely, it seems rather risky
This was my thinking as well when I opted to dump the existing nonstandard authentication logic into a custom component instead of just keeping the two non-legacy auth options, which would be possible to do in the manifest with SelectiveAuthenticator
—though given the sparse documentation and lack of existing usages in the repo to use as reference, it might also be a bit slower to build it that way.
0f1e57b
to
8d0f073
Compare
Thank you for the detailed writeup of the steps you took to do it. Very interesting! /cc @girarda.
Let's run regression tests on this and get this merged quickly! @clnoll another candidate for testing here :D |
From my perspective, I definitely vote for configuration migration + custom component. @natikgadzhi Btw, would it be better to calculate the duration of using Airbyte or may be even sync data instead of workspaces qty? Within those 10 workspaces, there could be lightweight connections with newcomers and small amounts of data, as well as heavyweight synchronization processes and users who have been using Airbyte for a long time. Resetting connections or data could be quite painful for them. |
@maxi297, @ambirdsall, I get that CAT output can be scary — a session to get this over the finish line, and coach Alex on how to drive a connector migration through completion would be great 👀 |
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.
Most of the migration seems fine but the devil is in the details!
airbyte-integrations/connectors/source-zendesk-talk/source_zendesk_talk/manifest.yaml
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-zendesk-talk/source_zendesk_talk/manifest.yaml
Show resolved
Hide resolved
airbyte-integrations/connectors/source-zendesk-talk/source_zendesk_talk/components.py
Show resolved
Hide resolved
|
||
definitions: | ||
authenticator: | ||
class_name: source_zendesk_talk.components.ZendeskTalkAuthenticator |
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 really don't like this idea because if we need to revert, we can't. With such a big change as changing the implementation almost completely, it seems rather risky. I know there is a concern about velocity regarding this as well and I'm not sur how to balance that
airbyte-integrations/connectors/source-zendesk-talk/source_zendesk_talk/manifest.yaml
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-zendesk-talk/source_zendesk_talk/manifest.yaml
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-zendesk-talk/source_zendesk_talk/manifest.yaml
Show resolved
Hide resolved
airbyte-integrations/connectors/source-zendesk-talk/source_zendesk_talk/streams.py
Show resolved
Hide resolved
airbyte-integrations/connectors/source-zendesk-talk/source_zendesk_talk/streams.py
Show resolved
Hide resolved
airbyte-integrations/connectors/source-zendesk-talk/source_zendesk_talk/components.py
Show resolved
Hide resolved
There is a log mentioning |
2b4d5c2
to
39e9b58
Compare
e5938e7
to
c0409b2
Compare
Notes based on prior feedback:
|
That's all good
I'm a bit confused as it seems like
It seems like it was never populated anyway so I'm fine with that |
@maxi297 I am honestly not sure how I came to make that mistake; it should indeed be (and now is) inside |
@natikgadzhi I hope I don't come off too defensive here—I agree wholeheartedly with your prioritization of velocity—but I pushed a fix and replies to the corresponding review comments 3 days ago and have since had to take a sick day. I haven't been satisfied with the time to close this out either, but it has not just been idleness. In any case, those breaking change updates are now in place, which I hope clears the way for getting the PR approved shortly and ready to ship along with the other breaking migrations. |
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'm good with this change, thanks for addressing the comments! @bazarnov I would like you to check again so we can have an approval from API Sources as well
airbyte-integrations/connectors/source-zendesk-talk/metadata.yaml
Outdated
Show resolved
Hide resolved
breakingChanges: | ||
1.0.0: | ||
upgradeDeadline: "2024-05-31" | ||
message: "The source Zendesk Talk connector is being migrated from the Python CDK to our declarative low-code CDK. Due to changes to the incremental stream state message format and the removal of a nonexistent field from the ivrs stream schema, this migration constitutes a breaking change. After updating, please reset your source before resuming syncs. For more information, see our migration documentation for source Zendesk Talk." |
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.
@katmarkham can you review the breaking change banner when you get a chance? The connector will be good to go once that's done
What
Converts the
source-zendesk-talk
source to a manifest-based implementation for the low-code CDK. While migrating, I found a logic error with the record parsing of theivr_routes
stream, which actually returned records based on the parentmenus
objects. Closes https://github.com/airbytehq/airbyte-internal-issues/issues/6395How
ivr_routes
andivr_menus
record parsing via thetransformations
key (which would have been technically possible, but extremely tedious to write and maintain), etcSourceZendeskTalkTwo
, alongside the existing python definition along with script definitions, a test catalog for each individual stream, and a testing shell script to run parallel reads of any stream for each. This let me easily compare the results ofspec
andread
calls (by examining record counts and by pasting output into https://jsondiff.com/ to compare the structure of specs and records) to find and fix inconsistenciesivr_menus
andivr_routes
; while doing so I realized that the existing implementation ofivr_routes
was incorrect (see below for more details)SelectiveAuthenticator
to dispatch to the different possible authenticators because I did not see a way to implement both of the existing ways credentials may be fetched from the config forBasicHttpAuthenticator
(this might be possible to implement withSelectiveAuthenticator
, but reading the existing code and documentation I did not see how), and for development speed (there are zero existing usages available for reference).SourceZendeskTalk
, and deleted the testing scripts and catalogs.A bit more on the bug with
ivr_routes
ivrs
,ivr_menus
, andivr_routes
all use the same endpoint and response data, but the latter two parse out child records from arrays within that response: eachivr
contains a list ofmenus
, and eachmenu
contains a list ofroutes
. Here is the old record parsing code fromivr_routes
:Notice that
for menu in ivr["menus"]:
andfor route in ivr["menus"]:
both iterate over the parentmenus
field; the source never iterated through the list of routes within each menu, meaning its records contained extraneous, logically-duplicated data and that its record counts did not accurately reflect the number of route objects returned by the API. I updated the code to actually return oneivr_routes
record per object defined in some menu'sroutes
array.For the testing account whose credentials are stored in Airbyte's company LastPass, there were 52
ivrs
with onemenu
each, but only 11routes
—mostmenus
contained an emptyroutes
array. After this fix, the stream returns the expected data given the actual response JSON.Schema discrepancies between the old and new versions
average_transfers_only_time
field was added to theagents_overview
streamtransfers_only_time
field was added toagents_activity
capabilities.emergency_address
field was added tophone_numbers
exceeded_queue_wait_time
field added tocalls
ivrs.ivr_id
, which does not exist in the API (ivr_id
only exists as an Airbyte-side addition to theivr_menus
/ivr_routes
"child" streams so users have a reference to the parent object they were extracted from;ivrs
themselves just useid
, which was already in the schema)🚨 User Impact 🚨
Breaking changes:
ivr_id
field from theivrs
stream schema: it's not part of the record and should not have been in the definition in the first placeBreaking changes to connectors must be documented by an Airbyte engineer (PR author, or reviewer for community PRs) by using the Breaking Change Release Playbook.*
If there are breaking changes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
Pre-merge Actions
Updating a connector
Community member or Airbyter
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.