Skip to content

fix(destination-milvus): preserve platform state message id - #88972

Merged
octavia-bot-hoard[bot] merged 2 commits into
masterfrom
devin/1792016307-destination-milvus-preserve-state-id
Oct 14, 2026
Merged

octavia-bot-hoard[bot] merged 2 commits into
masterfrom
devin/1792016307-destination-milvus-preserve-state-id

Conversation

@sunil-kuruba

Copy link
Copy Markdown
Contributor

What

Resolves https://github.com/airbytehq/oncall/issues/13391.

Since 0.0.61 (#84362, CDK bump to >=7.7.0,<8.0.0 for CVE-2025-68664), destination-milvus syncs fail on the platform with java.lang.IllegalStateException: State message does not contain id after the destination emits its first STATE message, committing 0 records. 0.0.60 is unaffected.

The platform attaches a top-level id to each STATE message and requires it on the STATE the destination echoes back. CDK 7.x AirbyteStateMessage is a serpyco-rs dataclass with no additional-properties support, so AirbyteMessageSerializer.load/dump in Destination._parse_input_stream / Destination.run silently drop the id. The CDK-level fix (airbytehq/airbyte-python-cdk#1134) is still an unmerged draft, so this is the same connector-local interim workaround already merged for destination-pinecone in #88612 — the CVE remediation stays (CDK version unchanged).

How

In destination_milvus/destination.py (identical to #88612):

  • DestinationMilvus._parse_input_stream (override): loads each line with AirbyteMessageSerializer and, for STATE messages, stores any top-level state keys that aren't AirbyteStateMessage fields (e.g. id) on the state object in a private attribute.
  • serialize_airbyte_message + DestinationMilvus.run (override): dump with AirbyteMessageSerializer, then merge those extra keys back into state with setdefault (never overwrites known keys, so it stays correct once the CDK preserves extras itself).
  • The CDK vector-db Writer yields input STATE objects unchanged, so the attribute reaches the output.

Version 0.0.62 → 0.0.63 (patch), changelog updated.

Test Coverage

New unit_tests/state_id_test.py (7 tests, ported from #88612): STREAM and GLOBAL state id round-trip, full _run_write path through the real CDK Writer (mocked indexer/embedder) emitting STATE with id, run() stdout containing id, no-extras state serializes identically to the CDK serializer, RECORD messages unaffected, invalid JSON lines skipped. Full connector unit suite: 20 passed.

Review guide

  1. destination_milvus/destination.py
  2. unit_tests/state_id_test.py
  3. metadata.yaml, pyproject.toml, docs/integrations/destinations/milvus.md

User Impact

Syncs to Milvus on 0.0.63 no longer fail with "State message does not contain id"; users pinned to 0.0.60 can upgrade and get the CVE fix. Follow-up: once airbytehq/airbyte-python-cdk#1134 is released, bump the CDK and drop this override.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Link to Devin session: https://app.devin.ai/sessions/e180c91d7c2146298ae46659f55cf1da
Open in Devin Desktop: https://app.devin.ai/desktop/session/e180c91d7c2146298ae46659f55cf1da?variant=devin
Requested by: Sunil Kuruba (@sunil-kuruba)

Co-Authored-By: Sunil Kuruba <sunil.kuruba@airbyte.io>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@octavia-bot
octavia-bot Bot marked this pull request as draft October 14, 2026 22:20
@octavia-bot

octavia-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

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.

Co-Authored-By: Sunil Kuruba <sunil.kuruba@airbyte.io>
@github-actions

Copy link
Copy Markdown
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:

  • 🛠️ Quick Fixes
    • /format-fix - Fixes most formatting issues.
    • /bump-version - Bumps connector versions, scraping changelog description from the PR title.
      • Bump types: patch (default), minor, major, major_rc, rc, promote.
      • The rc type is a smart default: applies minor_rc if stable, or bumps the RC number if already RC.
      • The promote type strips the RC suffix to finalize a release.
      • Example: /bump-version type=rc or /bump-version type=minor
    • /bump-progressive-rollout-version - Alias for /bump-version type=rc. Bumps with an RC suffix and enables progressive rollout.
  • ❇️ 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.
    • /ai-breaking-change-review - Step 1 for a connector breaking change. Reviews whether the change needs to be breaking, destination data-loss risk, and whether the migration guide, metadata message, and docs let users upgrade safely. Opens one conversation on the PR for each item the author needs to handle.
    • /ai-breaking-change-ready - Step 2, after you've replied to and resolved each of those conversations. Checks that every one has a reply and is resolved, then pings the breaking-change reviewers in Slack for human review.
  • 📝 AI Documentation:
    • /ai-docs-review - AI-powered documentation review for PRs with connector changes.
    • /ai-create-docs-pr - Creates a documentation PR for connector changes, stacked on the current PR.
  • 🚀 Connector Releases:
    • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
    • /enable-autopilot-rollouts - Enables autopilot progressive rollouts for the modified connector(s) in the PR, remediating "autopilot rollouts not enabled for {connector-name}" auto-merge blockers. Sets defaultRolloutMode: autopilot and enableProgressiveRollout: true, preserving any existing autopilotConfig.
      • Optional args: connector=<CONNECTOR_NAME> (defaults to the modified connectors in the PR), strategy=fast|slow|default (defaults to fast).
      • Example: /enable-autopilot-rollouts or /enable-autopilot-rollouts connector=source-faker strategy=slow
  • ☕️ 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.

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 14, 2026 22:21
@github-actions

Copy link
Copy Markdown
Contributor

Note

Autopilot progressive rollouts are not enabled for the following modified connector(s):

  • destination-milvus

This is a courtesy heads-up only — it does not block merge or fail any check.
To enable automatic progressive rollouts for the connector(s) above, comment
/enable-autopilot-rollouts on this PR. This sets defaultRolloutMode: autopilot
and enableProgressiveRollout: true in each connector's metadata.yaml,
preserving any existing autopilotConfig.

Comment on lines 121 to 122
| Version | Date | Pull Request | Subject |
|:--------| :--------- | :-------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |

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.

[markdownlint-fix] reported by reviewdog 🐶

Suggested change
| Version | Date | Pull Request | Subject |
|:--------| :--------- | :-------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
| Version | Date | Pull Request | Subject |
| :-------- | :--------- | :-------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |

@github-actions

Copy link
Copy Markdown
Contributor

destination-milvus Connector Test Results

26 tests   22 ✅  28s ⏱️
 2 suites   4 💤
 2 files     0 ❌

Results for commit eea3301.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

destination-milvus Connector Test Results

26 tests   22 ✅  26s ⏱️
 2 suites   4 💤
 2 files     0 ❌

Results for commit eea3301.

♻️ This comment has been updated with latest results.

@octavia-bot-admin octavia-bot-admin Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Auto-approved by auto-merge workflow.

@octavia-bot-hoard
octavia-bot-hoard Bot merged commit d811fd8 into master Oct 14, 2026
60 of 63 checks passed
@octavia-bot-hoard
octavia-bot-hoard Bot deleted the devin/1792016307-destination-milvus-preserve-state-id branch October 14, 2026 22:31
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