H306: import in alphabeical order
Imports should be grouped in the following order:
standard library imports
related third party imports
local application/library specific imports
put a blank line between each group of imports.
https://docs.openstack.org/hacking/latest/user/hacking.html#imports
Change-Id: I2c188d27f0595ac3b2d71f4612d93829915e389c
1. Remove basepython from testenv
2. this change also fix unittests because stevedore has dropped pkg_resources[0],
after tox upgraded to 4.0.*, tox with usedevelop parameter installs trove in
develop mode, hence stevedore unable to get the entrypoints from sdist[1].
[0]: d5297167e0
[1]: https://tox.wiki/en/2.8.1/config.html#confval-usedevelop=BOOL
Change-Id: Ie65d099509e3cb7a61a09d975c58c1e95aa12b51
1. app.wsgi is a python script and should be end with py extension.
2. Generate trove-wsgi script which is needed by kolla to support
https and ipv6.
3. Ignore build directory in git
4. update docs
Change-Id: Ibbd6ecb8db25aa3a443d3f526f4cf6d418eb26f3
We facing errors related to the new pip resolver, this
topic was discussed on the ML and QA team proposed to
to test lower-constraints [1].
I propose to drop this test because the complexity and recurring pain needed
to maintain that now exceeds the benefits provided by this mechanismes.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html
Change-Id: I7261114a545c8c016f96ecf20e3fcdc00c3bab99
Config reference has been dropped for some reason several releases before.
We return configuration reference along with policy to the docs.
Change-Id: I0927466d18eca5572932fcf9e2ca6349b11ca847
Significant changes:
* Using docker image to install datastore.
* Datastore image is common to different datastores.
* Using backup docker image to do backup and restore.
* Support MariaDB replication
* Set most of the functional jobs as non-voting as nested
virtualization is not supported in CI.
Change-Id: Ia9c97a63a961eebc336b70d28dc77638144c1834
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Update local hacking checks for new flake8.
Remove hacking and friends from lower-constraints, they are not
needed in installations.
Change-Id: I6e6638c07b5d24c90e9deae277e98149f383eb3d
Setup.cfg:
- This repo is python 3 only ,remove universal wheel building.
- Remove pbr.hooks.setup_hook, those are obsolete since a long time
tox.ini:
- remove tox:jenkins, this is not used since ages
Change-Id: Ia6c1bc28b4935859c29924141965f47c4bcbd2c3
- 'HEALTHY' means the db service is responsive, 'ACTIVE' means the db
service is alive.
- Remove the CI job fakemodetests, but will add similar testing task in
the future.
- Fix the periodic CI job
- Remove MongoDB and related jobs
Change-Id: I5abe9091ba203297dc87db5fba139179166321f7
- The job relies on python-troveclient, sometimes python-troveclient
only changes the URL sending to Trove but neither request nor
response.
- The job is hard to maintain, especially when there are changes
relating the API. The recommended way is to manually update the API
doc and add tests in trove-tox-fakemodetests job.
- Remove that trovestack subcommand as well.
Change-Id: I108203915ef79ef93bbfbb15acdb7480854878e0
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].
In practice, this generally means adding unit tests for Python 3.7 and dropping
unit tests for Python 3.5. 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: I018f79c6819ead9ffee777addb7ba6b369304962
Depends-On: https://review.opendev.org/#/c/641878/
The commands used by constraints need at least tox 2.0. Update to
reflect reality, which should help with local running of constraints
targets.
Change-Id: Ifc2c2ad88d77fb2590b5bb598458bdfd4a423a9e
Functional tests are executed by trovestack script, which uses python
in default OS version which is 2.7.
This change wraps python in tox and executes trovestack int_tests in
virtual enviroment, starting them in python3.
Any future python version change could be managed by tox framework.
Change-Id: I3a849978241d3d0669ef9e1c802ff504ac3c32cb
Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
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: I2b04e865fb72296f672ab206fcda15e30450db97
The job is currently broken, it runs with testr while
we switched to stestr. Use the usual setup for coverage as done by
other projects using stestr in cover.
Previously, we run with concurrency=1 - continue to run in serial mode.
Change-Id: I6e389db5aed8db25b49906b2479af081237fc909
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
Also, add docs tox environment so that the job works.
Change-Id: I8dd911d46623c0185d238b293e0218cfa435ed46
Story: #2002586
Task: #24342
Having the pylint environment run redundant commands just makes the
job take longer.
Change-Id: Ibb86b40e589d1b6f9c3af5901549d7aa5170e8c8
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I9ee34642c700d1e6ba9c2f3891b7fa1f7f7e1e1d
Depends-On: I8989fd4798e80eae27408017e1543819a68b4ab1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
This patchset changes version of python-troveclient package version
used in tests.
So far, version from global constrain file was used [1].
In order to achive this, a local constrain file for tests requirements
has been added. This made it possible to override global constrain
versions.
[1] openstack/requirements/upper-constraints.txt
Change-Id: Ic4383f0249e5bd367461f63f66217af959aefba4
Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
This patch migrates the legacy gate jobs to Zuul v3 native ones(a new
trove-devstack role is created for all those legecy jobs, and the
previous way of running gate jobs is still kept as we still cannot
migrate the genade job to a Zuul v3 native one), following the
documents below:
https://docs.openstack.org/infra/manual/zuulv3.htmlhttps://docs.openstack.org/devstack/latest/zuul_ci_jobs_migration.html
Change-Id: I10a1adae3a79b7322118fce180119f0ee5ff2e1b
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
We have migrated to stestr for a while, however the related requirements
is not updated, this patch does the cleanup, also updates requirements
for stestr.
Change-Id: I9c8cf2f90ced2261293f91faefc3099740540fe7
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
The low-constraints job should run unittests by the original desgin, we
didn't put the commands about running unittests inside the default
testenv settings, so in fact the low-constraints job did nothing except
creating a virtualenv.
This patch fixes and also move the unittests commands to the default
testenv settings like the other OpenStack projects.
Change-Id: Ia344a14a9baf7574b043fc08332869083da6dc1e
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
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.
Change-Id: I5352398603e5755d46c9c033b05af637e379eea0
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* Tests for _write_file_as_root failed because tempfile.NamedTemporaryFile
use binary mode by default, changing to text mode fixes.
* Migrate to olso_serialization.base64 for Base64Codec. Also change the
return value from bytearray to bytes for Base64Codec.deserialize.
Base64Codec supports reverse encoding(i.e. binary data will be written
to the dest file), in this situation, the dest file should be opened
with binary mode(and when reading from the file, binary mode should
also be used).
* stream_codecs.StringConverter converts iterable objects with map
function. The behavior of map function is different under Python 2.x
and 3.x. However csv.writerows(before Python 3.5) and unpack_singleton in
trove.common.utils both need a list object. Converting the return
value of map function to a list explicitly before passing to these
functions fixes.
guestagent.test_operating_system is the last blacklist regex pattern for
py3 unittests. With the above problems fixed, blacklist-py3.txt is not
needed any more, and tox.ini is also updateted.
Migrating from ostestr to stestr is also done while updating tox.ini.
Here is the ML post for more information about os-testr and stestr:
http://lists.openstack.org/pipermail/openstack-dev/2017-September/122135.html
Partially implements: blueprint trove-python3
Change-Id: I31f1f97901d6ebff8a91c1b70a343e724ab806eb
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
A new entrypoint in setup.cfg and a config file are added for
using olso.policy helper script to generate the sample file.
A new tox target also is added to simplify the environment
setting up. Now policy sample file can be generated
automatically, so the in-repo sample file is no longer needed.
Co-Authored-By: Andrew Laski <andrew@lascii.com>
Partial-Implements: blueprint policy-in-code
Change-Id: Ic336fa154ccc05b5e9db3a8e751a484b1cc5aa9c
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
As bandit-baseline check just call tox to run tests, adding it to
in-tree checks instead of gate jobs.
Closes-Bug: #1618549
Change-Id: If6848c69e09117789d566ae47977034d5503fa09
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
This patch adds a doc8 check of .rst files to the current pep8 check.
It includes fixes to the .rst files that didn't pass the check.
Change-Id: I866ee72cfdd6067ae219a751aa7c2a0c391886f7
Replace basestring with six.string_types and add a hacking rule
to check it. This modification refers to neutron and merge
translation_checks into checks .Follow-up will modify the other
on the python3 common
Change-Id: I66d58ecaf664705660bbeb85058ad3cd092ef82f
reference:https://github.com/openstack/neutron/tree/master/neutron/hacking