Skip to content

feat(destination-motherduck): include Airbyte version and edition in the user agent - #84292

Open
Donny Peeters (Donnype) wants to merge 2 commits into
airbytehq:masterfrom
Donnype:donnypy/motherduck-dest-detailed-user-agent
Open

feat(destination-motherduck): include Airbyte version and edition in the user agent#84292
Donny Peeters (Donnype) wants to merge 2 commits into
airbytehq:masterfrom
Donnype:donnypy/motherduck-dest-detailed-user-agent

Conversation

@Donnype

Copy link
Copy Markdown
Contributor

What

The MotherDuck destination reports a bare airbyte custom 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_VERSION and AIRBYTE_EDITION are already set on the connector container by the platform, and AIRBYTE_EDITION is the same variable the Bulk CDK reads for its AIRBYTE_CLOUD_DEPLOYMENT feature flag.

The get_custom_user_agent() reads both and passes the result to MotherDuckConfig, which already threads custom_user_agent into the DuckDB connection string. Each part is omitted when its variable is unset, so a standalone run still reports plain airbyte. The name/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?

  • YES 💚
  • NO ❌

…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>)`.
@octavia-bot

octavia-bot Bot commented Aug 12, 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.

@github-actions

Copy link
Copy Markdown
Contributor

👋 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 Tricks

PR Slash Commands

As needed or by request, Airbyte Maintainers can execute the following slash commands on your PR:

  • /format-fix - Fixes most formatting issues.
  • /bump-version - Bumps connector versions.
  • /run-connector-tests - Runs connector tests.
  • /run-cat-tests - Runs CAT tests.
  • /run-regression-tests - Runs regression tests for the modified connector(s).
  • /build-connector-images - Builds and publishes a pre-release docker image for the modified connector(s).
  • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
  • /ai-review - AI-powered PR review for connector safety and quality gates.
  • /ai-docs-review - AI-powered documentation review for PRs with connector changes.
  • /ai-create-docs-pr - Creates a documentation PR for connector changes.
  • /force-merge reason="<A_GOOD_REASON>" - Force merges the PR using admin privileges, bypassing CI checks. Requires a reason.

Tips for Working with CI

  1. Pre-Release Checks. Please pay attention to these, as they contain standard checks on the metadata.yaml file, docs requirements, etc. If you need help resolving a pre-release check, please ask a maintainer.
    • Note: If you are creating a new connector, please be sure to replace the default logo.svg file with a suitable icon.
  2. Connector CI Tests. Some failures here may be expected if your tests require credentials. Please review these results to ensure (1) unit tests are passing, if applicable, and (2) integration tests pass to the degree possible and expected.
  3. (Optional.) BYO Connector Credentials for tests in your fork. You can optionally set up your fork with BYO credentials for your connector. This can significantly speed up your review, ensuring your changes are fully tested before the maintainers begin their review.
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@Donnype
Donny Peeters (Donnype) marked this pull request as ready for review August 12, 2026 09:29
@airbyte-support-bot

Copy link
Copy Markdown
Contributor

↪️ Triggering /ai-review per Hands-Free AI Triage Project triage next step.

Reason: PR is ready for review and has not had an AI review yet; review is the next pipeline step.

Devin session

@octavia-bot

octavia-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

AI PR Review starting...

Reviewing PR for connector safety and quality.
View playbook

Devin AI session created successfully!

@airbyte-support-bot

Airbyte Support Bot (airbyte-support-bot) commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI PR Review Report

🔴 Review Action: REQUEST CHANGES

Gate Status
CI Checks FAIL
Live / E2E Tests UNKNOWN

🔶 Risk Level: 2/5

Additive user-agent identifier threaded into the existing MotherDuckConfig; no data, schema, or config behavior changes.

🔧 Remediation Required

CI Checks (FAIL)Test destination-motherduck Connector [No Creds] fails on the docker standard test test_docker_image_build_and_check[secrets/'config' Test Scenario]:

AssertionError: `check` for connector 'destination-motherduck' did not succeed:
AirbyteConnectionStatus(status=FAILED, message="An exception occurred: PermissionError(13, 'Permission denied')")

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 (/run-connector-tests) where org secrets are available.

Live / E2E Tests (UNKNOWN) — no /ai-prove-fix run found on this PR. Run /ai-prove-fix to publish a pre-release and validate the change, or have a maintainer confirm the user-agent change needs no live validation.


📋 PR Details

Connector(s): destination-motherduck
PR: #84292
HEAD SHA: 593d971f57d4e7bab5d8663a468c76ec640f6906
Session: https://app.devin.ai/sessions/3e95f76074824a3a8de768d2385e4e08

🔍 Gate Evaluation Details

Gate-by-Gate Analysis

Gate Status Enforced? Details
PR Hygiene PASS Yes Description ~1.5k chars with What/How/Review guide/User Impact sections; changelog row added in docs/integrations/destinations/motherduck.md for 0.2.7; no unresolved human review comments (only bot comments present).
Code Hygiene PASS WARNING Source (destination_motherduck/destination.py) and tests (unit_tests/test_destination_unit_tests.py) both modified.
Test Coverage PASS Yes Title matches feat; new test test_get_custom_user_agent adds four assertions covering all env-var combinations.
Code Security PASS Yes No changed file path matches auth/credential/token/secret patterns; diff hunks contain no security keywords (api_key=SecretString(...) is an unchanged context line).
Per-Record Performance PASS WARNING get_custom_user_agent() is called once when the SQL processor/config is constructed, not per record.
Breaking Dependencies PASS WARNING Only the connector's own version changes (0.2.60.2.7 in pyproject.toml and metadata.yaml); no third-party dependency versions modified.
Backwards Compatibility PASS Yes (enforced) No spec, schema, stream, primary-key, or cursor changes; no format/type changes; metadata.yaml diff is a dockerImageTag patch bump only.
Forwards Compatibility PASS Warning (elevates Risk Level) No state/cursor/partition/pagination/transformation keywords in the diff hunks; change is explicitly declared revertible.
Behavioral Changes PASS Warning (elevates Risk Level) No rate-limit, retry, backoff, timeout, error-handler, or page-size keywords in the diff hunks.
Out-of-Scope Changes PASS Skip All changes are under airbyte-integrations/connectors/destination-motherduck/ and docs/.
CI Checks FAIL Yes Test destination-motherduck Connector [No Creds] failed on the docker check standard test with PermissionError(13, 'Permission denied'). Test failure expected for community PR without credentials — maintainers can manually approve after code review. Lint destination-motherduck Connector, Format Check, Build and Verify Artifacts, docs lint and unit tests all passed. Progressive Rollout Gate / Rollout Checks Summary failures are excluded per policy (rollout state, not a code defect).
Live / E2E Tests UNKNOWN Yes destination.py is a sync-behavior file pattern, so validation is required; no /ai-prove-fix conclusion exists on this PR → UNKNOWN, not FAIL.

Notes:

  • Pre-release check-runs (destination-motherduck Pre-Release Checks — success) and regression/live check-runs are owned solely by the Live / E2E Tests gate and are not counted in CI Checks.
  • The failing unit-test job's own pytest phase passed; the failure is isolated to the credential-dependent docker check scenario.
📚 Evidence Consulted

Evidence

  • Changed files: 5 (destination_motherduck/destination.py +12, metadata.yaml ±1, pyproject.toml ±1, unit_tests/test_destination_unit_tests.py +21/-1, docs/integrations/destinations/motherduck.md +1)
  • CI checks (HEAD 593d971): FAIL — Test destination-motherduck Connector [No Creds], destination-motherduck Progressive Rollout Gate, Connector Active Progressive Rollout Checks Summary (last two excluded); PASS — Lint destination-motherduck Connector, Format Check, Build and Verify Artifacts (destination-motherduck), Check Changelog Updated, Docs / MarkDownLint, Docs / Vale, Validate PR Title, destination-motherduck Pre-Release Checks, Analyze Python
  • PR labels: community, connectors/destination/motherduck, hyd-review
  • PR description: present
  • Existing bot reviews: none
  • /ai-prove-fix conclusion: not found
❓ How to Respond

Resolving a Failing Gate

Each non-PASS gate above lists concrete remediation. Apply it, push, then re-run /ai-review — the bot re-evaluates from the diff, CI check-runs, and /ai-prove-fix results.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants