Commit Graph

132 Commits

Author SHA1 Message Date
Zuul d719543b2e Merge "Add name param for start_tls_proxy funtion" 2023-05-19 07:56:14 +00:00
Takashi Kajinami 82885e6229 Adapt to tox4
This fixes the several problems/errors caused by tox 4.

Change-Id: Id945689ba20b33988ef86c920b75cafdeffa4ab6
2023-03-21 01:46:04 +09:00
LeopardMa c943f4a510 Update python testing as per zed cycle testing runtime
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Removing the py36 centos8 job as well as
updating the python classifier also to reflect the same.

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

Change-Id: I9b5f826863fd913241cb803ef479b890f74fbb6c
2022-07-01 00:46:42 +00:00
zhangbailin b3a20e5f02 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], dropping
the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I7351b45dff2754b07ab6f0f8a72263f64307e8b4
2022-06-29 15:33:55 +08:00
songwenping d7c7217b22 Add name param for start_tls_proxy funtion
Change-Id: Id3f005dc63e0785df2a4cdf2fccd8585ece11d15
2022-04-22 07:20:16 +00:00
Zuul 3209783d95 Merge "Changed minversion in tox to 3.18.0" 2022-04-15 21:04:39 +00:00
Elod Illes e0136189fc Preinstall requirements for docs build
Sphinx installs the package with its dependencies, but it does not use
the constraints. This can lead to errors if a dependency introduces any
backward incompatible changes. To avoid this the dependencies needs to
be installed prior to sphinx run by tox with the correct constraints.

Change-Id: I4ba83f1007dd11801b8e32c6d7566769e005480b
2021-07-30 19:44:18 +02:00
wu.shiming 90ee0c6dc4 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I3c8d1277a563c557efdb4fae8776fb03cd41e67b
2021-07-06 16:17:15 +08:00
Zuul f186115958 Merge "Replace deprecated UPPER_CONSTRAINTS_FILE variable" 2021-01-28 23:20:45 +00:00
Luigi Toscano f576d092b7 Fix lower requirements: bump various packages
= six (and tox): the latest versions of tox (which are
compatible with newer virtualenv[1][2]) require a newer six.

[1] https://tox.readthedocs.io/en/latest/changelog.html#v3-14-4-2020-02-13
[2] https://github.com/tox-dev/tox/pull/1519

= alembic: A newer version is required by oslo-db 6.0.0.

= oslo.service: 1.24.0 (and before 1.31.0) capped eventlet to <0.21.0,
but eventlet>0.26.0 is now required.

= cryptography: paramiko 2.7.1 requires cryptography>=2.5.0

= oslo-messaging: bumped to 10.2.0

= greenlet: bumped to 0.4.16 to be compatible with py3.9

= warlock, amqp, pycodestyle: just drop those indirect dependencies
from l-c (and in fact pycodestyle is only a dependency of a linter
for testing).

Change-Id: I26bd73463a5da9ef947f287610b0a33b73062417
2021-01-27 19:41:26 +01:00
wuchunyang bd46fc6de3 Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is old name and deprecated
-https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: I38e7d938409e8e30c5ec36530dd2dc54c5f696e0
2020-11-27 09:20:26 +00:00
Sean McGinnis f74ffabb99
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I624c352b93e1bf5d8edea2db0feb7710e5b5e984
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:26:00 -05:00
Andreas Jaeger 36d8b35478 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Update local hacking checks for new flake8.

Note: The repo has been using an uncapped requirements, so was testing with
hacking 2.0 which disabled the old way of local testing integration.

Remove S367 and S368 since they are not working under python3
"NOTE(Kezar): This checks a good enough if we have only py2.7 supported.
 As soon as we'll get py3.x we need to drop it or rewrite. You can read more
 about it in dev-list archive, topic: "[hacking]proposed rules drop for 1.0"

Also, hacking now has H304 and H306 which test exactly the same.

Change-Id: I0b21554a5f9a69ed631b18c427b80c082011f774
2020-04-22 15:45:44 +02:00
Ghanshyam Mann 17c3249a27 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

sahara is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Other required Sahara changes:
- port the image building job to CentOS 8, and thus Python 3.

Depends-On: https://review.opendev.org/#/c/693631/
Depends-On: https://review.opendev.org/#/c/694699/
Change-Id: I30485a9933d38db76c031c6e760598c4e47123fc
2020-01-14 18:38:26 +01:00
pengyuesheng d97fa76978 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: Ifaa39f5d615b516ed198d60cf20266f2b6ed5f74
2019-09-23 17:03:16 +08:00
Corey Bryant 0c19fc2651 Limit envlist to py37 for Python 3 Train goal
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train. The correct zuul jobs are
already in place so this change just limits default 'tox' calls to py37
to save developers time.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I1d2cbec2b2f15ca1c6942947f369cf7192993a2d
Story: #2005924
Task: #34244
2019-07-15 13:30:29 -04:00
Zuul 172d01f14e Merge "Update Python 3 test runtimes for Train" 2019-06-25 17:25:15 +00:00
Luigi Toscano c5aafbc3ed Fix requirements (bandit, sphinx, jsonschema) and jobs
Requirements:
- bandit 1.6.0 contains a regression in the handling of patterns.
  A fix is in place in bandit master, but newer versions introduces
  more checks so they are not working as well.
  The version is excluded there because is not handled by global
  requirements.

  Remove the separate requirement file for bandit, because
  bandit has been part of test-requirements.txt in the last 3 years.
  There is noneed for a separate requirements file anymore.
  Even more, the bandit tox environment could be probably removed.

- synchronize the requirements for sphinx and jsonschema with the
  current values from the requirements repository to make
  the requirements-check job happy.

Jobs:
- temporarily disable the scenario-py3 job until a new stestr
  (>2.3.1) is tagged.

Change-Id: Ief8e392fcd2d66a73593abcfda06fc7dbe2e53a6
2019-06-17 15:43:10 +02:00
ZhongShengping bc049c9fc2 Update Python 3 test runtimes for Train
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: If66a364be10271882629e0b278c8729172ff47bd
Depends-On: https://review.opendev.org/#/c/641878/
2019-05-09 17:34:24 +08:00
Luigi Toscano 8c941ed187 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Depends-On: https://review.opendev.org/653988
Change-Id: I6c7fffc1a32cb35ff7fe2ba964510b4f32805842
2019-04-20 14:55:03 +02:00
ZhongShengping 7b3588b871 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I853f7de090387303ce0456e64b47c17d0bb9769b
2019-04-15 08:56:19 +08:00
Luigi Toscano b21e696926 Adapt to the additional rules from pycodestyle 2.5.0
It is wreaking havoc on the openstack gates, let's fix the issues.

Fix:
- E117: Over-indented code blocks;
- E305: Expected 2 blank lines after class or function definition

Ignore for now:
- W504: Line break after binary operator
- W605: Invalid escape sequence

W504 should be fixed together with its sibling W503.

Change-Id: I1483fae77153ffb24bfc51de2b83ea9db6737bfd
2019-02-15 00:18:53 +01:00
Telles Nobrega 92686f5a10 Prepare Sahara core for plugin split
On the effort to make Sahara more user and operators friendly
we are splitting the plugins from Sahara core.

The main goal of this change is to facilitate installation,
maintainance and upgrade of plugins. With the plugins outside
the main Sahara code, operators will be able to install a subset
of plugins, as well as upgrade to newer versions of the plugins
without having to wait for a new version of OpenStack to be
released. As well, it aims to facilitate new contributors to
develop and maintain their own plugins.

Sahara Spec: https://specs.openstack.org/openstack/sahara-specs/specs/rocky/plugins-outside-sahara-core.html

Change-Id: I7ed0945fd82e37daaf6b29f947d3dba06db9d158
2019-01-10 22:18:24 -03:00
Luigi Toscano 61b0b2e038 Bump the version of hacking to 1.1.0, with few fixes
Also switch to pycodestyle from pep8 which requires a bump
of the the version of flake8 too.

Skip the following checks for now:
- E123 Closing bracket does not match indentation of opening bracket's line
- E226 Missing whitespace around arithmetic operator
- E402 Module level import not at top of file
- E731 Do not assign a lambda expression, use a def
- W503 Line break occurred before a binary operator

They should be probably revisited and fixed, if possible,
or skipped individually using # noqa

The following checks reported a limited number of errors and
they were fixed directly in this review:
- E241 Multiple spaces after ','
- E501 Line too long (82 > 79 characters)

Change-Id: I1f185d2efd1adf27a26e3ac93f2e1011c0b63124
2018-11-26 19:03:02 +01:00
Nguyen Hai Truong 7a815ac0e3 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: Ia9927693c1ef48e04b8eaa8d0754ce294f41cd97
2018-11-07 19:07:55 -08:00
Andreas Jaeger 3f22c4a978 Cleanup tox.ini constraint handling
Use the "modern" way of contraints setup and remove double setting of
constraints (in install_command and deps) for some environments.

Remove also -U from pip install command, it can break with constraints
and update required packages.

Change-Id: I2412a02dcba40a3128f9af766e27c046ce3d3f25
2018-10-17 12:50:31 +02:00
Luigi Toscano 6f66893c2a Switch the coverage tox target to stestr
Use coverage+stestr for the cover tox target.
With this change, testrepository is not required anymore.

Change-Id: Ia294ee8003ccc10104f68777bea6921ff97bacef
2018-06-27 00:23:56 +02:00
Charles Short 1e14e8d30e Switch ostestr to stestr
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Ic580dc7ba0684087a81137771fb125f4d412d948
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-06-26 00:27:03 +02:00
Doug Hellmann ebda88534a fix tox python3 overrides
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: I03574b12fc9ef07ce459e81c9b8219a3b10bd4da
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-07 11:32:24 +00:00
Luigi Toscano 03587a020d doc: add the redirect for a file recently renamed
Change-Id: I6988795e477fda23a393710e8b455210a3a6ad45
2018-05-07 19:51:32 +02:00
Luigi Toscano 775f6e4311 Remove the (now obsolete) pip-missing-reqs tox target
The test does not work anymore with pip 10. For more details, see:
http://lists.openstack.org/pipermail/openstack-dev/2018-April/130027.html

(I suspect that the development that happened later in OpenStack testing
made it obsolete anyway).

Change-Id: I2227e70d23e5e7e99a85834ccc7d6ec8a09bf4ae
2018-04-30 20:32:38 +02:00
Zuul b9433ab516 Merge "Follow the new PTI for document build" 2018-04-06 00:33:11 +00:00
Nguyen Hai edc7097416 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Remove the '[build_sphinx]' section as described in:
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Change-Id: Ia8e8d6b4e23c2737a9e948e7c4b682dca697f6a4
2018-03-27 19:48:02 +09:00
Doug Hellmann ae0f1af2f6 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.

Change-Id: I3a1d395b43e77010bf44ba71f5bcf146c01e0098
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 18:13:04 -04:00
chenpengzi 339e1ad30f Replace chinese quotes
Change-Id: I39f1b5efad55a3c20d09bde8280b95c5f146b490
2018-02-05 17:24:37 +08:00
Luong Anh Tuan a7a9fe27f4 Enable hacking-extensions H204, H205
This patch enable extensions:
-[H204] Use assert(Not)Equal to check for equality.
-[H205] Use assert(Greater|Less)(Equal) for comparison.

Change-Id: If1b09426deba024ce75ee0d2d687c2501a1e141d
2018-02-01 09:33:58 +07:00
Telles Nobrega 5d208ed486 Policy in code for Sahara
This patch is part of the community goal to move policies into code.

https://governance.openstack.org/tc/goals/queens/policy-in-code.html

Change-Id: I8f228ca40acc589b9aa41fc1e80a1c0308f179cf
2017-10-23 11:46:31 -03:00
zhanghongtao 76202bfed8 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: Ice7b791bf308ce9da047e2205a990b8d97924bd9
2017-07-31 01:58:14 +00:00
chenxing 1f47383e67 Update the documentation link for doc migration
Change-Id: Ied5b93d7509ae6a2a9d87740ebe67679ce705c5b
2017-07-14 13:50:40 +00:00
Ngo Quoc Cuong b5530677f4 Enable H904 check
H904 allows the logging package to skip creating the formatted log
message if the message is not going to be emitted because of the
current log level.

Change-Id: Ib736990696cdcbec360303e744aab9fa4cf82c91
See: https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages
2017-07-06 03:17:45 -04:00
Luigi Toscano b0785d1696 Basic script for pack-based build image
Each review which adds support for another plugin should change
the support matrix defined in the script.

Add the binary dependencies required for the sahara-image-pack
command.

Change-Id: Ibc294bd572ee4da298f125f9d9c4bff87ce5da9d
2017-05-05 11:04:20 +02:00
Vitaly Gridnev 6eee9f9220 Add ability to install with Apache in devstack
Change-Id: I9e9bc6edaca948ea4af7868901f76623c8d0d9c5
2017-03-19 12:31:08 +00:00
Luong Anh Tuan a03cfba058 Indicating the location tests directory in oslo_debug_helper
According to [1], we can passing a "-t" argument to
oslo_debug_helper to indicate the directory where tests
are located. This will solves ImportError exception.

[1] https://docs.openstack.org/developer/oslotest/features.html

Change-Id: I1b6b965f5e999aac85adf97ac7c0cb0a0edce41e
Closes-Bug: #1666560
2017-03-09 23:58:29 +07:00
Andreas Jaeger 8ed10235c6 Fix api-ref build
With current os-api-ref and Sphinx 1.5, there were a couple of problems
in building api-ref: Wrong order of entries, wrong names.

Fix all so that api-ref builds again.

Also, tread warnings as errors for built so that no new problems get
introduced.

Change-Id: I6fbae3e93632472c60f848868b55cb7206ee76a9
2017-03-04 12:51:58 +01:00
Cao Xuan Hoang f0ff85396a Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: Ifbe877705dbd87dea34d2b1974d2ae3ed7cac9a3
2017-02-08 10:34:02 +07:00
nizam 30453da9c9 Constraints are ready to be used for tox.ini
Per email[1] from Andreas, we don't need to hack at install_command
any longer.

[1] http://openstack.markmail.org/thread/a4l7tokbotwqvuoh

Change-Id: I581cd94dd794ffb4d366a155e6d2bd8784809dd3
2016-10-17 07:21:49 +00:00
Vitaly Gridnev 602a771975 fix docs env
soursecode is not a right directive.
don't treat warnings as errors in api-ref builds.

Change-Id: I7640ad741f31c554f40e9169ac42e4c1b6774dea
2016-09-14 19:07:10 +03:00
Jenkins 24bee0ee47 Merge "Add Python 3.5 classifier and venv" 2016-07-25 10:33:38 +00:00
PanFengyun d9bd4980c8 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I15a761c0b6d5769b2dba9f521ef96cf43c99e552
2016-07-14 21:49:12 +08:00
Ethan Gafford 4b70223bf2 CLI for Plugin-Declared Image Declaration
Introduces a new libfuestfs-driven CLI for packing of
Sahara images, using the same recipe definition scheme
introduced in the validate-image-spi blueprint.

Documentation and plugin image packing configurability
can and will be provided in separate patches for ease
of review.

Partially-implements: blueprint image-generation-cli
Change-Id: I6788108e3fb6232045fc56937639a6348768a7bc
2016-07-13 14:41:00 -04:00