Skip to content

(Do not Merge) testing for source-intercom block simultaneous read from companies endpoint#74344

Draft
Alfredo Garcia (agarctfi) wants to merge 4 commits intomasterfrom
devin/1772837111-source-intercom-block-simultaneous-read
Draft

(Do not Merge) testing for source-intercom block simultaneous read from companies endpoint#74344
Alfredo Garcia (agarctfi) wants to merge 4 commits intomasterfrom
devin/1772837111-source-intercom-block-simultaneous-read

Conversation

@agarctfi
Copy link
Copy Markdown
Contributor

@agarctfi Alfredo Garcia (agarctfi) commented Mar 6, 2026

What

Testing PR that copies changes from #71141 (at commit ab9549804ef) onto a fresh branch from master. This enables testing the block_simultaneous_read / stream_groups feature for the Intercom companies endpoint against the current mainline.

Related: airbytehq/airbyte-python-cdk#870, airbytehq/airbyte-python-cdk#940

⚠️ This PR is NOT intended to be merged. It exists solely for integration testing of the block_simultaneous_read feature with a dev CDK build.

How

  1. manifest.yaml: Adds stream_groups with BlockSimultaneousSyncsAction for the companies stream to prevent concurrent reads that cause Intercom API errors. Adds api_budget for rate limiting, concurrency_level with a user-configurable num_workers parameter, and swaps in a CustomErrorHandler (ErrorHandlerWithRateLimiter) for proactive rate-limit throttling.
  2. metadata.yaml: Pins base image to dev CDK version 7.10.2.post31.dev22785446959 (which includes stream_groups support). Bumps dockerImageTag to 0.13.16-rc.5.
  3. poe_tasks.toml (new): Overrides default tasks to pin the CDK CLI to the same dev version.
  4. unit_tests/pyproject.toml + poetry.lock: Pins test dependency to airbyte-cdk==7.10.2.post31.dev22785446959 and regenerates lock file.
  5. docs/integrations/sources/intercom.md: Reformatted changelog table; added entry for 0.13.16-rc.5.

Updates since last revision

  • Updated CDK version from 7.6.1.post28.dev227247008457.10.2.post31.dev22785446959 in all locations (metadata.yaml, poe_tasks.toml, unit_tests/pyproject.toml) per review comment. Regenerated poetry.lock accordingly.

Review guide

⚠️ Key risk: The ErrorHandlerWithRateLimiter custom component is referenced in manifest.yaml but its Python source is not included in this diff. Verify it already exists in the connector's components/ directory.

  1. manifest.yaml — Main logic changes: stream_groups, api_budget, concurrency_level, error handler swap
  2. metadata.yaml — Dev CDK pinning and version bump
  3. poe_tasks.toml — New file for CDK CLI version override

Human review checklist

  • Confirm ErrorHandlerWithRateLimiter exists in source_declarative_manifest.components — it's referenced but not in the diff
  • Verify CDK 7.10.2.post31.dev22785446959 includes the stream_groups / BlockSimultaneousSyncsAction features
  • Confirm poetry.lock resolves cleanly against the new CDK version (lock was regenerated with poetry lock)

User Impact

When deployed, syncs that include both the companies stream and its child company_segments will no longer make simultaneous API calls to the companies endpoint, preventing Intercom API rejection errors. The new num_workers config allows users to tune concurrency (default 10, max 40).

Can this PR be safely reverted and rolled back?

  • YES 💚

Link to Devin Session: https://app.devin.ai/sessions/dc102341e19a43b09eb71b8124207e91
Requested by: Alfredo Garcia (@agarctfi)

Adds block_simultaneous_read configuration, concurrency_level, api_budget,
configurable num_workers, and pins CDK to dev version with stream_groups support.

Cherry-picked from PR #71141 at commit ab95498.

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

🤖 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

@octavia-bot octavia-bot Bot marked this pull request as draft March 6, 2026 22:47
@octavia-bot
Copy link
Copy Markdown
Contributor

octavia-bot Bot commented Mar 6, 2026

Note

📝 PR Converted to Draft

More info...

Thank you for creating this PR. As a policy to protect our engineers' time, Airbyte requires all PRs to be created first in draft status. Your PR has been automatically converted to draft status in respect for this policy.

As soon as your PR is ready for formal review, you can proceed to convert the PR to "ready for review" status by clicking the "Ready for review" button at the bottom of the PR page.

To skip draft status in future PRs, please include [ready] in your PR title or add the skip-draft-status label when creating your PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

PR Slash Commands

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

  • 🛠️ Quick Fixes
    • /format-fix - Fixes most formatting issues.
    • /bump-version - Bumps connector versions, scraping changelog description from the PR title.
  • ❇️ AI Testing and Review (internal link: AI-SDLC Docs):
    • /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-review - AI-powered PR review for connector safety and quality gates.
  • 🚀 Connector Releases:
    • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
    • /bump-progressive-rollout-version - Bumps connector version with an RC suffix (2.16.10-rc.1) for progressive rollouts (enableProgressiveRollout: true).
      • Example: /bump-progressive-rollout-version changelog="Add new feature for progressive rollout"
  • ☕️ 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
  • 🐍 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.
  • ⚙️ Admin commands:
    • /force-merge reason="<REASON>" - Force merges the PR using admin privileges, bypassing CI checks. Requires a reason.
      Example: /force-merge reason="CI is flaky, tests pass locally"
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

source-intercom Connector Test Results

13 tests   9 ✅  13s ⏱️
 2 suites  4 💤
 2 files    0 ❌

Results for commit ecf403c.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

Deploy preview for airbyte-docs ready!

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

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

Comment thread airbyte-integrations/connectors/source-intercom/metadata.yaml Outdated
Co-Authored-By: alfredo.garcia@airbyte.io <freddy.garcia7.fg@gmail.com>
@agarctfi
Copy link
Copy Markdown
Contributor Author

Alfredo Garcia (agarctfi) commented Mar 6, 2026

/format-fix

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

🟦 Job completed successfully (no changes).

@agarctfi
Copy link
Copy Markdown
Contributor Author

Alfredo Garcia (agarctfi) commented Mar 6, 2026

/publish-connectors-prerelease

Pre-release Connector Publish Started

Publishing pre-release build for connector source-intercom.
PR: #74344

Pre-release versions will be tagged as {version}-preview.ca02a2a
and are available for version pinning via the scoped_configuration API.

View workflow run
Pre-release Publish: SUCCESS

Docker image (pre-release):
airbyte/source-intercom:0.13.16-rc.5-preview.ca02a2a

Docker Hub: https://hub.docker.com/layers/airbyte/source-intercom/0.13.16-rc.5-preview.ca02a2a

Registry JSON:

@agarctfi
Copy link
Copy Markdown
Contributor Author

For companies & company_segments; We may need to update the ErrorHandler to retry on the scroll 400 error, since there is no delay between these running sequentially, which will cause the subsequent stream in a group to still fail for:

The backoff should be 1 minutes since that is how long it takes for a scroll to expire

2026-03-09 09:22:59 source ERROR 'GET' request to 'https://api.intercom.io/companies/scroll' failed with status code '400' and error message: 'scroll already exists for this workspace'. 

@agarctfi
Copy link
Copy Markdown
Contributor Author

For contacts stream can we also add 404 handling to skip

… 404 skip for contacts

- Companies stream: Change 400 'scroll already exists' from FAIL to RETRY with
  60-second constant backoff (scroll expiry time is ~1 minute)
- Contacts stream: Add 404 response filter with IGNORE action to skip on 404

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

Both asks from comment 1 and comment 2 are addressed in ecf403c:

  1. Companies scroll 400 retry: Changed the 400 error handler from FAIL to RETRY with a ConstantBackoffStrategy of 60 seconds, so the connector waits for the existing scroll to expire before retrying.
  2. Contacts 404 skip: Added a 404 IGNORE filter to the contacts stream error handler.

Devin session

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Addressed both comments in commit ecf403c:

1. Companies 400 scroll error retry (re: comment):

  • Changed 400 response from FAILRETRY
  • Added ConstantBackoffStrategy with backoff_time_in_seconds: 60 to the companies error handler
  • Updated error message to: "Scroll already exists for this workspace. Retrying after backoff to allow the existing scroll to expire."

2. Contacts 404 skip (re: comment):

  • Added HttpResponseFilter for 404 with IGNORE action to the contacts stream error handler

All CI passing — connector tests: 9 ✅, 4 💤. Ready for a new pre-release publish when you're ready.

@agarctfi
Copy link
Copy Markdown
Contributor Author

Alfredo Garcia (agarctfi) commented Mar 9, 2026

/publish-connectors-prerelease

Pre-release Connector Publish Started

Publishing pre-release build for connector source-intercom.
PR: #74344

Pre-release versions will be tagged as {version}-preview.ecf403c
and are available for version pinning via the scoped_configuration API.

View workflow run
Pre-release Publish: SUCCESS

Docker image (pre-release):
airbyte/source-intercom:0.13.16-rc.5-preview.ecf403c

Docker Hub: https://hub.docker.com/layers/airbyte/source-intercom/0.13.16-rc.5-preview.ecf403c

Registry JSON:

…onnector config

- Add api_rate_limit config option (requests per minute, default: 10000)
- api_budget now derives limits from config: 95% of api_rate_limit for per-minute,
  and 95% / 6 for per-10-second window
- Customers with higher rate limits (e.g. 150k/min) can now set api_rate_limit
  to leverage their full API throughput instead of being throttled at 9500 req/min

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

Alfredo Garcia (agarctfi) commented Mar 17, 2026

/publish-connectors-prerelease

Pre-release Connector Publish Started

Publishing pre-release build for connector source-intercom.
PR: #74344

Pre-release versions will be tagged as {version}-preview.597690c
and are available for version pinning via the scoped_configuration API.

View workflow run
Pre-release Publish: SUCCESS

Docker image (pre-release):
airbyte/source-intercom:0.13.16-rc.5-preview.597690c

Docker Hub: https://hub.docker.com/layers/airbyte/source-intercom/0.13.16-rc.5-preview.597690c

Registry JSON:

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