JSON/YAML formatter cannot be used in stable/kilo if cliff-tablib 2.0 is installed

Bug #1538044 reported by Bao Fangyan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Invalid
Undecided
Unassigned
Kilo
Fix Released
High
Unassigned

Bug Description

Failed to run tox for neutronclient in stable/kilo,details as follows:

/opt/backups/neutronclient-kilo/python-neutronclient$tox -e py27 -v
... ...
======================================================================
FAIL: neutronclient.tests.unit.test_cli20_agents.CLITestV20Agent.test_list_agents
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
  stdout

stderr: {{{
usage: list_agents [-h] [-f {csv,html,table}] [-c COLUMN]
                   [--max-width <integer>]
                   [--quote {all,minimal,none,nonnumeric}]
                   [--request-format {json,xml}] [-D] [-F FIELD]
                   [--sort-key FIELD] [--sort-dir {asc,desc}]
list_agents: error: argument -f/--format: invalid choice: 'json' (choose from 'csv', 'html', 'table')
}}}

Traceback (most recent call last):
  File "neutronclient/tests/unit/test_cli20_agents.py", line 31, in test_list_agents
    self._test_list_columns(cmd, resources, contents, args)
  File "neutronclient/tests/unit/test_cli20.py", line 299, in _test_list_columns
    shell.run_command(cmd, cmd_parser, args)
  File "neutronclient/shell.py", line 99, in run_command
    known_args, _values_specs = cmd_parser.parse_known_args(_argv)
  File "/usr/lib/python2.7/argparse.py", line 1729, in parse_known_args
    self.error(str(err))
  File "/usr/lib/python2.7/argparse.py", line 2363, in error
    self.exit(2, _('%s: error: %s\n') % (self.prog, message))
  File "/usr/lib/python2.7/argparse.py", line 2351, in exit
    _sys.exit(status)
SystemExit: 2
======================================================================
FAIL: process-returncode
tags: worker-0
----------------------------------------------------------------------
returncode 2
Ran 347 tests in 8.580s (+0.591s)
FAILED (id=2, failures=2)
error: testr failed (1)
ERROR: InvocationError: '/opt/backups/neutronclient-kilo/python-neutronclient/.tox/py27/bin/python setup.py testr --testr-args='
___________________________________ summary ____________________________________
ERROR: py27: commands failed

Check the version of cliff,after updating,it can be run successfully.

Bao Fangyan (baofangyan)
Changed in python-neutronclient:
assignee: nobody → Bao Fangyan (baofangyan)
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This is because cliff-tablib 2.0 has been released recently to deal with bug 1531574.
In Kilo, we are using cliff<1.11.0,>=1.10.0 and this version does not provide JSON/YAML formatter.

To fix this we need to update global-requirements (stable/kilo) to use cliff-tablib <2.0 first.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

I proposed a patch to cap cliff-tablib to <2.0 to global-requirements.
https://review.openstack.org/272457

summary: - Failed to run tox in stable/kilo
+ JSON/YAML formatter cannot be used in stable/kilo if cliff-tablib 2.0 is
+ installed
Changed in python-neutronclient:
status: New → Triaged
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This does not affect Liberty and Mitaka, so I mark this as Invalid in the trunk.

Changed in python-neutronclient:
status: Triaged → Invalid
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Let me re-open until the issue is fixed in Kilo.
If we mark it as invalid in the trunk, the bug is not displayed in the bug list :-(

tags: added: kilo-backport-potential
Changed in python-neutronclient:
status: Invalid → Triaged
Bao Fangyan (baofangyan)
Changed in python-neutronclient:
assignee: Bao Fangyan (baofangyan) → nobody
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This bug is > 180 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in python-neutronclient:
status: Triaged → Incomplete
Revision history for this message
Akihiro Motoki (amotoki) wrote :
Changed in python-neutronclient:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.