Symptom
airbyte-cdk connector test . --no-creds --pytest-arg="-k invalid_config"
AttributeError: 'tuple' object has no attribute 'extend'
Root cause
airbyte_cdk/cli/airbyte_cdk/_connector.py (main, lines 151-156): --pytest-arg is a multiple=True click option, so pytest_args arrives as a tuple. pytest_args = pytest_args or [] keeps the tuple whenever at least one --pytest-arg is given, and --no-creds then calls pytest_args.extend(["-m", "not requires_creds"]) on it. Same code in the released 7.23.6.
Reproduction
Any connector directory, e.g. airbyte-integrations/connectors/source-monday in airbytehq/airbyte:
airbyte-cdk connector test . --no-creds --pytest-arg="-k invalid_config"
Without --pytest-arg the command works; without --no-creds it works.
Impact
The two options cannot be combined, so a scoped no-creds run (one scenario or one test) is impossible from the CLI.
Fix
pytest_args = list(pytest_args or []).
Workaround
--pytest-arg="-m" --pytest-arg="not requires_creds" instead of --no-creds.
Precedent
Found while reviewing airbytehq/airbyte#85170 (source-monday). Requested by Baz (@bazarnov).
Symptom
Root cause
airbyte_cdk/cli/airbyte_cdk/_connector.py(main, lines 151-156):--pytest-argis amultiple=Trueclick option, sopytest_argsarrives as a tuple.pytest_args = pytest_args or []keeps the tuple whenever at least one--pytest-argis given, and--no-credsthen callspytest_args.extend(["-m", "not requires_creds"])on it. Same code in the released 7.23.6.Reproduction
Any connector directory, e.g.
airbyte-integrations/connectors/source-mondayin airbytehq/airbyte:Without
--pytest-argthe command works; without--no-credsit works.Impact
The two options cannot be combined, so a scoped no-creds run (one scenario or one test) is impossible from the CLI.
Fix
pytest_args = list(pytest_args or []).Workaround
--pytest-arg="-m" --pytest-arg="not requires_creds"instead of--no-creds.Precedent
Found while reviewing airbytehq/airbyte#85170 (source-monday). Requested by Baz (@bazarnov).