feat: add empty_streams filtering to standard test suites#641
feat: add empty_streams filtering to standard test suites#641devin-ai-integration[bot] wants to merge 3 commits intomainfrom
Conversation
- Add EmptyStreamConfig model and empty_streams field to ConnectorTestScenario - Extend get_scenarios() to include basic_read category - Implement catalog filtering in test_basic_read and test_docker_image_build_and_read methods - Exclude streams declared as empty_streams from test execution to prevent failures in sandbox environments Co-Authored-By: AJ Steers <aj@airbyte.io>
|
Original prompt from AJ Steers: |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
PyTest Results (Full)3 688 tests 3 677 ✅ 17m 54s ⏱️ Results for commit 86fd9a6. ♻️ This comment has been updated with latest results. |
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. Testing This CDK VersionYou can test this version of the CDK using the following: # Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@devin/1751411517-filter-empty-streams-from-tests#egg=airbyte-python-cdk[dev]' --help
# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch devin/1751411517-filter-empty-streams-from-testsHelpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
|
/autofix
|
|
Replaced by: |
Replaced by:
Add empty_streams filtering to standard test suites
Summary
This PR implements filtering functionality for the Python CDK standard test suites to exclude streams declared as
empty_streamsin acceptance-test-config.yml files. This prevents premium/unsupported streams from causing test failures in sandbox environments where connectors may not have access to all stream types.Key Changes:
EmptyStreamConfigmodel andempty_streamsfield toConnectorTestScenarioget_scenarios()to include "basic_read" category for proper test parametrizationtest_basic_read()andtest_docker_image_build_and_read()methodsempty_streamsconfiguration are now excluded from configured catalogs before test executionReview & Testing Checklist for Human
empty_streamsconfiguration in acceptance-test-config.ymlempty_streamsconfig still work normally (no regressions)EmptyStreamConfigmodel matches actual structure used in acceptance-test-config.yml files (name + bypass_reason fields)Recommended Test Plan:
Diagram
%%{ init : { "theme" : "default" }}%% graph TB subgraph "Test Framework" A["docker_base.py<br/>get_scenarios()"]:::major-edit B["docker_base.py<br/>test_docker_image_build_and_read()"]:::major-edit C["source_base.py<br/>test_basic_read()"]:::major-edit D["scenario.py<br/>ConnectorTestScenario"]:::major-edit end subgraph "Configuration" E["acceptance-test-config.yml<br/>empty_streams"]:::context end subgraph "Test Execution" F["ConfiguredAirbyteCatalog<br/>filtered streams"]:::context G["Connector Read Operations"]:::context end E --> D D --> A A --> C A --> B C --> F B --> F F --> G subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
read_from_streamsfiltering)EmptyStreamConfigmodel structure matches the format seen in source-amazon-ads acceptance-test-config.yml