RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1331952 - Review Request: openstack-mistral-ui - OpenStack Mistral Dashboard
Summary: Review Request: openstack-mistral-ui - OpenStack Mistral Dashboard
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: Package Review
Version: trunk
Hardware: All
OS: Linux
medium
medium
Target Milestone: Milestone1
: trunk
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: RDO-NEWTON
TreeView+ depends on / blocked
 
Reported: 2016-04-30 12:18 UTC by Marcos
Modified: 2016-08-25 12:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-25 12:31:37 UTC
Embargoed:
mrunge: rdo-review+


Attachments (Terms of Use)

Description Marcos 2016-04-30 12:18:27 UTC
Spec URL: http://mferminl.web.cern.ch/mferminl/fedorapkg/mistral-dashboard/2.0.0/python-mistral-dashboard.spec
SRPM URL: http://mferminl.web.cern.ch/mferminl/fedorapkg/mistral-dashboard/2.0.0/python-mistral-dashboard-2.0.0-1.fc25.src.rpm
Description: Mistral Dashboard is an extension for OpenStack Dashboard that provides a UI for Mistral.
Fedora Account System Username: mflobo

Successful scratch: http://koji.fedoraproject.org/koji/taskinfo?taskID=13865322

Comment 1 Marcos 2016-04-30 15:59:39 UTC
Waiting for python-django-compresso-2.0 https://bugzilla.redhat.com/show_bug.cgi?id=1331959

Anyhow, we can start with this review.

Comment 2 Alan Pevec 2016-05-10 08:49:45 UTC
Please rename package to openstack-*-ui to keep it consistent with current OpenStack UI Horizon plugins we have in RDO: openstack-sahara-ui openstack-manila-ui openstack-trove-ui openstack-app-catalog-ui

Upstream project names vary, there are both *-dashboard and *-ui

Comment 4 Alan Pevec 2016-05-12 10:49:39 UTC
> # Remove bundled egg-info
> rm -rf %{pypi_name}.egg-info

Remove bundled egg-info was misguide guideline, fixed in the meantime:
 https://fedoraproject.org/w/index.php?title=Packaging%3APython_Eggs&diff=400802&oldid=369803


> %{python2_sitelib}/mistral_dashboard-%{version}-py?.?.egg-info

Use wildcard instead, to make it ready for rpm-master:
 https://www.rdoproject.org/documentation/rdo-packaging/#differences-between-master-and-rawhide-packaging


Also please check https://github.com/javierpena/openstack-example-spec/blob/master/example-ui.spec

There sections
# Move config to horizon
and
# Move static files to horizon
which are not present here.
Matthias, please explain why are those needed?

Comment 5 Matthias Runge 2016-05-12 13:13:27 UTC
placing an enabled file is required for horizon to pick up the corresponding -ui.

You need to add a requirement to openstack-dashboard anyways.

I would use %{python2_version} instead of using wildcards.


Strictly speaking, you don't need the requirement to compressor, it's not used at runtime, but referenced in tests.


apevec, horizons scripts will collect static files and will place them in /usr/share/openstack-dashboard/static; that also includes all plugins.

Comment 6 Matthias Runge 2016-05-12 13:56:40 UTC
please try to get tests running, the current snippet is not executed at build time, and test requirements are missing as build requirements.

Comment 7 Alan Pevec 2016-05-13 00:03:49 UTC
> I would use %{python2_version} instead of using wildcards.

-%{version} part is what needs to be replaced by wildcards for RDO Trunk builds
-py?.? part is not important

Comment 9 Matthias Runge 2016-05-13 13:58:08 UTC
Marcos,

the test issue is still open.

You don't need to require on python-django-horizon, since that is pulled in via openstack-dashboard already.

If you could fix that, I'm even inclined to approve with the stricter fedora guidelines.

Comment 10 Marcos 2016-05-13 17:10:14 UTC
Hi Mathias,

I removed python-django-horizon requirement but I don't know how to see the tests issue that you metion.

SPEC: http://mferminl.web.cern.ch/mferminl/fedorapkg/openstack-mistral-ui/2.0.0/openstack-mistral-ui.spec
SRPM: http://mferminl.web.cern.ch/mferminl/fedorapkg/openstack-mistral-ui/2.0.0/openstack-mistral-ui-2.0.0-1.fc25.src.rpm

Comment 11 Matthias Runge 2016-05-17 06:16:28 UTC
(In reply to Marcos from comment #10)
> Hi Mathias,
> 
> I removed python-django-horizon requirement but I don't know how to see the
> tests issue that you metion.
> 

In your scratch-build:
https://kojipkgs.fedoraproject.org//work/tasks/5064/14025064/build.log

Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.F6cDQi
+ umask 022
+ cd /builddir/build/BUILD
+ cd mistral-dashboard-2.0.0
+ exit 0

I can't see anything running a test here. I would also expect test output.

For a cross check, make your test section read (removing the %if):

%check
PYTHONPATH=/usr/share/openstack-dashboard/ ./run_tests.sh -N -P

Comment 12 Marcos 2016-05-17 08:22:27 UTC
Hi,

Tests enabled.

SPEC: http://mferminl.web.cern.ch/mferminl/fedorapkg/openstack-mistral-ui/2.0.0/openstack-mistral-ui.spec
SRPM: http://mferminl.web.cern.ch/mferminl/fedorapkg/openstack-mistral-ui/2.0.0/openstack-mistral-ui-2.0.0-1.fc25.src.rpm

Due to tests execution, I had to add openstack-dashboard dependecy to BuildRequire. This makes scratch fail http://koji.fedoraproject.org/koji/taskinfo?taskID=14125627

https://kojipkgs.fedoraproject.org//work/tasks/5627/14125627/mock_output.log 
No matching package to install: 'openstack-dashboard >= 8.0.0'
Not all dependencies satisfied
Error: Some packages could not be found.

Comment 13 Alan Pevec 2016-05-17 15:29:29 UTC
You can try scratch in CBS with cloud7-openstack-mitaka-el7 build target.

Comment 14 Matthias Runge 2016-05-30 11:59:15 UTC
https://cbs.centos.org/koji/taskinfo?taskID=94422

Comment 15 Matthias Runge 2016-05-30 12:03:56 UTC
+ ./run_tests.sh -N -P
Running Mistral-Dashboard application tests
Traceback (most recent call last):
  File "/builddir/build/BUILD/mistral-dashboard-2.0.0/manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
    django.setup()
  File "/usr/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/usr/lib/python2.7/site-packages/django/apps/config.py", line 86, in create
    module = import_module(entry)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named django_nose

Comment 17 Matthias Runge 2016-06-01 09:00:43 UTC
https://cbs.centos.org/koji/taskinfo?taskID=94517

Comment 18 Matthias Runge 2016-06-01 10:45:22 UTC
With python-django-nose added, it still fails:
DEBUG util.py:417:  Getting requirements for openstack-mistral-ui-2.0.0-1.el7.src
DEBUG util.py:417:   --> Already installed : git-1.8.3.1-6.el7_2.1.x86_64
DEBUG util.py:417:   --> 1:openstack-dashboard-9.0.0-1.el7.noarch
DEBUG util.py:417:   --> python-devel-2.7.5-34.el7.x86_64
DEBUG util.py:417:   --> python-coverage-3.6-0.5.b3.el7.x86_64
DEBUG util.py:417:   --> python-django-nose-1.4.3-1.el7.noarch
DEBUG util.py:417:   --> python2-mistralclient-2.0.0-3.el7.noarch
DEBUG util.py:417:   --> python2-mock-1.3.0-1.el7.noarch
DEBUG util.py:417:   --> python-mox-0.5.3-6.el7.noarch
DEBUG util.py:417:   --> python2-mox3-0.14.0-1.el7.noarch
DEBUG util.py:417:   --> python-nose-1.3.7-7.el7.noarch
DEBUG util.py:417:   --> python-nose-exclude-0.1.9-3.el7.noarch
DEBUG util.py:417:   --> python-openstack-nose-plugin-0.11-4.el7.noarch
DEBUG util.py:417:   --> python2-oslo-sphinx-4.3.0-1.el7.noarch
DEBUG util.py:417:   --> python-pbr-1.8.1-2.el7.noarch
DEBUG util.py:417:   --> python-selenium-2.42.1-3.el7.noarch
DEBUG util.py:417:   --> python-setuptools-0.9.8-4.el7.noarch
DEBUG util.py:417:   --> python-sphinx-1.2.3-4.el7.noarch
DEBUG util.py:417:  Error: No Package found for python-xvfbwrapper
DEBUG util.py:542:  Child return code was: 1
DEBUG util.py:176:  kill orphans

I would think, there is no need for python-xvfbwrapper, since there are no integration tests

Comment 20 Matthias Runge 2016-06-01 12:21:10 UTC
nearly there: OK
nosetests mistraldashboard --nocapture --nologcapture --cover-package=openstack_dashboard --cover-inclusive --all-modules --verbosity=1
Creating test database for alias 'default'...
Destroying test database for alias 'default'...
Running flake8 ...
**WARNING**:
OpenStack hacking is not installed on your host. Its detection will be missed.
Please install or use virtual env if you need OpenStack hacking detection.
./run_tests.sh: line 156: flake8: command not found
Tests failed.
error: Bad exit status from /var/tmp/rpm-tmp.D630qF (%check)
    Bad exit status from /var/tmp/rpm-tmp.D630qF (%check)
RPM build errors:
Child return code was: 1
EXCEPTION: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target noarch --nodeps  /builddir/build/SPECS/openstack-mistral-ui.spec 
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 547, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target noarch --nodeps  /builddir/build/SPECS/openstack-mistral-ui.spec 
LEAVE do --> EXCEPTION RAISED

Comment 22 Matthias Runge 2016-06-01 12:59:32 UTC
Destroying test database for alias 'default'...
Running flake8 ...
**WARNING**:
OpenStack hacking is not installed on your host. Its detection will be missed.
Please install or use virtual env if you need OpenStack hacking detection.
./run_tests.sh: line 156: flake8: command not found
Tests failed.
error: Bad exit status from /var/tmp/rpm-tmp.TvE9a5 (%check)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.TvE9a5 (%check)
Child return code was: 1

Comment 23 Matthias Runge 2016-06-01 14:24:36 UTC
I might have pulled a cached version of your package, this time it worked

https://cbs.centos.org/koji/taskinfo?taskID=94676

Everything else looks good to me


PACKAGE APPROVED


Note You need to log in before you can comment on or make changes to this bug.