Skip to content

chore(low-code): remove unused SubstreamPartitionRouter._migrate_child_state_to_parent_state - #1100

Merged
Serhii Lazebnyi (lazebnyi) merged 3 commits into
mainfrom
lazebnyi/remove-dead-migrate-child-state
Aug 7, 2026
Merged

chore(low-code): remove unused SubstreamPartitionRouter._migrate_child_state_to_parent_state#1100
Serhii Lazebnyi (lazebnyi) merged 3 commits into
mainfrom
lazebnyi/remove-dead-migrate-child-state

Conversation

@lazebnyi

@lazebnyi Serhii Lazebnyi (lazebnyi) commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What

Remove SubstreamPartitionRouter._migrate_child_state_to_parent_state — it has no callers anywhere in the codebase.

Why

It's dead code left over from the pre-concurrent implementation: parent state is now seeded at stream-construction time in ModelToComponentFactory._instantiate_parent_stream_state_manager. Leaving it around is misleading — the analysis in #1067 anchored on it as a suspected root cause, and #1079 independently noted it has no callers.

Test

  • grep -rn _migrate_child_state_to_parent_state — no remaining references (production or tests)
  • pytest unit_tests/sources/declarative/partition_routers/ — 68 passed

Summary by CodeRabbit

  • Refactor
    • Simplified internal state handling by removing legacy parent-state migration logic.
    • Existing parent-state retrieval behavior remains unchanged.

@lazebnyi
Serhii Lazebnyi (lazebnyi) requested a review from a team as a code owner July 31, 2026 23:03
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0cc4bd4d-2bb0-4ee6-9425-4739f7c2a0c0

📥 Commits

Reviewing files that changed from the base of the PR and between 62b3165 and 991de2a.

📒 Files selected for processing (1)
  • airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py
💤 Files with no reviewable changes (1)
  • airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py

📝 Walkthrough

Walkthrough

The substream partition router removes _migrate_child_state_to_parent_state. Parent state retrieval through get_stream_state remains unchanged.

Changes

State handling

Layer / File(s) Summary
Remove child-state migration
airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py
Removes state-format conversion, validation, and incremental parent-state migration for child or global stream state.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the removal of the unused method, which is the main change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lazebnyi/remove-dead-migrate-child-state

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This CDK Version

You can test this version of the CDK using the following:

# Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@lazebnyi/remove-dead-migrate-child-state#egg=airbyte-python-cdk[dev]' --help

# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch lazebnyi/remove-dead-migrate-child-state

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /prerelease - Triggers a prerelease publish with default arguments
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

PyTest Results (Fast)

4 183 tests  ±0   4 171 ✅ ±0   6m 7s ⏱️ - 1m 43s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 991de2a. ± Comparison against base commit 62b3165.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

PyTest Results (Full)

4 184 tests  ±0   4 172 ✅ ±0   12m 33s ⏱️ +28s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 408e6fb. ± Comparison against base commit 4758b15.

♻️ This comment has been updated with latest results.

@lazebnyi
Serhii Lazebnyi (lazebnyi) enabled auto-merge (squash) August 7, 2026 02:31
@lazebnyi
Serhii Lazebnyi (lazebnyi) merged commit 5c99925 into main Aug 7, 2026
26 of 29 checks passed
@lazebnyi
Serhii Lazebnyi (lazebnyi) deleted the lazebnyi/remove-dead-migrate-child-state branch August 7, 2026 02:43
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.

3 participants