Commit Graph

60 Commits

Author SHA1 Message Date
Akihiro Motoki ef1270167b zuul: break down config files into pieces
Our .zuul.yaml is long enough now. Let's split it into meaningful
pieces for better readability.

Change-Id: I53daefd95946d19d8f4f5845f0e83bf652c3a9aa
2020-06-24 17:33:06 +09:00
Andreas Jaeger 7cd0debebe Fix horizon-nodejs10-run jobs
Tox is not anymore pre-installed on the OpenDev CI images.
The file package.json needs tox, install it to fix the job.

Install it via a pre-run playbook so that this is run in addition to all
of the playbooks of the parent.

Change-Id: Icf82fa96f7d90453f78cf564c847682a286ed575
2020-06-19 15:37:06 +02:00
Andreas Jaeger a8ff4c3761 Switch to new javascript jobs
Change I8013228ca05607a69f390a9bb75991fc6543f865 introduces new
javascript jobs that better handle npm or yarn, update the jobs here to
use it.

Change the job names to start with horizon to follow the Zuul job naming
policy.

Depends-On: https://review.opendev.org/727231
Change-Id: I86a56afcd2cde3a088abcc66c0294424cd03546f
2020-05-13 11:28:17 +00:00
Akihiro Motoki a0a85dd176 Fix tempest and pep8 tests
Fix tempest jobs to properly use tempest-horizon as tempest-plugin in
job configuration.

Flake8 3.8.0 fixed a few bugs so that additional issues are marked, fix
these.

Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: I2aca3286ea2cc1ade567087786781952489d6efa
2020-05-12 18:49:34 +02:00
Andreas Jaeger 719c4fb38b Switch to py38 for horizon-non-primary-django-jobs
The template for victoria does not include py37, so switch
horizon-non-primary-django-jobs to use py38 as newest version to avoid
an extra job to run.

Change-Id: I32b10cc726254dde3c10f2df2e392d29c4108d2f
2020-05-04 17:01:46 +02:00
OpenStack Release Bot 65eb9d47ab Add Python3 victoria unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for victoria.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I7101d5e55d357c4028c5221d65d94d60d8f67e80
2020-04-17 21:05:53 +00:00
Akihiro Motoki 7f26bfcbb1 Set tox_constraints_file for npm jobs and integration tests
npm jobs and integration tests always try to use the constraints
from releases.openstack.org and do not pick up the change in the gate
even when Depends-On is specified.

For npm jobs, https://review.opendev.org/#/c/709414/ allows us to pass
tox_constraints_file when creating the envvar of the constraints file.
This commit consumes it.

Change-Id: I396073182ff1e63df12ebb79c3ddd646277ddadf
2020-03-24 17:43:45 +09:00
Akihiro Motoki dd32c9287b Skip integration tests for UT only changes
The integration tests job takes longest time in horizon jobs.
It is worth skipping it for UT only changes (including JS UT).
We already do the similar in the tempest job.

Irrevalent file list for tempest job is also updated
to ignoer JS UT changes.

Change-Id: Ie63e9a9361f2fd7111767864043eb8ad3084a900
2020-03-04 20:32:24 +09:00
Zuul 1c98675ccc Merge "Experimental tests with xstatic reviews" 2020-02-19 13:09:43 +00:00
Zuul 363a4df3ac Merge "zuul: Avoid duplicated job" 2020-01-27 15:03:58 +00:00
Akihiro Motoki decb90bf6e Experimental tests with xstatic reviews
This commit adds experimental jobs to run horizon with the master branches
of xstatic repositories. It allows us to test xstatic packages before
merging/releasing them.

The existing npm jobs do not support sibling installation into the tox
env "npm" which is used by the npm jobs. In a new experimental npm job
with xstatic master repos, sibling installation is now supported.

Note that this change is proposed only to the horizon repo
to avoid sending the similar change to many xstatic repos.

Change-Id: I5fa29c3af9c896561d1738471b7464a2ea81b7a0
2020-01-27 18:14:38 +09:00
Akihiro Motoki a17aa5568a Skip horizon-integration-tests for translation jobs
There is no need to run horizon-integration-tests as we use
the default language, English, in the integration tests and
proposed translation files are validated in the pep8 job.
It reduced the CI resources and waiting time.

Change-Id: I70851622a91280eab99005bf285d8190bfbf8933
2020-01-09 16:26:57 +09:00
Akihiro Motoki 3b7d392d98 zuul: Avoid duplicated job
Currently openstack-tox-py36/37 jobs use Django 2.2.
horizon-non-primary-django-jobs template just runs Django 2.2 test.
These two are duplicated.

To keep the zuul project template (as it is used in horizon plugins),
a job in openstack-python3-ussuri-jobs is specified in the template.
Zuul allows to specify a job in multiple places, so it should work.

Change-Id: I248ac27b60836ce0da473f452ce017542139c671
2020-01-06 21:51:26 +09:00
Akihiro Motoki a2a3e8b6c3 Drop Django 1.11 support
Django 1.11 support was dropped. Django 1.11 ends its extended support
in April 2020 which is before Ussuri release. Considering this,
horizon dropped Django 1.11 support.

Unnecessary Django version checks in the code are also dropped.

Change-Id: I2c58934f2b026745fbc97a58212b91d149db3657
2019-12-29 06:20:37 +09:00
Akihiro Motoki c5dd1536a0 Prepare non-primary Django tests in zuul jobs
We already have a template 'horizon-non-primary-django-jobs'
to test horizon and plugins with non-primary django versions,
but we still need to update tox.ini in all horizon plugins
whenever we change Django versions used.

This commit prepares per-Django environment in the zuul job.

Per-Django tox environments like py3-{dj111,dj20,dj22} are
no longer needed. It would be a big merit that we will no longer
need to update tox.ini in all horizon plugins.

The downside is that we do not provide a convenient way to
test it locally, but I think it can be covered in the document.

Change-Id: I726b19130ee9e7d06eb33231071c2673cfd3a49f
2019-12-29 05:20:33 +09:00
Ivan Kolodyazhny 7f17dcb4dd Remove Python 2.7 jobs
Ussuri release won't support Python 2.7 officially [1] so we can
drop CI jobs to test with Python 2.7.

[1] https://governance.openstack.org/tc/reference/runtimes/ussuri.html

Depends-On: https://review.opendev.org/688997
Change-Id: I650ca71c5a7c922a73f20cdf5ceb02caae464d02
2019-10-24 21:44:39 +00:00
manchandavishal 3012b875af Switch to official Ussuri jobs
Change-Id: I0d823c6f55179bd79e1e15ff50b044dc269b71e7
2019-10-10 16:09:39 +00:00
Akihiro Motoki 02898d1bac Define zuul project-template for django22 job
This commit introduces a new zuul project-template which support
django22 in horizon plugins. By using the project-template,
we can add/change/drop some jobs related to Django versions
without changing all horizon plugin repos.
One possible example is the change of the primary
Django version in upper-constraints.txt.

My plan is to switch the current job defintions in horizon plugins
to the new template when supportnig Django 2.2.

Change-Id: Id0a7b57a19f46c3f1ed87d71ccbb17e0e4301755
2019-09-13 15:15:10 +09:00
Akihiro Motoki 845e35815f Make horizon-openstack-tox-python3-django22 voting
Django 2.2 support patch series lands now.
It is time to make Django 2.2 job voting.

Change-Id: I0cef9af53d178cf87a09eace80affeb047e7ee47
2019-09-11 03:34:05 +00:00
Zuul 83b6a46db8 Merge "Add non-voting job with Python 3 + Django 2.2" 2019-08-11 19:08:51 +00:00
Ivan Kolodyazhny d2ae6b105f Add non-voting job with Python 3 + Django 2.2
Change-Id: I6eb64af5ae1b112195712e07b09e427a541a0089
2019-07-24 12:36:02 +00:00
Ghanshyam Mann 3aac4a257d Define new 'horizon-tempest-plugin-ipv6' job in gate
As part of Train community goal 'Support IPv6-Only Deployments and
Testing'[1], Tempest has defined the base job 'devstack-tempest-ipv6'
(adding in Depends-On patch) which will deploy services on IPv6.

This commit adds the new job 'horizon-tempest-plugin-ipv6'
run on gate which is derived from 'devstack-tempest-ipv6'.

Verification structure will be:
- 'devstack-IPv6' deploy the service on IPv6
- 'devstack-tempest-ipv6' run will verify the IPv6-only setting and
  listen address
- 'horizon-tempest-plugin-ipv6' will run the tests.

Story: #2005477
Task: #35893

Depends-On: https://review.opendev.org/#/c/671231/

[1] https://governance.openstack.org/tc/goals/train/ipv6-support-and-testing.html

Change-Id: I1acdff5f2389ae88872ed198a2b3cee9dc61f705
2019-07-24 10:17:38 +00:00
Ivan Kolodyazhny e17325dd3b Fix quoting in zuul for tempest plugins
Something has changed and the quoting used in the zuul jobs
configuration no longer works. This patch removes the excess
quoting.

Change-Id: I4c6c3b1d0e0c38c8130440c2b6c162fd65532179
2019-06-27 08:45:59 +00:00
ZhongShengping 463da212ce Use zuul template for python3 test runtime
This goal is to implement the process set out in the 2018-10-24 Python
Update Process TC resolution[1], for the Train cycle to ensure unit
testing is in place for all of the Tested Runtimes for Train[2].
Using the Zuul template for Train will ensure that all projects that
support Python3 will be tested against the agreed runtime versions,
and make it easier to update them in future.

[1]https://governance.openstack.org/tc/resolutions/20181024-python-update-process.html
[2]https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I406a4f1ecbff5b6c8e18ff1b93a3b2ceef49343a
2019-05-10 07:24:24 +00:00
OpenDev Sysadmins b30f0b513f OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:37:19 +00:00
manchandavishal cf8f0de639 Drop nodejs4 job
As Migration to bionic is completed or nodejs10 job running.
So we not required nodejs4 job anymore.

Change-Id: I179706cbd53b33f15bdc485168a7eba09fc788e5
2019-04-15 08:43:31 +00:00
Akihiro Motoki 261c2ce60d Add nodejs10 jobs on bionic
Change-Id: Ic20e2e8547856f028e5acc9d6501c95f91578587
2019-03-28 14:07:48 +09:00
Ivan Kolodyazhny 513f9a79e6 Promote non-voting jobs to voting
These jobs are stable enough so we can make them voting:

* horizon-selenium-headless
* horizon-integration-tests
* horizon-tox-bandit-baseline - this job is now voting and configured
  only for 'check' queue.

Change-Id: Ifca858e4c85748d801c412d7e91dce3362f0204f
2019-03-25 20:01:29 +00:00
Zuul 430b218344 Merge "Drop py35 jobs" 2019-03-25 07:34:32 +00:00
Michael Johnson 7fbf2b5c00 Setup project-template for nodejs10 jobs
Monty recently setup a project-template for nodejs4 jobs[1], but
some projects (Octavia for one) want to be bionic/nodejs10 (LTS)
ready.
This patch sets up a template for bionic nodepool instances using
nodejs 10 (LTS).

[1] https://review.openstack.org/#/c/643198

Change-Id: Ibc2c4b5b5207e66700b5c4e04aca3c6a00d392be
2019-03-15 09:56:39 -07:00
Monty Taylor a10d5f18eb Define a project-template for horizon plugins
The horizon plugins all use a set of consistent jobs, but we're
currently copying them in. That means making coordinated updates
is a bit harder. Make a project-template that horizon plugins
can use.

Change-Id: I6ecba7d593268654535aa37ef6ae62baebb58378
2019-03-14 00:26:59 +00:00
Zuul 396ee88ef2 Merge "Switch integration tests to run with python3" 2019-03-06 02:13:11 +00:00
Ivan Kolodyazhny 43f8c3b1f5 Switch integration tests to run with python3
tox env for the integration tests is now renamed to 'integration'
as it is no longer run under python 2.7.

__hash__() method is now defined in integration_tests.helpers.BaseTestCase
to avoid unhashable error during loading django test runner. This is
originally caused by the fact that the base testcase class for integration
tests is implemented on top of testtools and testtools does not define
__hash__() method. In Python 3, __hash__() method must be defined
if a class (re)defines __eq__() method to make the class hashable [1].
Ideally integration base TestCase class can be implemented on top of
Django test case, but the current implementation depends on features
from testtools a lot, so it seems better to add __hash__() method
as a workaround.

Unbound methods don't exist in Python 3[2], so six.create_unbound_method
doesn' work as expected. To dynamic method generation we have to use new
descriptors interface [3] or just generate new
functools.partialmethod [4] function introduced in Python 3.4 to
generate class methods with pre-defined 'path' argument and pass 'self'
as a first function argument for class instance.

[1] https://docs.python.org/3.5/reference/datamodel.html#object.__hash__
[2] https://six.readthedocs.io/#six.create_unbound_method
[3] https://docs.python.org/3/howto/descriptor.html
[4] https://docs.python.org/3/library/functools.html#functools.partialmethod

Change-Id: I5c3078bdc66e33fe676d431bb28d92b35faaf479
2019-03-05 09:10:01 +00:00
manchandavishal 096438b647 Drop py35 jobs
Python 3.5 was the target runtime for the Rocky release. The current
target py3 runtime for Stein is Python 3.6, so there is no reason to
keep testing against the older version as mentioned here[1].

[1] https://governance.openstack.org/tc/reference/runtimes/stein.html

Change-Id: Ib585add30e8b34016a4af18d567a3613aaa74241
2019-02-27 16:32:40 +05:30
Corey Bryant c7568b0ec9 add python 3.7 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.7.

See ML discussion here [1] for context.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html

Change-Id: I9607ff70e24f1fee298e1685c4cc7fbf46800d18
Story: #2004073
Task: #27417
2019-02-15 13:56:39 -05:00
Akihiro Motoki 55a51b2d66 Add horizon-dsvm-tempest-plugin-py27 job
We now support both python 2.7 and python 3 environments,
but bug 1814028 turns out that we cannot detect python2/3 difference
only with unit tests. It sounds reasonable to me to add python 2.7
version of the tempest job. Horizon runs only one devstack job now,
so I believe it is okay to add one more job.

Change-Id: I35fb6c04f67d68109fccd29af332f291b738d9b3
2019-01-31 12:14:39 +00:00
Ivan Kolodyazhny 0c8de3eb4c Add non-voting integration tests job
Thi patch skip integration tests which fails on gates until specified
bug will be resolved.

@decorators.skip_because doesn't work somewhy so I used unittest.skip
instead of it. I'll fix skip_because decorator in a follow up patch.

Related-Bug: #1792028
Change-Id: Ida79b5064c2457afc15db6e63a45478d711e02b5
2019-01-18 19:50:51 +00:00
Akihiro Motoki 72eff9c4fd Migrate horizon-dsvm-tempest-plugin job to python3
Python 3 and python 3.6 classifiers are added
so that DevStack recognizes horizon works with python3.

Change-Id: I2ab0a1a9df9292090f8f14b1591b98d691e16bc4
2018-12-30 07:36:21 +00:00
Andreas Jaeger e8f040d772 Use template for lower-constraints
Small cleanups:

* Use openstack-lower-constraints-jobs template, remove individual
  jobs.
* Sort list of templates

Change-Id: Id9e8f44d7c4d352682ca4df80f9470c7e6144509
Needed-By: https://review.openstack.org/623229
2018-12-20 21:01:04 +01:00
Nguyen Hai bfecbde4dc switch documentation job to new PTI
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs as part of the
python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I35b3967f8fe3423bea698284078bdb07f4a1b814
Story: #2002586
Task: #24299
2018-08-27 08:24:21 +00:00
Nguyen Hai d698f2bc1e import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I1378696509f727d5b6feda01fee71b32f6488824
Story: #2002586
Task: #24299
2018-08-21 16:49:39 +09:00
Akihiro Motoki 9de78764c7 add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I1eb66546d9f62816e4819ce0fc6eabed0a6a514d
Story: #2002586
Task: #24299
2018-08-14 22:09:24 +00:00
Akihiro Motoki 889f05f51d Drop horizon-openstack-tox-py35dj20 from .zuul.yaml
horizon-openstack-tox-py35dj20 is now not used by any horizon plugins.
We can drop horizon-openstack-tox-py35dj20 job now :)

Change-Id: I9c309d260c554101167fbd3bea27b0f799fa2e9a
2018-07-18 16:54:45 +09:00
Ivan Kolodyazhny fe4a1f4051 Add Bandit non-voting job
This commit adds two new tox environments for bandit scanner. To run any
of them you can use tox commands:

1) 'tox -e bandit' to run bandit scanner against all the code
2) 'tox -e bandit-baseline' to run bandit scanner only against the last
commit or the current changes.

Bandit job uses 'bandit-baseline' tox environment to veryfy that no new
issues were introduced.

Change-Id: I1fc3bb0d5d151f215b9efc916f921fabaa72e7d8
2018-06-22 13:11:43 +03:00
Ivan Kolodyazhny ee95bf15d9 Fix selenuim-headless tests
This patch leave selenuim-headless non-voting since it was broken for a
while so we should be sure that it's stable enough.

Related blueprint: improve-horizon-testing
Change-Id: Ic2a877a4eefc2f10fb25e64c387b81fc18302a2a
2018-06-08 12:22:10 +00:00
Ivan Kolodyazhny 1f80d94459 Use default Django test runner instead of nose
Nose has been in maintenance mode for the past several years. It has
issue with exit code [1] which leads to false positive results for our
seleniun-headless job.

This patch changes test runner for Horizon tests and does the following
things:

* Django test runner  executes test in a different order than Nose does.
  That's why we've got an issue with side-effect in
  horizon.tests.unit.tables.test_tables.MyToggleAction class. This patch
  adds workaround to it.
* Rename filename of test files to names starting with 'test_'
  so that the django test runner can find tests expectedly.
* '--with-html-output' option is temporary dropped and will be added in
  a following patch.
* Integraion tests is marked via django.test.tag mechanism which is
  introduced in Django 1.10
* 'selenium-headless' is broken now because we don't have geckodriver on
  gates, this patch makes it non-voting.
* 'tox -e cover' is fixed
* Remove @memorized decorator from
  dashboards.project.images.images.tables.filter_tenant_ids function.

[1] https://github.com/nose-devs/nose/issues/984

Depends-On: https://review.openstack.org/572095
Depends-On: https://review.openstack.org/572124
Depends-On: https://review.openstack.org/572390
Depends-On: https://review.openstack.org/572391

Related blueprint: improve-horizon-testing
Change-Id: I7fb2fd7dd40f301ea822154b9809a9a07610c507
2018-06-08 15:21:12 +03:00
Akihiro Motoki 0bc2f1b015 Add python3 django 1.11 job instead of django 2.0 job
Django 2.0 is now used in tox py35 job, so there is no need for
py35dj20 job. Instead, Django 1.11 with python3 is not covered.

- py35dj20 job is dropped from tox.ini.
- python3-django111 is added to tox.ini.
  python3 is specified to basepython to avoid a specific python version.
- Zuul job to consume python3-django111 is added.

Note that horizon-openstack-tox-py35dj20 cannot be dropped
because this job is used by horizon plugins.

Change-Id: Ic3b5e06d591a6f1d667993d19dcddfaf40882dee
2018-06-08 14:30:05 +09:00
Doug Hellmann fdd3c8b462 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

---

horizon specific change:
* Django minimum version is bumped to >=1.11 as horizon rocky
  dropped Django 1.8-1.10 support.
* django-babel needs to be bumped to 0.6.2 to support Django 2.0
  8762ff5dc0
* nose-exclude needs to be bumped to 0.5.0 to run horizon unit tests
  properly. According to my test, 0.4.0 also works but this is
  a testing dependency, so we don't need to care multiple versions much.
  Otherwise only one test is run for openstack_dashboard unit tests.

https://review.openstack.org/555402 allows us to bump lower requirements.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I73c3e4531c57d015f6016ca00b056a6fd0d8fc1a
Depends-On: https://review.openstack.org/555034
Depends-On: https://review.openstack.org/555402
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
2018-03-26 04:44:42 +09:00
Akihiro Motoki a72963bdbd Drop Django <= 1.10 support
After Django 2.0 support, we no longer supports Django 1.10 or older
(Actually Django 1.10 seems to work though).
The current django.VERSION branches are all related to Django 1.10
or older, so we can drop all conditions.

py35dj20 job is now voting.

blueprint django2-support
Change-Id: Iefc0ab1c62c82f2842ec7761a9b981da9351cbd2
2018-03-03 07:33:23 +09:00
Akihiro Motoki 76fa01b7de Drop old django tests
django 1.8 to 1.10 are incompatible with django 2.0.
We only supports Django >= 1.11 in Rocky and UTs with
Django <= 1.10 are no longer needed.

Conditions using django.VERSION will be dropped in a later patch
only because moving them to this patch causes many merge conflicts.

blueprint django2-support
Change-Id: I0611297e70d8e58d53e94635b0b7175d94df195b
2018-02-17 00:23:28 +09:00