Repository navigation
test: opt out of telemetry before test modules import the MCP server - #1386
Conversation
|
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 PyAirbyte!Thank you for your contribution from suryakant-source/PyAirbyte! We're excited to have you in the Airbyte community. 💡 Show Tips and TricksTesting This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/suryakant-source/PyAirbyte.git@suryakant-source-patch-1' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/suryakant-source/PyAirbyte.git@suryakant-source-patch-1'PR Slash CommandsAs needed or by request, Airbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesIf you have any questions, feel free to ask in the PR comments or join our community:
|
c80c74e
into
airbytehq:main
|
Suryakant Sahoo (@suryakant-source) - Thank you for this contribution! Much appreciated. 🙏 |
Fixes #1369
Problem
airbyte/mcp/server.pybuilds the MCP app, including its Segment sink, at import time._segment_write_key()only returnsNonewhenDO_NOT_TRACKorAIRBYTE_OFFLINE_MODEis set. The autousedo_not_trackfixture setsDO_NOT_TRACKper test, which runs after collection. Test modules that import the app at module level (for exampletest_mcp_arg_trace_parity.py) therefore create it with Segment enabled, and CI sendstool_calltelemetry to the production source.Change
Set
DO_NOT_TRACK=trueat module level intests/conftest.py, so it is in place before any test module is imported. This is the same value the existing fixture already sets for every test, so test behavior is otherwise unchanged. 4 lines added, nothing removed.How I checked
Probe plugin that calls
airbyte.mcp.server._segment_write_key()right after pytest collection withDO_NOT_TRACKandAIRBYTE_OFFLINE_MODEunset:NoneI did not run the full test suite or look at the warehouse data, so the issue's claim about which tests produce the 94% of failures is not something I verified. I did not touch the CI workflow.
I used an AI coding assistant while preparing this change, and I reviewed the diff and the check above myself.