Repository navigation
feat(standard-tests): remove the ignored scenario fields and reject acceptance-test-config keys that are not read - #1226
Draft
Anatolii Yatsuk (tolik0) wants to merge 6 commits into
Draft
Anatolii Yatsuk (tolik0) wants to merge 6 commits into
Anatolii Yatsuk (tolik0) wants to merge 6 commits into
Conversation
…eys that are not read `ConnectorTestScenario` declared `expect_records` (with `exact_order`), `timeout_seconds` and `file_types`, and nothing read them: a config that set them looked like it configured a check that never ran. Every other undeclared key was dropped silently too, so a misspelled `empty_streams` was ignored. Remove the three fields and their nested models. An entry of a collected section now fails collection for any key the standard tests do not read, with one line per key naming the key, the section and the config; the removed keys (plus `ignored_fields` and `fail_on_extra_columns`, which only configured CAT's record comparison) say they are no longer read. CAT keys that connectors still set and that have no counterpart yet are accepted only in the section CAT read them from. Validation errors no longer print the input. A guard test fails when a field of the model has no reader in `airbyte_cdk.test`. `bypass_reason` is accepted for the zero-scenario rule (airbyte-internal-issues#17131) and is exempt until that rule reads it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… an acceptance-test-config entry `get_scenarios()` fills both fields in itself and overwrote whatever an entry set, so an entry that set them was accepted and silently ignored, which is what this branch removes everywhere else. Report them as not entry keys, with the reason, through `entry_key_problems(from_file=True)`; the model validator, which sees the data `get_scenarios()` built, passes `from_file=False`. No connector sets them today. Also note in the migration guide that the enterprise connectors are cleaned up before the release, alongside the monorepo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting 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@tolik0/cdk/remove-dead-scenario-fields#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 tolik0/cdk/remove-dead-scenario-fieldsPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
PyTest Results (Fast)5 788 tests +40 5 757 ✅ +39 10m 47s ⏱️ - 1m 23s Results for commit f2af64b. ± Comparison against base commit 2082c2d. This pull request skips 1 test.♻️ This comment has been updated with latest results. |
PyTest Results (Full)5 791 tests +40 5 760 ✅ +39 17m 7s ⏱️ +7s Results for commit f2af64b. ± Comparison against base commit 2082c2d. This pull request skips 1 test.♻️ This comment has been updated with latest results. |
…` their real removal reasons `fail_on_extra_columns` never compared anything: CAT accepted it and never enforced it. `ignored_fields` in `full_refresh` fed CAT's sequential-reads test, which compared two consecutive reads, not a recorded file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Anatolii Yatsuk (tolik0)
marked this pull request as draft
October 14, 2026 14:12
…d of rejecting them Rejecting expect_records, ignored_fields, fail_on_extra_columns, timeout_seconds and file_types forced a cleanup of 123 connectors, each needing a version bump, before this release. They are now accepted, and dropped, in the section CAT read them from, like the other legacy keys. Only unknown keys, legacy keys in another section and the fields get_scenarios() fills in are rejected; no connector on airbyte or enterprise master sets one. The recorded-records files stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 5 tasks
…t instead of rejecting them" This reverts commit cb766e5. The old keys are cleaned up from the connectors instead; the recorded-records files are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…expect_records` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 14, 2026
Daryna Ishchenko (darynaishchenko)
approved these changes
Oct 15, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ConnectorTestScenariodeclaredexpect_records(with itsAcceptanceTestExpectRecordsmodel andexact_order),timeout_secondsandfile_types(withAcceptanceTestFileTypes). Nothing read them. A connector withexpect_recordslooked like its records were compared against a recorded file, and they were not. Any other undeclared key was also dropped without a word (pydantic's defaultextra="ignore"), so a misspelledempty_streamsilently did nothing.This PR:
ignored_fields(fields CAT skipped when comparing records, againstexpect_recordsor between two full-refresh reads) andfail_on_extra_columns(accepted by CAT but never enforced), as "no longer read", with the reason;ConnectorTestScenariohas no reader inairbyte_cdk.test.configured_catalog_pathstays: #1142 honours it.Resolves https://github.com/airbytehq/airbyte-internal-issues/issues/17138 (part of epic airbytehq/airbyte-internal-issues#17129).
How
airbyte_cdk/test/models/scenario.pyREMOVED_ENTRY_KEYS: the six removed keys, each with why it is not read.LEGACY_ENTRY_KEYS: CAT keys that connectors still set and that the scenario does not read, accepted only in the section CAT read them from.backward_compatibility_tests_configinspecis read from the file by the spec backward-compatibility test (feat(standard-tests): check spec backward compatibility against the published version #1220); the rest have no standard-test counterpart yet and are left to the fleet cleanup (P3.4).entry_key_problems(entry, sections): one message per key that is neither a field nor a legacy key of the section. It never prints a value.POPULATED_FIELDS:sectionsandtest_strictness_levelare fields thatget_scenarios()fills in (test_strictness_levelfrom the top level of the file). An entry that sets one is rejected as "not an entry key" instead of being overwritten without a word.extra="forbid"andhide_input_in_errors=True. Amode="before"validator raises theentry_key_problemsmessages and drops the legacy keys.AcceptanceTestEmptyStreamisextra="forbid"too.bypass_reasonis accepted on an entry. It is read by the zero-scenario rule of P0.3 (airbytehq/airbyte-internal-issues#17131), developed in parallel.airbyte_cdk/test/standard_tests/docker_base.py:get_scenarios()checks every entry of every collected section first, including the entries it skips (noconfig_path, or aniam_roleconfig). It raises oneValueErrorlisting every problem in the file, prefixed with the file path. A pydantic error on a value (an unknownstatus, for example) is reported the same way, without the input.unit_tests/test/test_scenario_keys.py): scansairbyte_cdk/test(minus the model module) for attribute names, keyword names and string constants. A field counts as read if its name appears there, or if a method or property of the model that reads it (config_dictthroughget_config_dict()) does.bypass_reasonis exempt until P0.3 reads it, and a second test fails once it is read, so the exemption is removed with P0.3.Example,
source-stripeon master:Which keys are accepted
From an inventory of every
acceptance-test-config.ymlon airbytemaster(1e22e3c689c, 592 files, 553 withacceptance_tests):config_path,status,configured_catalog_path,empty_streams,validate_schemaconfig_dictbypass_reasonspec_path/backward_compatibility_tests_config/deployment_modespecdeployment_modeconnectionbackward_compatibility_tests_configdiscoveryclient_container_config,expect_trace_message_on_failure,validate_state_messagesbasic_readclient_container_configfull_refreshexpect_records(exact_ordernested)basic_readfail_on_extra_columnsbasic_readignored_fieldsfull_refreshtimeout_secondsfile_typesbasic_readsections,test_strictness_levelget_scenarios())The
incrementalsection is not collected (#1142) and is not checked. Files with the legacy top-leveltests:key (39) already fail collection (airbytehq/airbyte-internal-issues#16264); they are untouched here.Fleet impact
master(1e22e3c689c)masterThe 4 enterprise connectors live in a private repository whose connector CI calls airbyte's
connector-ci-checks.yml@master, which installs the CDK CLI unpinned; they are covered by a separate cleanup PR in that repository.Measured two ways with this branch: a static run of the check over every file at both refs (
static_sweep.py), andairbyte-cdk connector test --collect-onlythrough the CLI over every Python and manifest-only connector of the cleaned branch (584 Python and manifest-only connectors: 549 collect, 35 fail collection for the pre-existing legacy top-leveltests:layout (airbytehq/airbyte-internal-issues#16264), 0 are rejected by the key check; 8 Java connectors skipped; 3 runs killed by SIGTERM mid-sweep were re-run individually and collect). The split into 8 PRs applies the same edits; with all 8 merged, the static check rejects 0 of 592 files.Rollout
masterand the enterprisemaster: a connector PR merged in between can re-add a key.Test Connectorsjob is red until the monorepo cleanup merges. It checks out airbytemasterand runsairbyte-cdk connector test; 4 of its matrix connectors (source-hardcoded-records, source-shopify, source-google-drive, source-intercom) still set rejected keys there. Test Connectors fails collection for these 4 until their batches merge (test(connectors): remove acceptance-test-config keys the standard tests never read (6/8: community Python) airbyte#88954, #88950, #88953 and #88948); re-run it after.cdk-migrations.mdunder "Upgrading to the next minor release (unreleased)".get_scenarios()andscenario.py: rebase after whichever merges first. When P0.3 readsbypass_reason, remove it fromAWAITING_READERintest_scenario_keys.py(a test fails until you do).Test plan
poetry run pytest unit_tests/test/ -p no:cacheprovider: 824 passed, 9 skippedunit_tests/test/test_scenario_keys.py(40 tests): each removed key inbasic_readandfull_refresh, an unknown key, a legacy key inside and outside its section,sections/test_strictness_levelset on an entry, an unknownempty_streamskey, entries withoutconfig_pathandiam_roleentries, a value error without its value, and the guard test.ruff format,ruff check,mypyon the touched modules (mypy airbyte_cdkreports the same 51 pre-existing errors asmain).airbyte-cdk connector test --collect-onlyfrom this branch: source-linkedin-ads, source-clickup-api, source-coingecko-coins and source-stripe fail collection onmasterwith the messages above, and collect (39/21/21/21 tests) on the cleaned branch.master, all 5 collect with their cleanup branch.Test Connectorsfails collection for source-hardcoded-records, source-shopify, source-google-drive and source-intercom until their batches merge; re-run it after.🤖 Generated with Claude Code