Skip to content

feat(source-zendesk-support): Add user-configurable page_size option for ticket_comments stream#71752

Merged
Alfredo Garcia (agarctfi) merged 28 commits into
masterfrom
devin/1768415988-zendesk-configurable-page-size
Feb 2, 2026
Merged

feat(source-zendesk-support): Add user-configurable page_size option for ticket_comments stream#71752
Alfredo Garcia (agarctfi) merged 28 commits into
masterfrom
devin/1768415988-zendesk-configurable-page-size

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Jan 14, 2026

What

Adds a user-configurable page_size option to the Zendesk Support connector for the ticket_comments stream, allowing users to reduce the number of records per API request. This helps prevent timeouts on large datasets.

Related to: https://github.com/airbytehq/oncall/issues/10879

How

  1. Added page_size config option to connector spec (default: 100, max: 1000) specifically for the ticket_comments stream
  2. Created an inline paginator for the ticket_comments stream with interpolated page_size: {{ config.get('page_size', 100) }}
  3. Updated CDK to official version 7.7.0 which includes interpolation support for CursorPagination.page_size (from CDK PR feat(declarative): Add interpolation support for CursorPagination page_size airbyte-python-cdk#878)

Note: Only the ticket_comments stream is affected by this config option. Other streams retain their original pagination behavior.

Updates since last revision

Scoped page_size to ticket_comments only:

  • Removed page_size interpolation from retriever, links_next_paginator, and after_url_paginator
  • Created inline paginator for ticket_comments stream with page_size and page_size_option
  • This ensures the config option only affects the stream that was experiencing timeout issues

Updated to official CDK release:

  • Changed from dev version 7.6.3.post8.dev21075186567 to official 7.7.0
  • Updated both metadata.yaml base image and unit_tests pyproject.toml

CDK v7 compatibility fixes:

  • Fixed check_connection API change: CDK v7 uses check() method returning AirbyteConnectionStatus
  • Updated mock server tests to use with_any_query_params() to handle query parameters flexibly
  • Added HttpClient caching patch in conftest.py to prevent SQLite concurrency issues in tests

Review guide

  1. manifest.yaml - Inline paginator for ticket_comments stream with page_size interpolation
  2. metadata.yaml - CDK base image updated to 7.7.0
  3. unit_tests/pyproject.toml - CDK version updated to 7.7.0
  4. unit_tests/conftest.py - HttpClient caching patch for test stability
  5. unit_tests/unit_test.py - check() API migration
  6. unit_tests/mock_server/*.py - Added with_any_query_params() for flexible query param matching

Reviewer checklist

  • Verify inline paginator for ticket_comments stream is correctly configured
  • Confirm page_size config option only affects ticket_comments stream as intended
  • Verify CDK 7.7.0 is the correct official release with interpolation support

User Impact

Users can configure page_size (1-1000, default 100) to control records per page for the ticket_comments stream. Lower values may help prevent timeouts on large datasets.

Can this PR be safely reverted and rolled back?

  • YES 💚

Requested by: Alfie Richards (@AlfGalf)
Link to Devin run: https://app.devin.ai/sessions/60834cce8286425da190005c9a48ba2b

Add a page_size configuration option to the connector spec that allows
users to control the number of records per page for API requests.
Lower values can help prevent timeouts on large datasets.

Changes:
- Add page_size to spec with default 100, max 1000
- Update all paginators to use config.get('page_size', 100)
- Add page_size_option to end_of_stream_paginator and after_url_paginator

Resolves: airbytehq/oncall#10879
Co-Authored-By: unknown <>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Original prompt from API User
Issue #10879 by @devin-ai-integration[bot]: source-zendesk-support: ticket_comments stream times out on large datasets due to single-slice sync

Issue URL: https://github.com/airbytehq/oncall/issues/10879

Please use playbook macro: !issue_triage

PLAYBOOK_md:
# `/ai-triage` Slash Command Playbook

You are AI Triage Devin, an expert at analyzing Airbyte-related issues and providing actionable insights. You are responding to a GitHub slash command request. After reading the provided context, you should post a comment to confirm you understand the request and stating what your next steps will be, along with a link to your session. Once your triage and analysis is complete, update your comment with the full results of your triage. Collapse all of your comments under expandable sections.

IMPORTANT: Expect that your user has no access to the session and cannot talk with you directly. Do not wait for feedback or confirmation on any action.

## Context

You are analyzing the issue provided to you above. You will need to pull comment history on this issue to ensure you have full context.

## Your Task: Static Analysis and Triage

1. **Issue Analysis and Confirmation**: Read the complete issue content including all comments for full context.
   - **Post an initial comment immediately** (within 1-2 minutes) to confirm you understand the assignment and that you are looking into it. Include your session URL.
   - If you are missing any critical information or context (e.g., workspace UUID, connector version, error logs, reproduction steps, customer environment details), include in your initial comment a request for additional context. (Do not block waiting for an answer, but instead continue as if you will not get any more information in your current session.)

2. **Research**: Check the internet for similar errors, symptoms, or issues reported by the community. Look for:
   - Similar error messages or stack traces in Airbyte documentation.
   - Known issues in Airbyte GitHub ... (11174 chars truncated...)

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Helpful Resources

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • /format-fix - Fixes most formatting issues.
  • /bump-version - Bumps connector versions.
    • You can specify a custom changelog by passing changelog. Example: /bump-version changelog="My cool update"
    • Leaving the changelog arg blank will auto-populate the changelog from the PR title.
  • /bump-progressive-rollout-version - Bumps connector version with an RC suffix for progressive rollouts.
    • Creates a release candidate version (e.g., 2.16.10-rc.1) with enableProgressiveRollout: true
    • Example: /bump-progressive-rollout-version changelog="Add new feature for progressive rollout"
  • /run-cat-tests - Runs legacy CAT tests (Connector Acceptance Tests)
  • /run-regression-tests - Runs regression tests for the modified connector(s).
  • /build-connector-images - Builds and publishes a pre-release docker image for the modified connector(s).
  • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
  • Connector release lifecycle (AI-powered):
    • /ai-prove-fix - Runs prerelease readiness checks, including testing against customer connections.
    • /ai-canary-prerelease - Rolls out prerelease to 5-10 connections for canary testing.
    • /ai-release-watch - Monitors rollout post-release and tracks sync success rates.
  • AI PR Review:
    • /ai-review - AI-powered PR review for connector safety and quality gates.
  • Documentation:
    • /ai-docs-review - Provides AI-powered documentation recommendations for PRs with connector changes.
  • JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
    • /bump-bulk-cdk-version bump=patch changelog='foo' - Bump the Bulk CDK's version. bump can be major/minor/patch.
  • Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.

📝 Edit this welcome message.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 14, 2026

source-zendesk-support Connector Test Results

196 tests   192 ✅  4m 35s ⏱️
  2 suites    4 💤
  2 files      0 ❌

Results for commit 7b47690.

♻️ This comment has been updated with latest results.

…ze_option to paginators

- Update airbyte-cdk from ^6 to ^7 in unit_tests/pyproject.toml to match metadata.yaml
- Add page_size_option to after_url_paginator and end_of_stream_paginator
- Add page_size: 100 to end_of_stream_paginator (was missing)
- Revert user-configurable page_size interpolation (CursorPagination doesn't support it)

Related to: airbytehq/oncall#10879

Co-Authored-By: unknown <>
@devin-ai-integration devin-ai-integration Bot changed the title feat(source-zendesk-support): Add user-configurable page_size option fix(source-zendesk-support): Add page_size_option to paginators and update CDK to ^7 Jan 14, 2026
- Add page_size config option to connector spec (default: 100, max: 1000)
- Update all paginators to use interpolated page_size from config
- Add page_size_option to after_url_paginator and end_of_stream_paginator

This allows users to reduce page_size to help prevent timeouts on large datasets.

Related to: airbytehq/oncall#10879

Co-Authored-By: unknown <>
@devin-ai-integration devin-ai-integration Bot changed the title fix(source-zendesk-support): Add page_size_option to paginators and update CDK to ^7 feat(source-zendesk-support): Add user-configurable page_size option Jan 14, 2026
devin-ai-integration Bot and others added 3 commits January 14, 2026 19:31
…to prevent parameter propagation

CDK 7.x has stricter schema validation that catches $parameters being
propagated to CursorPagination components. This fix adds $parameters: {}
to all CursorPagination definitions to prevent stream-level parameters
(name, path, data_path, primary_key) from being inherited by the
pagination_strategy, which would cause validation errors.

Co-Authored-By: Alfredo Garcia <alfredo.garcia@airbyte.io>
Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
The CDK ^7 version bump caused manifest validation failures due to
stricter schema validation. Reverting to ^6 to fix the 173 test failures.

Also reverts the : {} additions which didn't fix the issue.

Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
@agarctfi
Copy link
Copy Markdown
Contributor

Alfredo Garcia (agarctfi) commented Jan 14, 2026

/poe build

Running poe build...

Link to job logs.

❌ Poe command build failed. Please inspect the logs.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

The /poe build failed with the same schema validation error we've been seeing in CI:

ValidationError: 'page_size': "{{ config.get('page_size', 100) }}" is not valid under any of the given schemas

Root cause: The CDK's CursorPagination schema only accepts integer values for page_size, not Jinja interpolation strings. This is different from OffsetIncrement and PageIncrement which do support interpolation.

Approaches tried
  1. Added page_size interpolation to all paginators with CDK ^6 - Failed
  2. Updated CDK from ^6 to ^7 - Same failure
  3. Added $parameters: {} to prevent parameter propagation - Same failure
  4. Reverted CDK to ^6 - Same failure

Options to move forward:

  1. Revert to static page_size - Remove the interpolation and keep only the page_size_option additions (so per_page is sent to the API with a static value of 100). This doesn't give users control but ensures the parameter is sent.

  2. Request CDK enhancement - Open an issue in airbytehq/airbyte-python-cdk to add interpolation support to CursorPagination.page_size.

  3. Custom Python component - Write a custom paginator that supports configurable page_size (more complex, requires converting from manifest-only to hybrid connector).

Alfredo Garcia (@agarctfi) - Which approach would you like me to pursue?

…ev21075186567

Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
- Fix check_connection API change: use check() method instead of check_connection()
- Add with_any_query_params() to mock server tests to handle per_page parameter
- Update helpers.py, test_organizations.py, test_custom_roles.py, test_schedules.py,
  test_tickets.py, test_topics.py, test_user_identities.py, test_users.py, unit_test.py

Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
HttpResponse(body=json.dumps(response), status_code=status_code),
)
ok, _ = get_source(config=config, state=None).check_connection(logger=logging.Logger(name="airbyte"), config=config)
result = get_source(config=config, state=None).check(logger=logging.Logger(name="airbyte"), config=config)
devin-ai-integration Bot and others added 3 commits January 16, 2026 18:59
- Remove duplicate with_any_query_params() calls in pagination tests
- For pagination tests, only use with_any_query_params() on first page request
- Second page requests (with cursor/page param) don't need with_any_query_params()
  as the cursor/page param already makes them unique

Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
@agarctfi
Copy link
Copy Markdown
Contributor

Alfredo Garcia (agarctfi) commented Jan 16, 2026

/format-fix

Format-fix job started... Check job output.

🟦 Job completed successfully (no changes).

import pytest

# Patch HttpClient to never use caching
from unittest.mock import patch
devin-ai-integration Bot and others added 3 commits January 22, 2026 15:14
- Remove page_size_option from after_url_paginator (wasn't there before)
- Remove page_size and page_size_option from end_of_stream_paginator (weren't there before)
- Keep page_size interpolation only for paginators that already had page_size defined
- This preserves the original API request behavior for streams using these paginators

Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
@agarctfi
Copy link
Copy Markdown
Contributor

Alfredo Garcia (agarctfi) commented Jan 22, 2026

/format-fix

Format-fix job started... Check job output.

✅ Changes applied successfully. (3344496)

from airbyte_cdk.sources.streams.http.http_client import HttpClient, LimiterSession


_original_request_session = HttpClient._request_session
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 22, 2026

Deploy preview for airbyte-docs ready!

✅ Preview
https://airbyte-docs-j8nlq8gvj-airbyte-growth.vercel.app

Built with commit e762a27.
This pull request is being automatically deployed with vercel-action

…s stream only

Remove page_size interpolation from retriever, links_next_paginator, and
after_url_paginator paginators, keeping it only in the ticket_comments
stream's inline paginator. This ensures the page_size config option only
affects the ticket_comments stream as intended.

Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
@agarctfi
Copy link
Copy Markdown
Contributor

Alfredo Garcia (agarctfi) commented Jan 22, 2026

/format-fix

Format-fix job started... Check job output.

✅ Changes applied successfully. (e762a27)

- Update metadata.yaml base image from dev version to official 7.7.0
- Update unit_tests pyproject.toml to use airbyte-cdk 7.7.0
- Regenerate poetry.lock file

Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
@devin-ai-integration devin-ai-integration Bot changed the title feat(source-zendesk-support): Add user-configurable page_size option feat(source-zendesk-support): Add user-configurable page_size option for ticket_comments stream Jan 29, 2026
@agarctfi Alfredo Garcia (agarctfi) marked this pull request as ready for review February 2, 2026 15:04
@agarctfi Alfredo Garcia (agarctfi) merged commit fbd531a into master Feb 2, 2026
42 of 43 checks passed
@agarctfi Alfredo Garcia (agarctfi) deleted the devin/1768415988-zendesk-configurable-page-size branch February 2, 2026 16:54
Kevin Gavino (kpgavino) pushed a commit to kpgavino/airbyte that referenced this pull request Feb 3, 2026
…for ticket_comments stream (airbytehq#71752)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Alfredo Garcia <alfredo.garcia@airbyte.io>
Co-authored-by: Alfredo Garcia <alfredo.garcia@hallmark.edu>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants