Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

What

The checkout_sessions stream's full refresh mode was not respecting the start_date configuration, causing it to fetch ALL checkout sessions from the Stripe account regardless of the configured start date. This resulted in extremely long sync times for accounts with large checkout session histories.

Fixes: https://github.com/airbytehq/oncall/issues/11043

How

Changed the checkout_sessions stream's full_refresh_stream to use entity_stream instead of entity_restricted_stream.

The key difference:

  • entity_restricted_stream uses entity_single_slice_cursor which lacks start_time_option and end_time_option parameters
  • entity_stream uses entity_with_slice_cursor which includes these options, adding created[gte] and created[lte] parameters to API requests

The Stripe API's List all Checkout Sessions endpoint supports the created filter parameter, so this change is compatible with the API.

Review guide

  1. airbyte-integrations/connectors/source-stripe/manifest.yaml - Single line change from entity_restricted_stream to entity_stream

Key verification points:

  • Confirm there's no specific reason checkout_sessions was using entity_restricted_stream (e.g., API limitations that no longer exist)
  • Consider if other streams using entity_restricted_stream (accounts, credit_notes, early_fraud_warnings, external_account_cards, external_account_bank_accounts) might have the same issue

User Impact

Users with large Stripe accounts will see significantly faster initial syncs for the checkout_sessions stream, as the connector will now properly filter by the configured start_date instead of fetching all historical data.

Can this PR be safely reverted and rolled back?

  • YES 💚

Link to Devin run: https://app.devin.ai/sessions/167a186f54c04edcb2918e527a779a0c
Requested by: @agarctfi

…resh

The checkout_sessions stream was using entity_restricted_stream which
does not include start_time_option and end_time_option parameters.
This caused the full refresh stream to fetch ALL checkout sessions
regardless of the configured start_date.

Changed to use entity_stream which properly filters by created[gte]
and created[lte] parameters, respecting the user's start_date config.

Fixes: airbytehq/oncall#11043
Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
Copy link
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
Contributor

👋 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:

  • /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.
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

Pre-release Connector Publish Started

Publishing pre-release build for connector source-stripe.
PR: #72363

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

View workflow run
Pre-release Publish: SUCCESS

Docker image (pre-release):
airbyte/source-stripe:5.15.16-preview.02557ec

Docker Hub: https://hub.docker.com/layers/airbyte/source-stripe/5.15.16-preview.02557ec

Registry JSON:

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

source-stripe Connector Test Results

209 tests   206 ✅  19m 43s ⏱️
  2 suites    3 💤
  2 files      0 ❌

Results for commit 9797c96.

♻️ This comment has been updated with latest results.

@devin-ai-integration
Copy link
Contributor Author

Fix Validation Summary

Connector: source-stripe
PR: #72363
Pre-release Version Tested: 5.15.16-preview.02557ec
Detailed Results: https://github.com/airbytehq/oncall/issues/11043#issuecomment-3802529280

Validation Thesis

Success Thesis: The checkout_sessions stream will respect the configured start_date and only fetch checkout sessions created after that date, resulting in faster syncs for accounts with large checkout session histories.

Failure Thesis: The stream will continue to fetch ALL checkout sessions regardless of start_date, or the change may cause API errors.

Test Plan: Test on a connection with checkout_sessions enabled to verify date filtering is applied.

Pre-flight Checks

  • Viability: Fix addresses the reported issue (single line config change)
  • Safety: No malicious code or dangerous patterns
  • Reversibility: Can be safely downgraded/reverted

Testing Results

Test Phase Connections Tested Results
Isolated Regression Tests 1 PASS
Live Test - Singleton 0 BLOCKED
Live Test - Batch (Failing) N/A SKIPPED
Live Test - Additional N/A SKIPPED

Note: Connection IDs and detailed logs are recorded in the linked private issue.

Verdict

NO DECISION - MORE DATA NEEDED - Live connection testing was blocked.

  • Isolated regression tests passed successfully
  • Connection successfully pinned to pre-release version 5.15.16-preview.02557ec
  • Blocker: A long-running sync job has been active for 5 days on the test connection, preventing a new sync from being triggered
  • The connection is now pinned, so the next sync will use the pre-release version

Next Steps

  1. Wait for the current sync (job 67144791) to complete, OR cancel it if appropriate
  2. Once the sync slot is available, trigger a new sync to validate the fix with the pre-release version
  3. Re-run /ai-prove-fix to complete the live connection test and get a final verdict

Session: https://app.devin.ai/sessions/0cb4d1d980df4bf2a6c7679decbdc084

@agarctfi
Copy link
Contributor

agarctfi commented Jan 27, 2026

/bump-version

Bump Version job started... Check job output.

✅ Changes applied successfully. (9797c96)

@agarctfi agarctfi marked this pull request as ready for review January 27, 2026 23:57
@github-actions
Copy link
Contributor

Deploy preview for airbyte-docs ready!

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

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

@agarctfi
Copy link
Contributor

agarctfi commented Jan 28, 2026

/ai-review

PR AI Review Started

Evaluating connector PR for safety and quality.
View workflow run
AI PR Review (Phase D) starting...

Reviewing PR for connector safety and quality. Phase D adds MCP-based validation verification.
View playbook

Devin AI session created successfully!

@devin-ai-integration
Copy link
Contributor Author

AI PR Review (Phase D) - Review in progress...

Evaluating 6 gates for connector safety and quality. Will post full gate report shortly.

Session: https://app.devin.ai/sessions/5a79183540284df8b1d708ad595b736d

@devin-ai-integration
Copy link
Contributor Author

AI PR Review Report (Phase D)

Connector(s): source-stripe
PR: #72363
HEAD SHA: 9797c96ff9ef05ccb6db660cf36f709b719eafed
Session: https://app.devin.ai/sessions/5a79183540284df8b1d708ad595b736d

Auto-Approve Eligibility

Eligible: No
Category: not-eligible
Reason: PR contains functional code changes to manifest.yaml (changes stream behavior from entity_restricted_stream to entity_stream). This is not docs-only, additive spec, patch/minor deps, or comment/whitespace-only.

Review Action Taken

NO ACTION (NOT ELIGIBLE) - All gates pass but PR is not eligible for auto-approval. No PR review submitted. Human review required.

Note: This bot can approve PRs when all gates pass AND the PR is eligible for auto-approval (docs-only, additive spec changes, patch/minor dependency bumps, or comment/whitespace-only changes). PRs with other types of changes require human review even if all gates pass.

Gate Summary

Gate Status Enforced? Details
1. CI/Tests PASS Yes Lint passed, Tests passed (209 tests, 206 passed, 3 skipped, 0 failed)
2. Security PASS Yes No security-sensitive changes detected
3. Safety/Reversibility PASS Yes Single config line change, reversible per PR description
4. Operational Risk PASS Yes No pagination/rate-limit changes; fix reduces data fetched
5. Pre-Release Validation PASS Yes MCP verified: 10 successful syncs with pre-release 5.15.16-preview.02557ec
6. PR Quality PASS Yes Description present, changelog updated, version bumped

Overall Assessment

ALL GATES PASS (NOT ELIGIBLE) - All gates pass but PR is not eligible for auto-approval (contains functional code changes). No automated review submitted. Human review required.

Gate Evaluation Details

Gate 1: CI/Tests

  • Lint source-stripe Connector: PASS
  • Test source-stripe Connector: PASS (209 tests, 206 passed, 3 skipped, 0 failed)
  • Connector CI Checks Summary: PASS
  • source-stripe Pre-Release Checks: PASS
  • Format Check: PASS
  • Coverage Evidence: Exempt (manifest.yaml config change, not source code)

Gate 2: Security

  • Files analyzed: manifest.yaml, metadata.yaml, stripe.md
  • Security keywords searched: credentials, secrets, API keys, authentication, authorization
  • Result: No security-sensitive patterns detected
  • Change: entity_restricted_streamentity_stream (stream configuration only)

Gate 3: Safety/Reversibility

  • PR description reversibility: YES (confirmed by author)
  • Change scope: Single line change in manifest.yaml
  • State format changes: None
  • Schema changes: None
  • Breaking changes: None

Gate 4: Operational Risk

  • Pagination changes: None
  • Rate limiting changes: None
  • Resource consumption: Fix actually REDUCES data fetched by respecting start_date filter
  • New API endpoints: None

Gate 5: Pre-Release Validation

  • Pre-release version: 5.15.16-preview.02557ec
  • Published: 2026-01-27T01:09:56Z
  • MCP Verification: Used query_prod_recent_syncs_for_version_pinned_connector
  • Results: 10 successful syncs found with pinned pre-release version
  • Sync details: All syncs succeeded across multiple connections (products, invoices, invoice_line_items, subscription_items, customers, subscriptions, coupons, charges, prices)

Gate 6: PR Quality

  • PR description: Present and detailed (explains what, how, review guide, user impact)
  • Changelog: Updated in docs/integrations/sources/stripe.md
  • Version bump: 5.15.16 → 5.15.17
  • Linked issue: https://github.com/airbytehq/oncall/issues/11043

Evidence Consulted

  • Changed files: 3 files (manifest.yaml, metadata.yaml, stripe.md)
  • CI checks: 39 passed, 2 pending, 8 skipped, 0 failed
  • PR labels: (auto-applied by CI)
  • PR description: Present with detailed explanation
  • Existing bot reviews: None for this HEAD SHA
  • MCP tools used: query_prod_connector_versions, query_prod_recent_syncs_for_version_pinned_connector

@agarctfi agarctfi merged commit dbfc424 into master Jan 28, 2026
50 checks passed
@agarctfi agarctfi deleted the devin/1769474478-fix-stripe-checkout-sessions-date-filter branch January 28, 2026 00:36
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