feat(destination-motherduck): include Airbyte version and edition in the user agent - #84292
Conversation
…the user agent The connector reported a bare `airbyte` user agent, so syncs from Cloud, Community and Enterprise deployments were indistinguishable to MotherDuck. Read AIRBYTE_VERSION and AIRBYTE_EDITION, which the platform sets on the connector container, and report `airbyte/<version>(<edition>)`.
|
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 |
👋 Welcome to Airbyte!Thank you for your contribution from Donnype/airbyte! We're excited to have you in the Airbyte community. If you have any questions, feel free to ask in the PR comments or join our Slack community. 💡 Show Tips and TricksPR Slash CommandsAs needed or by request, Airbyte Maintainers can execute the following slash commands on your PR:
Tips for Working with CI
📚 Show Repo GuidanceHelpful Resources
|
|
↪️ Triggering Reason: PR is ready for review and has not had an AI review yet; review is the next pipeline step. |
Reviewing PR for connector safety and quality.
|
🛡️ AI PR Review Report🔴 Review Action: REQUEST CHANGES
🔶 Risk Level: 2/5Additive user-agent identifier threaded into the existing 🔧 Remediation RequiredCI Checks (FAIL) — Test failure is expected for a community PR without credentials — maintainers can manually approve after code review. To get a green signal, a maintainer can re-run connector tests from the base repo context ( Live / E2E Tests (UNKNOWN) — no 📋 PR DetailsConnector(s): 🔍 Gate Evaluation DetailsGate-by-Gate Analysis
Notes:
📚 Evidence ConsultedEvidence
❓ How to RespondResolving a Failing GateEach non-PASS gate above lists concrete remediation. Apply it, push, then re-run Written explanations do not change a gate verdict. If you believe a gate is a false positive or it cannot be remediated as written, request review from a human maintainer and explain the situation to them in a PR comment — a human reviewer can approve or merge over a bot FAIL. Never edit the PR description to argue with the bot; the description is how reviewers learn what the PR does. |
What
The MotherDuck destination reports a bare
airbytecustom user agent, so syncs from Airbyte Cloud, Community and Enterprise deployments are indistinguishable to MotherDuck, and there is no connector-side signal of which platform version produced them. This makes it harder to reproduce and triage user-reported sync issues.This PR reports
airbyte/<version>(<edition>)instead, e.g.airbyte/1.8.2(CLOUD).How
The
AIRBYTE_VERSIONandAIRBYTE_EDITIONare already set on the connector container by the platform, andAIRBYTE_EDITIONis the same variable the Bulk CDK reads for itsAIRBYTE_CLOUD_DEPLOYMENTfeature flag.The
get_custom_user_agent()reads both and passes the result toMotherDuckConfig, which already threadscustom_user_agentinto the DuckDB connection string. Each part is omitted when its variable is unset, so a standalone run still reports plainairbyte. Thename/version(platform)shape is what MotherDuck's user-agent parsing expects.Review guide
destination_motherduck/destination.py— the new helper and its single call site.unit_tests/test_destination_unit_tests.py— covers all four env var combinations.User Impact
None. This only changes the identifier the connector sends to MotherDuck; no behavior or configuration changes.
Can this PR be safely reverted and rolled back?