Commit Graph

179 Commits

Author SHA1 Message Date
Takashi Kajinami e10099bd80 Bump hacking
hacking 4.0.x is very old (it was released 3 years ago).

Change-Id: Id931b3a0110af7d6eb6dc11df5f3b0bbaad67b5e
2024-01-17 01:29:01 +09:00
melanie witt 2316f95a49 Add 'cryptography' package to test-requirements.txt
When running the functional tests locally:

  tox -efunctional

the following error is raised from 6 tests in the
placement.tests.functional.db.test_migrations module:

  RuntimeError: 'cryptography' package is required for sha256_password
  or caching_sha2_password auth methods

This adds the 'cryptography' package to the list of required packages
for tests.

Story: 2008832
Task: 42317

Change-Id: I78fbdd723be089364b8ee61432eeb74ed6f24094
2021-04-21 01:08:38 +00:00
Ghanshyam Mann fa95ef8772 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Ia7365cc3ae09e2ff916ab9f9ff0ba4fef0dc446b
2021-01-15 20:34:51 +00:00
Ghanshyam Mann a0acd21937 Fix l-c job and move to latest hacking 4.0.0
There are few failure in l-c jobs due to

- The conflict is caused by:
    The user requested pyflakes>=2.1.1
    hacking 0.12.0 depends on pyflakes==0.8.1

- The conflict is caused by:
    The user requested requests>=2.14.2
    keystonemiddleware 4.18.0 depends on requests>=2.14.2
    oslo-config 6.7.0 depends on requests>=2.18.0

Remove the flake8 and pyflake from lower constraints as they are
maintained in hacking side[1]. Maintaining in hacking aas well as
in project side can lead to version conflict. Also few more deps
from l-c as they are not used in placement directly.

Update requests version to 2.25 to fix the http connection failure with
2.18
- https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_dff/766994/6/check/openstack-tox-lower-constraints/dff1943/testr_results.html

This commits also moves the code to latest hacking 4.0.0 with W504 in
ignore list and fix W503 and other checks.

[1] 4069b0c4f5/lower-constraints.txt (L9)

Change-Id: Id2761300060597c1744e76ea77740ed380d98943
2020-12-15 10:21:18 -06:00
Ghanshyam Mann 0a1d21ff47 [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1885825
Fix user creation with GRANT in MySQL 8.0(Ubuntu Focal)
Ubuntu Focal (20.04) has mysql 8.0 and with mysql 8.0 there
is no implicit user creation with GRANT. We need to
create the user first before using GRANT command.

- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.

- bug#1886296
pyflake issue and some pep8 fixes.

Story: #2007865
Task: #40209

Related-Bug: #1885825
Related-Bug: #1886298

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal

Change-Id: Iac9652b0d36ef208075da506957cc87f22912c45
2020-08-16 21:07:26 +00:00
Sean McGinnis e164881bd5 Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I1cffb9710f9e6b9b8b1f5e658d5af8668f3fca4c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-30 12:01:27 -05:00
Tetsuro Nakamura 4e58f8a56b Add check-requirements to project template
This patch adds a job to check the requirements in the gate.
To pass the test, this patch includes several fixes:

* Revert following commits:
    - https://review.opendev.org/#/c/671249
      (baaaff17b5)
* Add missing packages in lower-constraints.txt
    - osprofiler
    - setuptools
* Adjust psycopg2 version in test-requirements.txt
  to that in lower-constraints.txt.
  This has been bumped in:
    - https://review.opendev.org/#/c/614559/.
      (4469a813cb)

Change-Id: Ib9942a8310a74bf48a2b05a78a4971cba87d7689
Depends-On: https://review.opendev.org/#/c/698960
Story: #2007023
Task: #37813
2019-12-08 18:51:53 +00:00
Chris Dent baaaff17b5 Make placement testing easier on osx
Placement can run just fine on OSX but running the tests can
be a bit cumbersome since dev libraries for ssl, postresql,
and mysql are required (directly or indirectly) by
test-requirements.txt, even though for non-gate testing we don't
usually need them, and dealing with dynamic libraries is a
frequent source of pain and discomfort on OSX.

This change says "don't import SQL drivers for mysql and postgresql
when testing on darwin".

Change-Id: Ic0ff55f00e0312251207fd079cf7b7e98d950c87
2019-07-17 13:24:44 +01:00
Balazs Gibizer 6637800604 Add OsProfiler config options to generated reference
OsProfiler is optional, but if it's installed we'll load up the configuration
options from the library, but they weren't in the generated config sample so
people would have to find the osprofiler docs, or worse the code, to figure
out how to configure it.

This simply adds the OsProfiler config options to the config sample, which
will also show up in the config reference docs.

Change-Id: I9a379e0e60ae8eb53280b8296229d2f0412eae4a
Story: 2005842
Task: 34191
2019-06-27 09:37:56 +02:00
Chris Dent 4469a813cb Correct lower-constraints.txt and the related tox job
While exploring removing unused packages from lower-constraints.txt it
became clear that the lower-constraints job was not working as expected:
Because our tox config has usedevelop=True 'setup.py develop' is called
to install the placement package after the install command is called.
This means that the lower-constraints are clobbered.

I had mistakenly assumed that turning off 'usedevelop', which causes
'setup.py install' would not make any difference, because it usually
installs dependencies too. It turns out however, that when using pbr
and within a git working dir, it does not. That took some time to
figure out. Oh well.

This change makes it so that we create the tox environment using
usedevelop=False and with our own install_command, to avoid upper
constraints conflicting with lower constraints.

This flagged up a few changes, the main one being that we did not have
a new enough version of keystonemiddleware in order to require use of
www_authenticate_uri. requirements.txt is updated for this as well.

And PasteDeploy needed to be updated to work with Python 3's notion
of namespace packages.

psycopg2 need a newer version to work with Postgresql 10.

oslotest needs to be raised to 3.4.0 because the tests in
cmd.test_manage use features to control what is capture by the Output
fixture from oslotest. Note that the lower-constraints job found
this problem and also demonstrates why we must run the lower-constraints
job without upper-constraints being involved. upper-constraints will
"win" and we don't want that. The point of the job is find packages
where lower-constraints are wrong, so it must "win".

The end result here is a lower-constraints.txt file that starts from
the lower-constraints.txt defined by nova, and then is adapted to
update the versions of packages that were not up to date, remove
those packages which are no longer present, and add some that are
now required.

Change-Id: Id66a28f7ace6fc2adf0e1201d9de5f901234d870
2018-11-27 17:41:02 +00:00
Chris Dent 07bdda6148 Update requirements and test-requirements
With placement off by itself, the number of python packages required to
make things go shrinks.

This is the set of modules that are imported directly. There are plenty
of transitive dependencies not listed here.

test-requirements.txt also lists some of the optional things (database
drivers) that come up in devstack-based testing situations.

Change-Id: I3eb6aead544d1ef647ad8d94a18382d5fa795aa4
2018-09-05 21:30:42 +01:00
Matt Riedemann 6786f8ab6d Cleanup ugly stub in TestLocalDeleteAllocations
With a fix in wsgi-intercept 1.7.0 we can properly
use the PlacementFixture as a context manager to
simulate when placement is configured for a given
operation. This allows us to remove the ugly stub
that one of the tests in here had to rely on.

While in here, the CastAsCall fixture is removed
since we shouldn't rely on that in these tests
where we're trying to simulate the user experience.

Change-Id: I2074b45126b839ea6307a8740364393e9dddd50b
2018-05-16 09:23:55 -04:00
OpenStack Proposal Bot 3e6f146db7 Updated from global requirements
Change-Id: I004b8ea8fd3a8de76c04f70af5ed5e516aa2bfbc
2018-03-23 07:40:46 +00:00
Stephen Finucane 7b01024591 Follow the new PTI for document build
The Project Testing Interface [1] asks that we list requirements in
'doc/requirements.txt' and build docs by calling 'sphinx-build' directly
instead of via the 'build_sphinx' setuptool/distutils wrapper. Start
doing this.

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

Change-Id: If9342c8ea757b1735f2488db751008984fb33baf
2018-03-16 14:39:36 +00:00
OpenStack Proposal Bot 26c35b4bc4 Updated from global requirements
Change-Id: I518860c51e6b19def5efc3f624dceb9350cb9494
2018-03-16 07:34:06 +00:00
OpenStack Proposal Bot a7160814fb Updated from global requirements
Change-Id: Iff8f99d4ff97f03ccdeb29405f3cbb853068161d
2018-03-13 07:09:16 +00:00
OpenStack Proposal Bot e847206a81 Updated from global requirements
Change-Id: Ibe70f1f60180a7c8da9887e4466dd1e1d25b157f
2018-03-10 13:31:01 +00:00
OpenStack Proposal Bot 6d27782eef Updated from global requirements
Change-Id: I371ee0cb4156ec4e0a20f55852b0756502d0dd90
2018-01-29 00:21:52 +00:00
Zuul ed5cb33be9 Merge "Updated from global requirements" 2018-01-27 15:29:24 +00:00
Zuul c4aedef4f8 Merge "add whereto for testing redirect rules" 2018-01-25 06:48:57 +00:00
OpenStack Proposal Bot 959b1ed11a Updated from global requirements
Change-Id: I1fae25690551ff75a9838e760851a990e216be72
2018-01-24 01:14:00 +00:00
OpenStack Proposal Bot f52e0a94ff Updated from global requirements
Change-Id: I1c1dc245f98cb5c3b57733ddc338394dfb3bc0b6
2018-01-18 03:11:57 +00:00
OpenStack Proposal Bot 050d82123c Updated from global requirements
Change-Id: Icada15d601dc5399eeb927bb7cba9bea828883da
2018-01-16 12:40:17 +00:00
Matthew Treinish bc3d836f30 Finish stestr migration
Nova switched to using stestr for all it's in tree testing except for
the coverage job. This commit updates that job so it also uses stestr
and cleans up the last bits of testr setup left in tree. As part of
this change this moves all the one off per job configuration into the
tox job definitions instead of hiding it in either the .stestr.conf or
in a wrapper script.

Change-Id: I36e0e791d485b44641a1ed8770eca8e95aca19be
2017-11-24 16:51:12 -05:00
OpenStack Proposal Bot 70adc7400b Updated from global requirements
Change-Id: I2ddeb4baef5e535923a8e16ef763782595df614d
2017-11-16 11:16:21 +00:00
Doug Hellmann a0fdb75eb8 add whereto for testing redirect rules
Use whereto to test that the redirect rules do what we expect. The
test coverage is a bit minimal for now, but should be useful as an
example of how it can be extended. The test files in the
openstack-manuals repo provide some other examples.

Depends-On: I36003d3525dcc9fef8e5f008ecabb2b2ac78088e
Change-Id: Ia14bfa6c89fd04844842d727d11ff8874ec7fc2a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-30 12:37:23 -04:00
Jenkins 0beb201b2d Merge "cleanup test-requirements" 2017-09-26 17:44:17 +00:00
Eric Fried 41f86214a2 Live Migration sequence diagram
Based on mriedem's hand-drawn version [1] (but not as pretty).

[1] https://photos.google.com/share/AF1QipNpWVQKU8GK4_9wxVbiRJUqJnMzqPcBh6DvjVyBPIjjmi6ZU8r9TleQNo6pV1t9SA?key=NUl3OUFGYkRFTE8tMHhSX0lfc0Y1eEdoeHo4SUhn

Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>

Change-Id: I63046079cd3135b4b19c0c6745075f090d04e396
2017-09-25 16:19:44 +00:00
caoyuan 7e01b7f487 cleanup test-requirements
python-subunit is not used directly anywhere
and it is dependency of both testrepository
and os-testr
(probably was used by some tox wrapper script before)

Change-Id: Ic2139ceb5a200c3b32bcc87e81fc30f208645771
2017-09-25 19:29:20 +08:00
OpenStack Proposal Bot 593db94861 Updated from global requirements
Change-Id: I10ea32764a04cfe0dd8445708f04bcd184c0d308
2017-09-16 23:18:37 +00:00
OpenStack Proposal Bot 96180c0080 Updated from global requirements
Change-Id: I043babceb3b1be03550c8e90c9abb9450d5f5cde
2017-09-13 12:57:19 +00:00
OpenStack Proposal Bot ff568a8c18 Updated from global requirements
Change-Id: I197925602a5b76cad961cc3cb2eebb67c0ea82bf
2017-08-30 23:26:21 +00:00
Stephen Finucane 3b52049378 docs: Document the scheduler workflow
There have been some major changes to how scheduling works in Nova
during the Pike and Queens cycles. This documents these design changes
so that this new, more complex workflow is clearly spelled out.

Co-Authored-By: Ed Leafe <ed@leafe.com>

Change-Id: I15121d8fe9b715c0aec39dee4bfdf25ced42b481
2017-08-24 15:18:11 +00:00
OpenStack Proposal Bot 2cba718b99 Updated from global requirements
Change-Id: Idda59f3cf870479b5ca6ea3ab4516306d8e0075d
2017-08-18 15:53:20 +00:00
OpenStack Proposal Bot 422dba29ee Updated from global requirements
Change-Id: I96e70a950ed04862d512f91211c4cb6fc3fd1159
2017-08-07 00:49:24 +00:00
OpenStack Proposal Bot 68484016e5 Updated from global requirements
Change-Id: I35689a80f0a36779a32e8c49b0950daff306ea45
2017-07-29 02:37:27 +00:00
OpenStack Proposal Bot 8791440e57 Updated from global requirements
Change-Id: I812b4b9c7b05ab032f436e81d6e10b5a0f6598c1
2017-07-28 16:31:04 +00:00
chenxing 10bf786c3e doc: Switch to openstackdocstheme
Change-Id: If7afc2cb58759b16fc6f7caa44d0cf6b7bcf4d06
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
2017-07-21 11:35:48 +01:00
Chris Dent 8460d38c9c [placement] Update allocation-candidates.yaml for gabbi 1.35
Gabbi 1.35 provides template variable susbtitution on the left hand side
of a JSONPath expression. That's used here to remove the need for static
fake uuids in the test data for allocation-candidates and the
SharedStorageFixture.

A couple of other clean ups to the use of gabbi, unrelated to the 1.35
update:

* It's possible to test the entire value in one response:

    resources:
         VCPU: 4
         DISK_GB: 5

  instead of:

    resources.VCPU: 4
    resources.DISK_GB: 5

  This is handy when the root of the expression is calculated and
  repeating that calculation is noisy.

* [?foo.bar=baz] is the more canonical form of [?(@.foo.bar=baz)]. The
  former is built into jsonpath, the latter dips into the underlying
  implementation.

Change-Id: Ie6b5e0186533581815d04411ed7b321948464bb6
2017-07-17 13:04:48 +00:00
OpenStack Proposal Bot ddb3990a9f Updated from global requirements
Change-Id: Ib9135d0d73d3ec508455c3a703fe7c1c2208d250
2017-07-13 19:36:14 +00:00
OpenStack Proposal Bot debc749a4e Updated from global requirements
Change-Id: I5373e0dbd746211cda9aa8a5162daab823fd8221
2017-06-27 12:16:50 +00:00
OpenStack Proposal Bot 3c9b787007 Updated from global requirements
Change-Id: I0159683fbd67ae11e745ed4f739f77fd5fa63141
2017-06-03 13:10:15 +00:00
OpenStack Proposal Bot 86f0f22f78 Updated from global requirements
Change-Id: I9367dd73194ebc3b2501aabfd2eab535e6e02101
2017-05-17 13:45:31 +00:00
OpenStack Proposal Bot ba778bc50e Updated from global requirements
Change-Id: If0738d04f132fa12413f4b5aa64ddb1b901f5ed7
2017-05-15 00:50:30 +00:00
OpenStack Proposal Bot 1cf5323459 Updated from global requirements
Change-Id: Iee9790e4b86cc74c14fdc99c4a9a6f294898e86d
2017-05-03 12:19:07 +00:00
Jenkins 324d74a19b Merge "remove flake8-import-order for test requirements" 2017-03-21 17:55:02 +00:00
Jenkins 419b2b0cfa Merge "More usage of ostestr and cleanup an unused dependency" 2017-03-20 16:04:47 +00:00
Sean Mooney 31f8bf4404 remove flake8-import-order for test requirements
- When flake8-import-order is installed the additional
  ordering tests it provides are enabled by default.
- When devstack installs python projects from source
  such as nova, the pip_install function installs both the
  requirements.txt and test-requiremets.txt dependencies systemwide.
  As a result, any python project that runs pep8 tests without a
  python virtual environment will also have import ordering enforced
  which may fail.
- This change removes flake8-import-order from the
  test-requirements.txt to prevent failures in projects other
  than nova that don't enforce pep8 import ordering.

Change-Id: I994df178f0000a0840f6658ccc2f277d5503f826
2017-03-16 17:36:54 +00:00
John L. Villalovos 146023efc4 Use flake8-import-order
Use the flake8 plugin flake8-import-order to check import ordering. It
can do it automatically and don't need reviewers to check it.

Change-Id: Ia3d81bbbb44b40804b3268c0e648276a36cb4805
2017-03-06 06:50:23 -08:00
Luigi Toscano dd2a611ee2 More usage of ostestr and cleanup an unused dependency
Use ostestr as runner instead of the custome pretty_tox.sh script
(pretty much removed everywhere). pretty_tox3.sh is just a wrapper
for ostestr but it could be probably removed as well going forward.
Also remove the tempest-lib dependency, which originally provided
subunit-trace (now from os-testr).

Change-Id: I4390964ce83167d634b80f696e82a0e199582ce6
2017-02-23 18:25:08 +01:00