Skip to content

airbyte-cdk connector test: --no-creds crashes when combined with --pytest-arg (tuple has no extend) #1153

Description

@bazarnov

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).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityPRs and issues from community contributors

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions