Repository navigation
fix(destination-milvus): preserve platform state message id - #88972
octavia-bot-hoard[bot] merged 2 commits into
Conversation
Co-Authored-By: Sunil Kuruba <sunil.kuruba@airbyte.io>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
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 |
Co-Authored-By: Sunil Kuruba <sunil.kuruba@airbyte.io>
👋 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 Autopilot progressive rollouts are not enabled for the following modified connector(s):
This is a courtesy heads-up only — it does not block merge or fail any check. |
| | 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/13391.
Since 0.0.61 (#84362, CDK bump to
>=7.7.0,<8.0.0for CVE-2025-68664), destination-milvus syncs fail on the platform withjava.lang.IllegalStateException: State message does not contain idafter the destination emits its first STATE message, committing 0 records. 0.0.60 is unaffected.The platform attaches a top-level
idto each STATE message and requires it on the STATE the destination echoes back. CDK 7.xAirbyteStateMessageis a serpyco-rs dataclass with no additional-properties support, soAirbyteMessageSerializer.load/dumpinDestination._parse_input_stream/Destination.runsilently drop theid. 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 withAirbyteMessageSerializerand, for STATE messages, stores any top-levelstatekeys that aren'tAirbyteStateMessagefields (e.g.id) on the state object in a private attribute.serialize_airbyte_message+DestinationMilvus.run(override): dump withAirbyteMessageSerializer, then merge those extra keys back intostatewithsetdefault(never overwrites known keys, so it stays correct once the CDK preserves extras itself).Writeryields 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 stateidround-trip, full_run_writepath through the real CDKWriter(mocked indexer/embedder) emitting STATE withid,run()stdout containingid, no-extras state serializes identically to the CDK serializer, RECORD messages unaffected, invalid JSON lines skipped. Full connector unit suite: 20 passed.Review guide
destination_milvus/destination.pyunit_tests/state_id_test.pymetadata.yaml,pyproject.toml,docs/integrations/destinations/milvus.mdUser 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?
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)