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-zendesk-support-native: misc fixes #2329

Merged
merged 4 commits into from
Feb 3, 2025

Conversation

Alex-Bair
Copy link
Member

@Alex-Bair Alex-Bair commented Feb 3, 2025

Description:

This PR includes a few miscellaneous fixes for bugs in source-zendesk-support-native. These fixes include:

  1. Validating the start_date is at least the epoch so converting to a timestamp always results in a non-negative number.
  2. Avoiding aiohttp TimeoutErrors for ticket child streams by not trying to maintain a long-lived streaming response when fetching parent tickets.
  3. Using a smaller page size for ticket_metrics to reduce how much processing Zendesk must do for a response & avoid intermediate gateways from sending us 504 timeout responses.
    i. We might want to make this configurable later or surface 5xx responses through our CDK at some point, but that level of effort isn't necessary right now.

Workflow steps:

(How does one use this feature, and how has it changed)

Documentation links affected:

(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)

Notes for reviewers:

Tested on a local stack. Confirmed:

  • Entering a start date of before the epoch is not accepted as a valid value & prevents task creation.
  • Ticket child streams, like ticket_comments and ticket_audits, no longer experience TimeoutErrors from aiohttp.
  • ticket_metrics requests complete successfully & avoid 504 responses when using a smaller page size.

This change is Reviewable

Using a start date before the epoch (i.e. a negative timestamp) in
requests to Zendesk result in a 400 error. Validating the start date
isn't before the epoch should avoid these errors.
…ating through a tickets response

With the change to streaming incremental export responses, ticket child
resource streams ended up trying to maintain a long-lived tickets
response while fetching child resources for each ticket within the
response. This caused `aiohttp` TimeoutErrors. To get around this, we
fetch all tickets in a single response then fetch child resources for
those tickets.
…ponses in `ticket_metrics`

Side loading metric sets can cause Zendesk's API to take a while to
respond. Using the max page size of 1,000 has caused the intermediate
routers/gateways to return a 504 response. This commit reduces the page
size for `ticket_metrics` to 500 to mitigate these 504 responses.
@Alex-Bair Alex-Bair marked this pull request as ready for review February 3, 2025 22:17
@Alex-Bair Alex-Bair requested a review from a team February 3, 2025 22:17
Copy link
Member

@williamhbaker williamhbaker left a comment

Choose a reason for hiding this comment

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

LGTM

@Alex-Bair Alex-Bair merged commit 7637c73 into main Feb 3, 2025
78 of 84 checks passed
@Alex-Bair Alex-Bair deleted the bair/zendesk-native-misc-fixes branch February 3, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants