Skip to content

pytest-cloud is not working with pytest-xdist>1.25.0 #16

@dasm

Description

@dasm

pytest-xdist introduced breaking change to pytest-cloud with the release of 1.26.0 version change request

(venv2) ➜  utils git:(master) ✗ pytest test_name.py --cloud-node=hostname --cloud-python=python2 -s
Detected root dir: /apps/utils
Detecting connectable test nodes...
Found 1 connectable test nodes: set(['hostname'])
RSyncing directory structure
rsync: -arHAXx: unknown option
rsync error: syntax or usage error (code 1) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54/rsync/main.c(1337) [client=2.6.9]
RSync finished
Scheduling with 12 parallel test sessions
============================================================================================================================= test session starts ==============================================================================================================================
platform darwin -- Python 2.7.17, pytest-4.6.9, py-1.8.1, pluggy-0.13.1
rootdir: /Users/dsmigiel/apps/dcp-test-utils, inifile: pytest.ini
plugins: timeout-1.3.4, ansible-playbook-0.4.1, xdist-1.31.0, forked-1.1.3, metadata-1.8.0, json-report-1.2.1, cloud-3.0.1
timeout: 600.0s
timeout method: signal
timeout func_only: False
hostname_0 C / (...) / hostname_11 C[hostname_0] node down: Traceback (most recent call last):
  File "<string>", line 1084, in executetask
  File "<string>", line 1, in do_exec
  File "/apps/utils/venv2/lib/python2.7/site-packages/xdist/remote.py", line 232, in <module>
ValueError: need more than 3 values to unpack

After downgrading to xdist-1.25.0

(venv2) ➜  utils git:(master) ✗ pytest test_name.py --cloud-node=hostname --cloud-python=python2
Detected root dir: /apps/utils
Detecting connectable test nodes...
Found 1 connectable test nodes: set(['hostname'])
RSyncing directory structure
rsync: -arHAXx: unknown option
rsync error: syntax or usage error (code 1) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54/rsync/main.c(1337) [client=2.6.9]
RSync finished
Scheduling with 12 parallel test sessions
============================================================================================================================= test session starts ==============================================================================================================================
platform darwin -- Python 2.7.17, pytest-4.6.9, py-1.8.1, pluggy-0.13.1
rootdir: /apps/utils, inifile: pytest.ini
plugins: timeout-1.3.4, xdist-1.25.0, ansible-playbook-0.4.1, forked-1.1.3, metadata-1.8.0, json-report-1.2.1, cloud-3.0.1
timeout: 600.0s
timeout method: signal
timeout func_only: False
hostname_0 C / (...) / hostname_11 C[hostname_0] node down: Traceback (most recent call last):
  File "<string>", line 1084, in executetask
  File "<string>", line 1, in do_exec
  File "/apps/utils/venv2/lib/python2.7/site-packages/xdist/remote.py", line 266, in <module>
  File "/apps/utils/venv2/lib/python2.7/site-packages/xdist/remote.py", line 242, in remote_initconfig
  File "/remote/pytest_username_utils/venv2/lib/python2.7/site-packages/_pytest/config/__init__.py", line 787, in fromdictargs
    config.parse(args, addopts=False)
  File "/remote/pytest_username_utils/venv2/lib/python2.7/site-packages/_pytest/config/__init__.py", line 953, in parse
    args, self.option, namespace=self.option
  File "/remote/pytest_username_utils/venv2/lib/python2.7/site-packages/_pytest/config/argparsing.py", line 101, in parse_setoption
    parsedoption = self.parse(args, namespace=namespace)
  File "/remote/pytest_username_utils/venv2/lib/python2.7/site-packages/_pytest/config/argparsing.py", line 81, in parse
    return self.optparser.parse_args(args, namespace=namespace)
  File "/remote/pytest_username_utils/venv2/lib/python2.7/site-packages/_pytest/config/argparsing.py", line 349, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib64/python2.7/argparse.py", line 1720, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib64/python2.7/argparse.py", line 1944, in _parse_known_args
    self.error(_('argument %s is required') % name)
  File "/remote/pytest_username_utils/venv2/lib/python2.7/site-packages/_pytest/config/argparsing.py", line 345, in error
    raise UsageError(self.format_usage() + msg)
UsageError: usage: -c [options] [file_or_dir] [file_or_dir] [...]
-c: error: argument --workspace is required

In second example, last error doesn't matter. It is caused by test itself.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions