Repository navigation
fix(source-google-analytics-data-api): paginate reports beyond 100k rows - #83188
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
|
Note ✅ All modified connector(s) now have autopilot progressive rollouts enabled. Thanks! |
|
|
↪️ Triggering Reason: draft PR, no merge conflicts, and connector CI is green (the only outstanding check is the Vercel docs preview). No prove-fix has run yet on this HEAD. |
|
🧪 Fix Validation (
|
| Rows available in one slice | 2.9.44 |
This branch |
|---|---|---|
| 60,000 | 1 request, limit: 100000 → 60,000 records |
3 requests, limit: 25000, offsets –/25000/50000 → 60,000 records |
| 160,000 | 1 request, limit: 100000 → 100,000 records (60,000 silently lost) |
7 requests, limit: 25000, offsets through 150000 → 160,000 records |
Request shape is exactly as intended: page 1 carries limit: 25000 and no offset, later pages carry offset: 25000, 50000, … in body_json.
Per-slice scoping checked separately (3 slices, window_in_days: 1, 60,000 rows per day): every slice's first request omits offset, offsets advance within the slice, each slice reads exactly its own 60,000 rows, and nothing leaks across slices.
Unit tests on the PR head: 17 passed, including the new test_dynamic_stream_paginates_run_report_results (25,001 records over 2 requests) and test_dynamic_pivot_streams_disable_pagination (pivot reports stay unpaginated).
Regression tests — comparison mode, control pinned to 2.9.44, all streams
Six runs across integration-test credentials and five qualified connections (all non-EU, TIER_2, active, unpinned; no version pinning performed):
- Integration-test credentials, all 51 streams: SPEC / CHECK / DISCOVER / READ ✅, 1,799 records, every stream delta 0. Largest stream 164 rows, so pagination was never exercised — this establishes the rewrite is harmless, not that it works.
- Largest live property reachable: ✅ both versions, 24,437 records, every stream delta 0 (biggest stream 22,862 rows). Still under one page per slice.
- One further connection: ✅ both versions, all deltas 0.
- Three connections were uninformative: READ failed identically on both versions — one GA4
403 PERMISSION_DENIED, two expired refresh tokens. Pre-existing connection-side problems, not regressions.
Across every informative run: no record-count decrease, no new error, no message-count change on any stream.
Pre-flight
| Check | Result |
|---|---|
| Safety scan | ✅ no credential handling, exfiltration, or new network destinations |
| Breaking change | ✅ none — no spec, schema, PK, cursor, stream-name or state-format change |
| Reversible | ✅ 2.9.44 reads the same config and state; rollback is a version pin |
| Version bump | ✅ patch bump plus changelog entry |
Residual risk
- Reports between 25,001 and 100,000 rows per slice now cost 2–4 requests instead of 1, so GA4 tokens-per-property quota use rises for those properties. No throttling appeared in any test run.
- The reported symptom also included a sync that hung with no records, no state, and no error. That is a separate concern from truncation; smaller pages should reduce the memory pressure it was attributed to, but this PR does not add a watchdog and the hang was not reproduced or tested here.
Customer-specific details, connection identifiers, and raw logs are in the internal tracking issue.
|
|
↪️ Triggering Reason: |
Reviewing PR for connector safety and quality.
|
🛡️ AI PR Review Report🟢 Review Action: APPROVED
All other 11 gates passed.
|
| Gate | Status | Enforced? | Details |
|---|---|---|---|
| PR Hygiene | PASS | Yes | Body is 4,268 chars of filled-in template; docs/integrations/sources/google-analytics-data-api.md changelog row added for 2.9.45; no unresolved human review comments. |
| Code Hygiene | PASS | WARNING | Source change (manifest.yaml) accompanied by test changes in unit_tests/test_components.py (+119). |
| Test Coverage | PASS | Yes | Bug fix with two new tests exercising the new pagination path. |
| Code Security | PASS | Yes | No security-sensitive paths changed; manifest.yaml / metadata.yaml diff hunks contain no auth/credential/allowedHosts/dockerRepository keywords. |
| Per-Record Performance | PASS | WARNING | No per-record loop changes; smaller pages (25k vs 100k) reduce peak memory per request. |
| Breaking Dependencies | PASS | WARNING | No dependency or build files modified. |
| Backwards Compatibility | PASS | Yes (enforced) | No spec, schema (type/format), stream, primary-key or cursor changes; patch bump 2.9.44 → 2.9.45 is appropriate. |
| Forwards Compatibility | PASS | Warning (elevates Risk Level) | Paginator keywords present in the diff, but no state/cursor/partition-key shape change — state format is untouched, so rollback to 2.9.44 is safe (it merely re-truncates at 100k). Pagination behavior is covered by new tests. |
| Behavioral Changes | FAIL | Warning (elevates Risk Level) | Operational keywords page_size, limit, paginator in the diff hunks of manifest.yaml: request volume for large slices increases (one 100k-row request → N × 25k-row requests). Justified in the PR body (default_concurrency unchanged, bounded by GA4 quotas) and covered by tests, but requires human sign-off. |
| Out-of-Scope Changes | PASS | Skip | All 4 changed files are under airbyte-integrations/connectors/source-google-analytics-data-api/ or docs/. |
| CI Checks | PASS | Yes | Test source-google-analytics-data-api Connector, Lint source-google-analytics-data-api Connector, Connector CI Checks Summary, Format Check, Check Changelog Updated, docs checks all ✅ (22 tests, 19 passed / 3 skipped, 0 failed). Only non-success run is Vercel Preview (cancelled), a non-core docs preview deploy. |
| Live / E2E Tests | PASS | Yes | /ai-prove-fix posted ✅ Proven (mechanism), no regression on live data for prerelease 2.9.45-preview.140754d: the defect reproduces on control 2.9.44 and is gone on this branch. |
Files triggering gates
manifest.yaml(both the stream-template paginator and thecomponents_mappingoverride):inject_into: request_parameter→body_json, addedpage_size_option,CursorPagination→OffsetIncrementwithpage_size: 25000, removed hard-codedlimit: 100000fromrequest_body_json.metadata.yaml:dockerImageTag2.9.44 → 2.9.45 only.unit_tests/test_components.py:test_dynamic_stream_paginates_run_report_results(asserts 25,001 records over 2 pages,limit/offsetin body) andtest_dynamic_pivot_streams_disable_pagination.docs/integrations/sources/google-analytics-data-api.md: changelog row.
Live / E2E caveat carried from /ai-prove-fix: the proof is a differential harness against both real manifests, not a customer sync — no available connection has a >100k-row day, and the reported hang symptom was not exercised. Prove-fix still returned Proven, so this gate maps to PASS.
📚 Evidence Consulted
Evidence
- Changed files: 4 (
manifest.yaml,metadata.yaml,unit_tests/test_components.py,docs/integrations/sources/google-analytics-data-api.md) - CI checks: all core connector Test/Lint/Format/Changelog/docs checks
success;Progressive Rollout GateandValidate PR Titlesuccess (excluded from this gate anyway);Vercel Previewcancelled (non-core);CodeQLneutral - PR labels:
connectors/source/google-analytics-data-api,hyd-fix,hyd-prove,hyd-review(no validation-override labels) - PR description: present (4,268 chars)
/ai-prove-fix: Proven, prerelease2.9.45-preview.140754dpublished successfully- Existing bot reviews: none
- Merge state:
mergeable: false(dirty) — rebase required before merge
❓ How to Respond
Providing Context or Justification
The Behavioral Changes gate is warning-level: it does not block approval, but a human reviewer should sign off on the increased runReport request volume for large slices. You can add context the bot will see on the next review:
Option 1: PR Description (recommended)
## AI PR Review Justification
### Behavioral Changes
[Your explanation here]Option 2: PR Comment
AI PR Review Justification:
[Your explanation here]
After adding your response, re-run /ai-review.
|
☑️ Resolved in 8543128. Merge conflict with
The Re-run |
|
Deploy preview for airbyte-docs ready!
Deployed with vercel-action |
|
↪️ Triggering Reason: the prior |
Reviewing PR for connector safety and quality.
|
🛡️ AI PR Review Report🟢 Review Action: APPROVED
All other 11 gates passed.
|
| Gate | Status | Enforced? | Details |
|---|---|---|---|
| PR Hygiene | PASS | Yes | Detailed description (What / How / Review guide / Test Coverage / User Impact, ~5.4k chars); changelog row added for 2.9.46 in docs/integrations/sources/google-analytics-data-api.md; no unresolved human review comments (all 15 comments are from bots/automation). |
| Code Hygiene | PASS | WARNING | Source change (manifest.yaml) is accompanied by test changes (unit_tests/test_components.py, +119 lines). Coverage evidence: Found. |
| Test Coverage | PASS | Yes | Behavioral change (title fix(...), linked to airbytehq/oncall#13164). New test content present: test_dynamic_stream_paginates_run_report_results and test_dynamic_pivot_streams_disable_pagination with new assertions on request bodies and record counts. |
| Code Security | PASS | Yes | No changed file matches auth/credential/token path patterns. manifest.yaml diff hunks contain no security keywords (authenticator, client_id, client_secret, refresh_token, access_token, api_key); metadata.yaml diff hunk is only dockerImageTag: 2.9.45 → 2.9.46 (no allowedHosts, connectorBuildOptions, or dockerRepository change). |
| Per-Record Performance | PASS | WARNING | No per-record loop, transformation, or extractor logic changed. Reducing page size 100,000 → 25,000 lowers peak per-request memory (triage measured ~1.17 GiB RSS for a single 100k-row page). |
| Breaking Dependencies | PASS | WARNING | No pyproject.toml, lockfile, or build.gradle change in the diff; the base-image bump to source-declarative-manifest:7.23.8 already landed on master and is not introduced by this PR. |
| Backwards Compatibility | PASS | Yes (enforced) | No spec file changed (no required array change, no property removal), no schemas/*.json change, no type/format change on any existing field, no stream added/removed/renamed, and no primary-key or cursor field/value change — the offset token affects request paging only, not record keys. No releases.breakingChanges entry needed; patch bump 2.9.45 → 2.9.46 is appropriate. |
| Forwards Compatibility | PASS | Warning (elevates Risk Level) | Pagination keywords (paginator, page_size, offset) appear in the diff, but no incremental-sync state, cursor field, or partition-router shape changed — the persisted state format is untouched, so rollback to 2.9.45 restores the prior (truncating) behavior without any state incompatibility. New tests cover both the paginating and the NoPagination (pivot) paths. |
| Behavioral Changes | FAIL | Warning (elevates Risk Level) | Operational keywords in diff hunks: page_size: 25000, limit page-size option, removal of the hard-coded limit: 100000. Request volume for a slice of N rows goes from 1 call to ceil(N / 25000) calls, and slices >100k rows now emit rows that were previously dropped. Author justification (PR body → AI PR Review Justification → Behavioral Changes) is present and substantive — GA4 Core quotas cited, default_concurrency unchanged at 4, no throttling in six regression runs — but per playbook this gate accepts justification as context only, so the gate stays FAIL at warning level and does not block APPROVE. |
| Out-of-Scope Changes | PASS | Skip | All 4 changed files are in airbyte-integrations/connectors/source-google-analytics-data-api/** or docs/**. No platform, CDK-core, CI, or infrastructure changes. |
| CI Checks | PASS | Yes | 36 passed / 0 failed / 0 pending on 8543128, including Test source-google-analytics-data-api Connector, Lint source-google-analytics-data-api Connector, Connector CI Checks Summary, Format Check, and Check Changelog Updated. Skipped checks are non-applicable (no JVM/CDK changes). |
| Live / E2E Tests | PASS | Yes | Validation required (bug fix + sync-behavior change: paginator, page_size, record volume). /ai-prove-fix posted ✅ Proven (mechanism), no regression on live data (comment 5106756776): the defect reproduces on 2.9.44 (100,000 of 160,000 rows emitted) and is gone on this branch (all 160,000 across 7 requests), with six comparison regression runs showing no record loss and no new errors. That run was against 140754d; the connector code has not changed since, so the conclusion carries to 8543128. |
📚 Evidence Consulted
Evidence
- Changed files: 4 (
manifest.yaml,metadata.yaml,unit_tests/test_components.py,docs/integrations/sources/google-analytics-data-api.md) - Diff vs. previously reviewed
140754d: onlymetadata.yamldockerImageTagand the changelog row - CI checks: 36 passed, 0 failed, 0 pending, 11 skipped
- PR labels:
connectors/source/google-analytics-data-api,hyd-review,hyd-fix,hyd-prove - PR description: present (~5.4k chars) with an
AI PR Review Justificationsection - Existing bot reviews: prior
/ai-reviewAPPROVE recorded for superseded SHA140754d hyd-reviewlabel applied to this PR and to the linked originating issue airbytehq/oncall#13164
|
↪️ Triggering Reason: |
Auto-merge evaluation: FAILPreconditions (all must pass)
Change scope (at least one must pass)❌ No matching change scope detected. |
|
🙋 Escalated to #human-in-the-loop (API source connectors oncall). The auto-merge evaluation passed every precondition with an APPROVE matching the exact current HEAD Posted per Hands-Free AI Triage Project triage. |
Co-Authored-By: bot_apk <[email protected]>
…with injected page size Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
8543128 to
89e8032
Compare
|
Rebased onto Version is provisional: Conflicts and resolutions
Pagination correctness after the rebase Both paginator sites carry Stream template ( paginator: # the dynamic stream will override this value
type: DefaultPaginator
page_token_option:
type: RequestOption
inject_into: body_json
field_name: offset
page_size_option:
type: RequestOption
inject_into: body_json
field_name: limit
pagination_strategy:
type: OffsetIncrement
page_size: 25000Dynamic-stream - type: ComponentMappingDefinition
field_path: ["retriever", "paginator"]
create_or_update: True
value: >
{% if components_values.get("pivots") %}
type: NoPagination
{% else %}
type: DefaultPaginator
page_token_option:
type: RequestOption
inject_into: body_json
field_name: offset
page_size_option:
type: RequestOption
inject_into: body_json
field_name: limit
pagination_strategy:
type: OffsetIncrement
page_size: 25000
{% endif %}The pivot path is unchanged: Tests — Two of master's
Per the request, I did not merge, approve, enable auto-merge, touch PR #83318, or start/modify any rollout or version promotion. |
Detected
|
|
↪️ Triggering Reason: the |
Reviewing PR for connector safety and quality.
|
🛡️ AI PR Review Report🟢 Review Action: APPROVED
All other enforced gates PASS.
|
| Gate | Status | Enforced? | Details |
|---|---|---|---|
| PR Hygiene | PASS | Yes | PR body ~4.9k raw chars / ~4.7k visible chars of substantive content (What / How / Test Coverage / User Impact). Changelog row added for 2.11.0-rc.2 in docs/integrations/sources/google-analytics-data-api.md; Check Changelog Updated check green. No unresolved human review comments (0 inline review comments, no non-bot reviews). Note: the description body still cites the pre-rebase 2.9.45 → 2.9.46 bump, corrected in the rebase comment — cosmetic staleness only. |
| Code Hygiene | PASS | WARNING | Source (manifest.yaml) and tests both changed: unit_tests/test_components.py (+119), unit_tests/conftest.py (+10), unit_tests/test_single_stream_per_report.py. Coverage evidence: Found. |
| Test Coverage | PASS | Yes | Bug fix (fix(...) title, linked to airbytehq/oncall#13164) with new test content: test_dynamic_stream_paginates_run_report_results asserts 25,001 records across two pages, limit: 25000 on request 1 and offset: 25000 on request 2; test_dynamic_pivot_streams_disable_pagination asserts pivot streams still issue a single unpaginated request. |
| Code Security | PASS | Yes | No changed file matches auth/credential/token path patterns. manifest.yaml diff hunks contain no authenticator/token/secret keywords (paginator blocks only); metadata.yaml diff is dockerImageTag only — no allowedHosts, connectorBuildOptions, or dockerRepository change. Credential strings appear only in dummy test fixtures. |
| Per-Record Performance | PASS | WARNING | No per-record path (record_selector, transformations) modified. Smaller pages reduce peak per-request memory (triage measured ~1.17 GiB RSS for a 100k-row page). |
| Breaking Dependencies | PASS | WARNING | No dependency or build files changed (pyproject.toml, poetry.lock, gradle untouched); Gradle Dependency Diff reports no change. |
| Backwards Compatibility | PASS | Yes (enforced) | No spec change (spec required untouched — no spec file in the diff), no schemas/*.json change, no type/format change, no stream added/removed/renamed, no primary-key or cursor field/value change. Not a data-scope reduction: the change restores records previously truncated at 100k. metadata.yaml diff is a version bump only, no releases.breakingChanges entry needed. |
| Forwards Compatibility | PASS | Warning (elevates Risk Level) | paginator/pagination_strategy/page_size keywords present, but no state, cursor, checkpoint, incremental_sync, or partition_router change — pagination is intra-slice and not persisted in state, so rollback to 2.11.0-rc.1 is safe (it simply resumes truncating). New end-to-end mocked read tests demonstrate the paged sync behavior; the PR is self-declared revertible. |
| Behavioral Changes | FAIL | Warning (elevates Risk Level) | page_size: 25000 and body-injected limit in the manifest.yaml diff hunks change request volume: ceil(N/25000) calls per slice instead of one. Documented in the PR description with GA4 Core quota figures (10 concurrent / 40k tokens per hour Standard; 50 / 400k for 360) and default_concurrency unchanged at 4; no throttling seen in six regression runs. Warning-level, non-blocking. |
| Out-of-Scope Changes | PASS | Skip | All 6 changed files are in airbyte-integrations/connectors/source-google-analytics-data-api/** or docs/integrations/sources/**. |
| CI Checks | PASS | Yes | Core checks green at 89e8032b: Test source-google-analytics-data-api Connector, Lint source-google-analytics-data-api Connector, Connector CI Checks Summary, Build and Verify Artifacts, Format Check, Check Changelog Updated, Docs / Vale, Docs / MarkDownLint. The two failures — source-google-analytics-data-api Progressive Rollout Gate and Connector Active Progressive Rollout Checks Summary — are release-management checks explicitly excluded from this gate (an active 2.10.2 rollout plus the RC marker on master, not a defect in this diff). They still gate merge until the bypass checkbox is checked. |
| Live / E2E Tests | PASS | Yes | Deferred to /ai-prove-fix, which concluded Proven (mechanism), no regression on live data: the pre-fix 2.9.44 manifest emits 100,000 of 160,000 rows in one request while this branch emits all 160,000 across 7 requests, and six comparison regression runs (control pinned to 2.9.44) showed no record loss or new errors. That run predates the rebase, but the rebase changed only dockerImageTag, the changelog, and a test import block — the paginator diff is unchanged. |
📚 Evidence Consulted
Evidence
- Changed files: 6 (
manifest.yaml,metadata.yaml, 3 unit-test files, connector docs page) — +146/−12 - CI checks: 46 check-runs at
89e8032b; all core build/lint/test checkssuccess; 2 failures, both progressive-rollout/release-management (excluded);source-google-analytics-data-api Pre-Release Checkssuccess - PR labels:
connectors/source/google-analytics-data-api,hyd-review,hyd-fix,hyd-prove,hyd-ready— no override/validation labels - PR description: present (substantive)
- Existing bot reviews: prior
APPROVEmarker for8543128e(superseded); no review submitted for the current HEAD before this run /ai-prove-fix: Proven (mechanism), no regression on live data
…ry dimension Co-Authored-By: zane.hyatt <[email protected]> Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Baz (bazarnov)
left a comment
There was a problem hiding this comment.
Verified against primary sources and locally:
- The GA4 discovery doc confirms
RunReportResponsehas nooffsetfield, so the previousCursorPaginationstop condition ended every read after page 1;limit/offsetare request-body fields with a 10,000-row default when omitted (pagination docs). - CDK check:
page_size_optioninjectslimiton the first request too (DefaultPaginator._get_request_optionsgates only the token ontoken is not None), and removing the hard-codedlimit: 100000is required -combine_mappingsraises a request-body key collision when the paginator injects a different value for the same key. orderBysclaims verified: top-levelorderByswith dimension ordering exists onRunReportRequestand is absent onRunPivotReportRequest(ordering/paging live inside eachPivot), and GA4 documents no default row ordering - the explicit total order over all dimensions is what makes offset paging deterministic.- Ran the new unit tests locally (CDK 7.3.1): pagination advancement, the
orderBysparametrized cases, pivot no-pagination, andtest_single_stream_per_report- all green. Clean automatic merge with current master (no conflicts).
Merge note: the red Progressive Rollout Gate reflects a stale rollout record (2.10.2, state workflow_started) while master is already at 2.11.0-rc.1; publishing 2.11.0-rc.2 supersedes it. The duplicate #83318 was closed in favor of this PR.
|
👍 On it — nothing to change in the code, refreshing the description. Thanks for verifying all of it against the discovery doc and locally, Baz (@bazarnov). (Replying at top level: your comment is an issue comment, so it has no review thread to reply into.) Two notes on my side:
|
|
↪️ Triggering Reason: the most recent |
Reviewing PR for connector safety and quality.
|
🛡️ AI PR Review Report🟢 Review Action: APPROVED
All other enforced gates PASS.
|
| Gate | Status | Enforced? | Details |
|---|---|---|---|
| PR Hygiene | PASS | Yes | PR body is ~7.5k raw chars of substantive content (What / How / Declarative-First / Review guide / Test Coverage / User Impact / Behavioral-change justification). Changelog row present for 2.11.0-rc.2 in docs/integrations/sources/google-analytics-data-api.md, and it now also documents the deterministic row ordering; Check Changelog Updated green. Peer feedback: 0 inline review comments; Baz (@bazarnov)'s review at this exact HEAD is APPROVED and the author replied to it (#83188 comment 5436511451) — nothing unresolved. |
| Code Hygiene | PASS | WARNING | Source (manifest.yaml) and tests both changed: unit_tests/test_components.py (+243), unit_tests/conftest.py (+10), unit_tests/test_single_stream_per_report.py. Coverage evidence: Found. |
| Test Coverage | PASS | Yes | Bug fix (fix(...) title, linked to airbytehq/oncall#13164) with new test content: test_dynamic_stream_paginates_run_report_results (25,001 records over two pages; limit: 25000 on request 1, offset: 25000 on request 2), test_dynamic_stream_orders_paged_run_report_requests_by_every_dimension, parametrized test_run_report_order_bys (ordering present for dimensioned reports; omitted for metric-only, cohort, pivot), and test_dynamic_pivot_streams_disable_pagination. |
| Code Security | PASS | Yes | No changed file matches auth/credential/token/secret path patterns. manifest.yaml diff hunks contain only paginator, request-body, and orderBys template lines — no authenticator/token keywords; metadata.yaml diff is dockerImageTag only (no allowedHosts, connectorBuildOptions, dockerRepository change). Credentials appear only as dummy test fixtures. |
| Per-Record Performance | PASS | WARNING | No per-record path changed (record_selector, transformations untouched). The orderBys Jinja loop runs once per request at request-body render time, not per record. Smaller pages reduce peak per-request memory (triage measured ~1.17 GiB RSS for a 100k-row page). |
| Breaking Dependencies | PASS | WARNING | No dependency or build files changed (pyproject.toml, poetry.lock, gradle untouched); Gradle Dependency Diff reports no change. |
| Backwards Compatibility | PASS | Yes (enforced) | No spec file in the diff (spec required unchanged), no schemas/*.json change, no type/format change, no stream added/removed/renamed, no primary-key or cursor field/value change. Not a data-scope reduction — the change restores rows previously truncated at 100k; orderBys changes row order within a stream, not the set of rows or their keys. metadata.yaml diff is a version bump only, so no releases.breakingChanges entry is required. |
| Forwards Compatibility | PASS | Warning (elevates Risk Level) | paginator / pagination_strategy / page_size keywords present, but no state, cursor, checkpoint, incremental_sync, or partition_router change — pagination and ordering are intra-slice and not persisted in state, so rollback to 2.11.0-rc.1 is safe (it resumes truncating). New end-to-end mocked reads demonstrate the paged behavior; the PR is self-declared revertible. |
| Behavioral Changes | FAIL | Warning (elevates Risk Level) | page_size: 25000, body-injected limit, and the new orderBys block in the manifest.yaml diff hunks change request volume and request shape: ceil(N/25000) calls per slice instead of one, each carrying a full-dimension sort. Justified in the PR description with GA4 Core quota figures (10 concurrent / 40k tokens per hour Standard; 50 / 400k for 360), default_concurrency unchanged at 4, and no throttling observed in six regression runs. Warning-level, non-blocking. |
| Out-of-Scope Changes | PASS | Skip | All 6 changed files are under airbyte-integrations/connectors/source-google-analytics-data-api/** or docs/integrations/sources/**. |
| CI Checks | PASS | Yes | Core checks green at ac95b9d2: Test source-google-analytics-data-api Connector, Lint source-google-analytics-data-api Connector, Connector CI Checks Summary, Build and Verify Artifacts, Format Check, Check Changelog Updated, Docs / Vale, Docs / MarkDownLint, source-google-analytics-data-api Connector Test Results. The only failures — source-google-analytics-data-api Progressive Rollout Gate and Connector Active Progressive Rollout Checks Summary — are release-management checks explicitly excluded from this gate (active rollout / RC state on master, not a defect in this diff). They still gate merge until the bypass checkbox is checked. |
| Live / E2E Tests | PASS | Yes | Deferred to /ai-prove-fix, which concluded Proven (mechanism), no regression on live data: the pre-fix manifest emitted 100,000 of 160,000 rows in a single request while this branch emitted all 160,000 across 7 requests, and six comparison regression runs (control pinned to the pre-fix version) showed no record loss and no new errors. Caveat: that run predates b48eb718, so the orderBys addition itself was not exercised live — it is covered by the new parametrized unit tests and was verified against Google's runReport reference by Baz (@bazarnov). |
📚 Evidence Consulted
Evidence
- Changed files: 6 (
manifest.yaml,metadata.yaml, 3 unit-test files, connector docs page) — +283/−12 - CI checks: 53 check-runs at
ac95b9d2; all core build/lint/test checkssuccess; 4 failing entries, all progressive-rollout / release-management (excluded from CI Checks);source-google-analytics-data-api Pre-Release Checkssuccess; commit statussuccess(license/cla, Vercel) - PR labels:
connectors/source/google-analytics-data-api,hyd-review,hyd-fix,hyd-prove,hyd-ready— no override/validation labels - PR description: present (~7.5k chars)
- Existing bot reviews: prior
APPROVEmarkers at140754d5,8543128e,89e8032b(all superseded); human reviewAPPROVEDby Baz (@bazarnov) atac95b9d2
|
↪️ Triggering Reason: |
Auto-merge evaluation: FAILPreconditions (all must pass)
Change scope (at least one must pass)❌ No matching change scope detected. |
…t requests Cohort streams paginate like any other runReport, so they need the same stable dimension ordering. GA4 accepts orderBys alongside cohortSpec (verified against the live API). Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
↪️ Triggering Reason: the |
Reviewing PR for connector safety and quality.
|
🛡️ AI PR Review Report🟢 Review Action: APPROVED
All other enforced gates PASS.
|
| Gate | Status | Enforced? | Details |
|---|---|---|---|
| PR Hygiene | PASS | Yes | PR body is 8,664 raw chars of substantive content (What / How / Declarative-First / Review guide / Test Coverage / User Impact / Behavioral-change justification); visible content well over the 50-char floor, no template placeholders. Changelog row present for 2.11.0-rc.2 in docs/integrations/sources/google-analytics-data-api.md; Check Changelog Updated green. Peer feedback: 0 inline review comments; Baz (@bazarnov)'s review is APPROVED and the author replied (#83188 comment 5436511451) — nothing unresolved. The stale cohort wording flagged above is an accuracy nit, not a hygiene FAIL condition. |
| Code Hygiene | PASS | WARNING | Source (manifest.yaml) and tests both changed: unit_tests/test_components.py (+243), unit_tests/conftest.py (+10), unit_tests/test_single_stream_per_report.py (+2/−1). Coverage evidence: Found. |
| Test Coverage | PASS | Yes | Bug fix (fix(...) title, resolves airbytehq/oncall#13164) with new test content: test_dynamic_stream_paginates_run_report_results (25,001 records over two pages; limit: 25000 on request 1, offset: 25000 on request 2), test_dynamic_stream_orders_paged_run_report_requests_by_every_dimension, parametrized test_run_report_order_bys, and test_dynamic_pivot_streams_disable_pagination. The HEAD commit's behavior change is covered — the cohort parametrized case was updated in the same commit to assert the new expected orderBys. |
| Code Security | PASS | Yes | No changed file matches auth/credential/token/secret path patterns. manifest.yaml diff hunks contain only paginator, request-body, orderBys template and comment lines — none of the tracked keywords (authenticator, OAuthAuthenticator, api_token, client_id, client_secret, refresh_token, access_token, api_key); page_token_option is a CDK paginator field, not a credential. metadata.yaml diff is dockerImageTag only (no allowedHosts, connectorBuildOptions, dockerRepository). Credentials appear only as dummy test fixtures. |
| Per-Record Performance | PASS | WARNING | No per-record path changed (record_selector, transformations untouched). The orderBys Jinja loop runs once per request at request-body render time, not per record. Smaller pages reduce peak per-request memory (triage measured ~1.17 GiB RSS for a single 100k-row page). |
| Breaking Dependencies | PASS | WARNING | No dependency or build files changed (pyproject.toml, poetry.lock, gradle untouched); Gradle Dependency Diff reports no change. |
| Backwards Compatibility | PASS | Yes (enforced) | No spec file in the diff (spec required unchanged), no schemas/*.json change, no type/format change, no stream added/removed/renamed, no primary-key or cursor field or value change. Not a data-scope reduction — the change restores rows previously truncated at 100k; orderBys changes row order within a stream, not the set of rows or their keys, and the added cohort ordering is over dimensions the cohort report already emits. metadata.yaml diff is a version bump only (2.11.0-rc.1 → 2.11.0-rc.2), so no releases.breakingChanges entry is required. |
| Forwards Compatibility | PASS | Warning (elevates Risk Level) | paginator / pagination_strategy / page_size keywords present, but no state, cursor, checkpoint, incremental_sync, or partition_router change — pagination and ordering are intra-slice and not persisted in state, so rollback to 2.11.0-rc.1 is safe (it resumes truncating at 100k). New end-to-end mocked reads demonstrate the paged behavior; the PR is self-declared revertible. |
| Behavioral Changes | FAIL | Warning (elevates Risk Level) | page_size: 25000, body-injected limit, and the orderBys block in the manifest.yaml diff hunks change request volume and request shape: ceil(N/25000) calls per slice instead of one, each carrying a full-dimension sort, and as of 782169ee cohort requests now carry orderBys alongside cohortSpec. Justified in the PR description with GA4 Core quota figures (10 concurrent / 40k tokens per hour Standard; 50 / 400k for 360), default_concurrency unchanged at 4, and no throttling observed in six regression runs. The cohort orderBys acceptance is asserted by unit test only and by the commit's claim of live-API verification — not exercised by the /ai-prove-fix run. Warning-level, non-blocking. |
| Out-of-Scope Changes | PASS | Skip | All 6 changed files are under airbyte-integrations/connectors/source-google-analytics-data-api/** or docs/integrations/sources/**. |
| CI Checks | PASS | Yes | Core checks green at 782169ee: Test source-google-analytics-data-api Connector, Lint source-google-analytics-data-api Connector, Connector CI Checks Summary, Build and Verify Artifacts (source-google-analytics-data-api), Format Check, Check Changelog Updated, Docs / Vale, Docs / MarkDownLint, `source-google-analytics-data-api` Connector Test Results (36 ✅ / 2 💤 / 0 ❌). The only failures — source-google-analytics-data-api Progressive Rollout Gate and Connector Active Progressive Rollout Checks Summary — are release-management checks explicitly excluded from this gate (active rollout / RC state on master, not a defect in this diff). They still gate merge until the bypass checkbox is checked. |
| Live / E2E Tests | PASS | Yes | Deferred to /ai-prove-fix, which concluded Proven (mechanism), no regression on live data: the pre-fix manifest emitted 100,000 of 160,000 rows in a single request while this branch emitted all 160,000 across 7 requests, and six comparison regression runs (control pinned to the pre-fix version) showed no record loss and no new errors. Caveat: that run predates both orderBys commits, so neither the ordering itself nor the new cohort orderBys was exercised live; they are covered by the parametrized unit tests, Baz (@bazarnov)'s verification against Google's runReport reference, and the author's stated live-API check. |
📚 Evidence Consulted
Evidence
- Changed files: 6 (
manifest.yaml,metadata.yaml, 3 unit-test files, connector docs page) — +284/−12 - CI checks: 49 check-runs at
782169ee; all core build/lint/test checkssuccess; 2 failing entries, both progressive-rollout / release-management (excluded from CI Checks);source-google-analytics-data-api Pre-Release Checkssuccess - PR labels:
connectors/source/google-analytics-data-api,hyd-review,hyd-fix,hyd-prove,hyd-ready— no override/validation labels.hyd-reviewalready present on the PR and on the originating issue airbytehq/oncall#13164 - PR description: present (8,664 chars), with stale cohort wording noted above
- Existing bot reviews: prior
APPROVEmarkers at140754d5,8543128e,89e8032b,ac95b9d2(all superseded by782169ee); human reviewAPPROVEDby Baz (@bazarnov) atac95b9d2
|
☑️ Resolved — description refreshed for I also re-ran the connector unit suite at Still needs a maintainer, not me: the |
|
↪️ Triggering Reason: |
Auto-merge evaluation: FAILPreconditions (all must pass)
Change scope (at least one must pass)❌ No matching change scope detected. |
…4-pagination Version landed at 2.11.3-rc.1. Co-Authored-By: bot_apk <[email protected]>
| | Version | Date | Pull Request | Subject | | ||
| |:---------------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
There was a problem hiding this comment.
[markdownlint-fix] reported by reviewdog 🐶
| | Version | Date | Pull Request | Subject | | |
| |:---------------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |
| | Version | Date | Pull Request | Subject | | |
| | :--------------- | :----------- | :--------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
What
Resolves https://github.com/airbytehq/oncall/issues/13164:
The GA4 report paginator never advanced. Both paginator definitions in
manifest.yaml(the stream template and theComponentMappingDefinitionthat overrides it for the dynamic streams) used:RunReportResponsehas nooffsetfield (reference), so the stop condition is always truthy and reading ends after page 1 — every slice was silently capped at the hard-codedlimit: 100000. Separately, the token was injected as arequest_parameterwhile GA4 takeslimit/offsetin the POST body, so even a correct cursor value would have been ignored.The reported symptom is a job that hangs and is eventually killed by
heartbeat_timeouton days exceeding 100k rows. Triage measured the connector's extraction path peaking around 1.17 GiB RSS for a single 100k-row page (~45 MB payload), scaling roughly linearly with page size; withdefault_concurrency: 4against a ~2 GiB source container that is a plausible stall mechanism, though it has not been observed directly in the customer's container. Smaller pages bound that peak.How
OffsetIncrementterminates when a page returns fewer records thanpage_size(or zero), which is the correct signal for GA4 and needs no response field. The hard-codedlimit: 100000was removed fromrequest_body_json— the paginator now supplieslimitviapage_size_option, and leaving both would makeHttpRequesterraise on the duplicate body key. Pivot reports keepNoPaginationand are otherwise unchanged.Offset paging is only correct over a stable row order, and GA4 documents no default ordering for
runReport, so paged requests now also carry a total ordering over every configured dimension:GA4 returns one row per unique dimension-value combination, so ordering by all dimensions is a total order and page boundaries cannot overlap or skip rows. Cohort requests get the same ordering — they paginate like any other
runReport, and GA4 acceptsorderBysalongsidecohortSpec(verified against the live API, which returns 400 only for genuinely invalid cohort combinations such as supplyingdateRanges).orderBysis omitted only for pivot requests (RunPivotReportRequesthas no top-levelorderBys— ordering lives inside eachPivot, and pivot streams useNoPagination) and for metric-only reports (nothing to order by).Declarative-First Evaluation
Declarative only — no custom component.
DefaultPaginator+OffsetIncrementwithRequestOptionType.body_jsonexpresses offset-in-body pagination and short-page termination directly, so no Python was needed.Review guide
manifest.yaml— both paginator blocks must stay in sync; thecomponents_mappingone overrides the template at runtime. TheorderBysblock inrequest_body_jsonis guarded on dimensions / not-pivot.unit_tests/test_components.py— new end-to-end mocked read.metadata.yaml/docs/integrations/sources/google-analytics-data-api.md—2.11.3-rc.1bump and changelog. The version is provisional: master has moved on repeatedly while this PR sat unmerged (2.9.45→2.10.x→ the2.11.0rollout, now finalized, plus2.11.1and2.11.2), so the earlier2.11.0-rc.2stacking is gone and the fix now opens a fresh rollout candidate on the next patch. Please confirm or change that choice before promoting anything — it also means the active-rollout bypass checkbox below needs a maintainer's acknowledgement before merge.Test Coverage
test_dynamic_stream_paginates_run_report_resultsreads a dynamic stream end to end throughentrypoint_wrapper.readwith mocked OAuth, metadata, and:runReportendpoints: it asserts all 25,001 records across two pages are emitted, that request 1 carrieslimit: 25000with nooffset, that request 2 carriesoffset: 25000, and that the short second page ends pagination. It fails onmaster(only page 1 is read).test_dynamic_stream_orders_paged_run_report_requests_by_every_dimensionasserts both paged requests carry the same full-dimensionorderBys, andtest_run_report_order_byscovers the guards parametrically (all dimensions ordered, cohort reports included; omitted for metric-only and pivot reports).test_dynamic_pivot_streams_disable_paginationasserts pivot streams still issue exactly one request with nooffsetand no top-levelorderBys. Full suite at the current head (9e73560, master merged in): 44 passed, including master's newertest_property_metadata.pyandtest_single_stream_per_report.py— the latter's request fixture was updated fromlimit: 100000to the injectedlimit: 25000, andconftest.pygained an autouse fixture that pointsREQUEST_CACHE_PATHat a tmpdir so cached dynamic-schema responses no longer leak between tests./ai-prove-fixadditionally ran the pagination scenario against both real manifests (this branch vs. the pre-fix commit, each with its owncomponents.py) using a mockrunReportthat honors the request body'soffset/limit. On a 160,000-row slice, 2.9.44 emits 100,000 records (60,000 silently lost) in one request while this branch emits all 160,000 across 7 requests. Six comparison regression runs (control pinned to 2.9.44) showed no record loss and no new errors, though no reachable property had a >100k-row day.User Impact
Slices larger than the page size are now fully synced instead of being silently truncated at 100,000 rows — affected connections will see additional rows appear. Requests are paged at 25,000 rows, so large slices issue more
runReportcalls than before (bounded by GA4's documented quotas;default_concurrencyis unchanged), with materially lower peak memory per request.Not a breaking change: no schema, spec, or state format change. Versioned as
2.11.3-rc.1because the connector has an active progressive rollout.AI PR Review Justification
Behavioral Changes
The increased request volume is intrinsic to the fix rather than incidental: correctness requires paging, and a page size below 100,000 is what bounds peak memory on the slices that were stalling. A slice of N rows now costs
ceil(N / 25000)runReportcalls instead of 1 (capped at 100,000 rows previously read). GA4's documented Core quotas are 10 concurrent requests / 40,000 tokens per hour for Standard properties and 50 / 400,000 for Analytics 360;default_concurrencystays at 4, so concurrency headroom is unchanged and only hourly token use rises for properties with large slices. No throttling appeared in any of the six regression runs. The alternative — fixing pagination while keepinglimit: 100000— would keep request volume flat but make the reported freeze more likely, since affected slices would then fetch several 100k-row pages instead of stopping after one.Can this PR be safely reverted and rolled back?
Link to Devin session: https://app.devin.ai/sessions/cdce7a41bb4842d393483d18ebca6579
Important
Active progressive rollout warning for source-google-analytics-data-api.
Important
Autopilot Progressive Rollout Enabled
Autopilot progressive rollouts are enabled for one or more connector(s) modified in this PR. Check the box below if you need to bypass normal rollout safety processes and release to all users immediately upon merge:
Note:
Open in Devin Desktop: https://app.devin.ai/desktop/session/cdce7a41bb4842d393483d18ebca6579?variant=devin