282 Commits

Author SHA1 Message Date
Tim Burke
3db8e2d05f Clean up some py36 infra
- Drop py36 versions from py3-constraints.txt
- Remove py36 tox environment
Forgot to do this when we dropped py36 support.
Signed-off-by: Tim Burke <tim.burke@gmail.com>
Change-Id: I0233e1dd036b9a420c815fec3c9632d2967b934e
2025年08月28日 14:10:32 -07:00
Tim Burke
a18fb08b48 Switch py39 jobs to use py3-constraints.txt
Signed-off-by: Tim Burke <tim.burke@gmail.com>
Change-Id: I6fb806d299fc30f6ceaeba78cf3a810298e94f26
2025年08月28日 14:09:56 -07:00
Tim Burke
a2725ea99f CI: Move lower-constraints job to py37
This got missed when we dropped support for py36.
Related-Change: I6f0cbde23f0a0db75bdb3e598ee862af0bad0dba
Change-Id: I3dcca36744bbdbce7e5e22e50b3a3fa263071717
2025年05月15日 17:22:53 -07:00
Zuul
c7f93f0f63 Merge "Add skip reason next to test name in zuul output" 2025年04月09日 17:47:53 +00:00
Clay Gerrard
dd0ba770f7 Add skip reason next to test name in zuul output
Currently our test names are long and we pipe pytest output to a file,
so the skip reason gets truncated; setting this env var .zuul and
passing to tox.ini will allow us to see the reason why pytest is
skipping next to the test name.
Drive-by: remove passenv from s3api tests in tox.ini so they are
inherited from testenv
Related-Change-Id: I6b7cc64262d2f8ef7e3bbce30bab5550899b5211
Change-Id: I15791a9238485190acf7f87a3b562bf67e7c5c09
2025年04月09日 14:04:11 +00:00
Tim Burke
405440a2ee tests: Display extra test summary info
Change-Id: I6b7cc64262d2f8ef7e3bbce30bab5550899b5211
2025年04月08日 12:59:29 -07:00
Zuul
06e09b9ece Merge "Drop py2 support" 2025年01月01日 07:20:05 +00:00
Tim Burke
7367907c58 Drop py2 support
* Remove py2 gate jobs.
* Build non-universal, py3-only wheels.
* Specify minimum python version in package metadata.
* Clean up requirements/constraints/bindep (a little, anyway).
Change-Id: I53153c4fde043e964e1daa7bbf2089e0471dede2
2024年12月20日 09:11:14 -08:00
Zuul
b7c228c234 Merge "trivial: Enable a couple off-by-default hacking checks" 2024年12月20日 13:02:38 +00:00
Tim Burke
4b3696003c trivial: Enable a couple off-by-default hacking checks
H106 and H904 were already passing anyway.
Change-Id: Ic386e09e40a49b661f30ea40e2c737d59100d086
2024年12月19日 09:57:44 -08:00
Tim Burke
13197af6e3 CI: Clean up deps for various doc builds
- Define a single location for doc-build deps
 - As a side-effect, use constraints for api-ref builds
- Remove test-requirements.txt from those deps
Change-Id: If6cc8702e89f5110ad89ba933f55641de02550e9
2024年12月12日 15:02:27 -08:00
Zuul
cffa7dea77 Merge "CI: Consistently use TOX_CONSTRAINTS_FILE" 2024年12月09日 23:05:16 +00:00
Tim Burke
93658f0de6 CI: Consistently use TOX_CONSTRAINTS_FILE
The UPPER_CONSTRAINTS_FILE var has been deprecated for years.
Related-Change: I3f957187ed4f29fcf88db99cb79fb33b21a8dd8d
Change-Id: Id6201036cc619d050f86ae9c9c420388808f8b89
2024年12月09日 11:13:28 -08:00
Zuul
995f78156a Merge "infra: Remove 'bandit' tox environment" 2024年12月07日 02:43:22 +00:00
Tim Burke
436808a959 infra: Remove 'bandit' tox environment
The expectation is that CI and devs would run these checks as part
of the 'pep8' environment.
Change-Id: Ib9b2e34d520baee13c4b38bc220ec7b4d2e38433
2024年12月06日 16:21:42 -08:00
Tim Burke
54ec8a124a CI: drop pip --upgrade flag in tox.ini
This has been causing most/all of our tox-based jobs to run with
unconstrained dependencies (though test requirements were properly
pinned).
Change-Id: Icf1b63e39ec321887d9fe6afe7b212c813ad1d1e
2024年12月02日 10:58:44 -08:00
Tim Burke
a8ad97f838 CI: Drag forward more constraints
Previously, we'd install the lowest (mostly common) denominator of deps
for our func-py3 jobs. This left us not testing up-to-date deps for
many python versions, though, and could even prevent us from testing on
new python versions entirely. For example, py312 cannot install
greenlet 2.0.2, the last version to support py36; this caused gate
failures when OpenStack as a whole tried to run Swift's func tests on
Ubuntu 24.04.
Change-Id: I0e55d8b4c5ed520c0aad8cc952a9fa1683905356
2024年10月31日 11:05:15 -07:00
Tim Burke
c3f1ed3df1 CI: Move a bunch of func test jobs from py38 to py312
Change-Id: I8c65c7829fbe167e0c79239d577c38e90b93b5cf
2024年10月31日 11:05:15 -07:00
Tim Burke
0fdb93c980 CI: use py36 constraints for py38
Now that openstack/constraints has dropped support for py38, we have
to manage constraints ourselves.
Change-Id: I9046c6ea91c98f15c4c491ce3de4a5aaf682f6f5
2024年10月24日 12:33:55 -07:00
Tim Burke
a3f4959767 Remove legacy bin/ scripts
Change-Id: Ibd111773a496e8e3b1fc1577f40aa69f4328139b
2024年08月06日 10:59:53 -07:00
Tim Burke
6220a473f3 Support tox4
Change-Id: If15c3fee706d295de678f812839a5d0759089ccf
2024年06月25日 13:36:42 -07:00
Tim Burke
ce9e56a6d1 lint: Consistently use assertIsInstance
This has been available since py32 and was backported to py27; there
is no point in us continuing to carry the old idiom forward.
Change-Id: I21f64b8b2970e2dd5f56836f7f513e7895a5dc88
2024年02月07日 15:48:39 -08:00
Tim Burke
76ca11773e lint: Up-rev hacking
Last time we did this was nearly 4 years ago; drag ourselves into
something approaching the present. Address a few new pyflakes issues
that seem reasonable to enforce:
 E275 missing whitespace after keyword
 E231 missing whitespace after ','
 E721 do not compare types, for exact checks use `is` / `is not`,
 for instance checks use `isinstance()`
Main motivator is that the old hacking kept us on an old version
of flake8 et al., which no longer work with newer Pythons.
Change-Id: I54b46349fabb9776dcadc6def1cfb961c123aaa0
2024年02月07日 15:48:39 -08:00
Clay Gerrard
9adc3ce425 disable requests_mock pytest plugin
While we use requests-mock, we don't need the pytest plugin.
Change-Id: If14e4d2c1af2efcbc99e9b6fe10973a7eb94d589
2023年05月10日 14:45:33 -07:00
Tim Burke
0518c60235 CI: Use [tox]requires to pin virtualenv
Using an antiquated distro to keep us on an EOL'ed version of python
that *just so happens* to have had support dropped for it around the
same time virtualenv removed the ability to create py27 environments
doesn't seem like the right way to address the problem.
Make sure we also include the tox<4 pin that we're using project-wide
so we don't get some nonsense about "Multiple top-level packages
discovered in a flat-layout".
Related-Change: https://review.opendev.org/c/openstack/swift/+/881035
Change-Id: I32a161e555179ca34d306ac37e4097611853e36b
2023年04月26日 11:40:03 -07:00
Zuul
e0dc81c5a3 Merge "Skip coverage reports when running pytest directly" 2023年01月18日 02:23:22 +00:00
Tim Burke
51a944850f Skip coverage reports when running pytest directly
Keep them when running via tox, though.
Related-Change: https://review.opendev.org/c/openstack/swift/+/851099
Change-Id: I1ddd1dc8a3b35a588a8ecc5667dae4da33340712
2023年01月17日 12:05:34 -08:00
Tim Burke
dd9b687f71 Fix docs build
We need to install swift to build docs anyway, so make sure we include
swift's requirements as well as the docs-building requirements.
Otherwise, swift's requirements will not be subject to the specified
constraints file.
Change-Id: If33532232572e802b2099f39f4231ee6add6d5a9
2023年01月17日 10:29:28 -08:00
Tim Burke
2d7c1dc6dd CI: Fix our usage of tox
For tox 3.x and earlier, passenv was a space-separated list; as of tox
4.0.0, it's comma-separated. For a while, our spaces would be silently
included in the now-one-and-only passenv value parsed (which wasn't
great, but mostly just caused confusion) -- as of tox 4.0.6, however, it
became a hard error, and all tests would fail like
 pass_env values cannot contain whitespace, use comma to have multiple
 values in a single line, invalid values found 'SWIFT_* *_proxy'
Unfortunately, we don't really know what versions of tox all our various
stakeholders might want/need to use (though we previously set a
minversion of 2.3.2). We might be able to spread values over multiple
lines to make it compatible with both tox 3 *and* tox 4, but I'm fairly
certain *_proxy was only included for some variables that are recent
versions of tox include by default anyway, so just increase our
minversion (which was too low, anyway -- allowlist_externals which we
already configure was added in 3.18.0) and get rid of *_proxy.
FWIW, python-swiftclient was already specifying 3.18.0 as a minversion,
so I expect the new minversion to not be a problem.
Also, add ./.functests to a bunch of allowlist_externals, as newer tox
is more strict about that sort of thing.
Drop skipsdist in a bunch of places so we can import swift from func
tests and docs. (Still not sure why I don't see us hitting a similar
problem for unit tests...)
Change-Id: I4be1e86e3291ad1619c695fb93d7cadf053b556d
2022年12月29日 13:36:06 -08:00
Tim Burke
ef155bd74a Switch to pytest
nose has not seen active development for many years now. With py310, we
can no longer use it due to import errors.
Also update lower contraints
Closes-Bug: #1993531
Change-Id: I215ba0d4654c9c637c3b97953d8659ac80892db8
2022年12月09日 11:38:02 -08:00
Tim Burke
27db5213dc CI: Run s3api test suite
Change-Id: I70dec389c1ac608a9d2767d162bd5edc315e564b
2022年05月27日 23:46:20 -07:00
Tim Burke
238dc03535 CI: constrain py36 deps
Now that OpenStack writ large has dropped support for py36,
we're going to have to manage our constraints ourselves
more, just like we did for py27.
Change-Id: I0973be6692e3a9b871eb61cbf759e13644a25107
2022年05月24日 11:53:59 -07:00
Tim Burke
1f9b879547 Run flake8 on bin/ files
Change-Id: I58d4b5a00e97785584c6d3bd8b06243f481c1934
2021年02月01日 13:26:53 -08:00
Tim Burke
6058b1c4ea Run linters on py3
Change-Id: I8db90ce8198aad720a644186d6a122df6f0058ae
2020年12月17日 09:30:08 -08:00
Tim Burke
976cc8f482 Give unit tests a second chance to pass
Change-Id: I495fb1ec2394130c7274368662b58212ca375854
2020年12月04日 22:21:58 -08:00
wu.shiming
ee641dffc9 Dep's should be restricted by upper-constraints
Tox trying to install latest versions for building docs which may
not be supported by stable and lower branches, so should be
restricted by respective version's upper-constraints.txt
Change-Id: I599d4ea430cc1e65bb50d0481617b005febf6de2
2020年11月11日 18:30:27 +08:00
Zuul
22c778412a Merge "Add librsvg2-* to bindep.txt" 2020年11月06日 01:43:09 +00:00
Alistair Coles
f4ce322776 Add librsvg2-* to bindep.txt
Add the librsvg2-* package to bindep.txt. This package has been
required to build docs since the Related-Change. The package is added
to a new 'doc' profile in bindep.txt; if missing, the package will be
reported by:
 bindep doc
The 'doc' profile is added to the tox 'bindep' env command so that, if
missing, the package will always be reported by:
 tox -e bindep
Change-Id: I6c60c31ca8002133ab77f05f59359b25315b299c
Related-Change: I26cefda80d3234df68d7152b404e0a71da74ab90
Closes-Bug: 1903038
2020年11月05日 12:13:52 +00:00
likui
26e431498b Use TOX_CONSTRAINTS_FILE
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>.
[1] https://review.opendev.org/#/c/722814/
Change-Id: I7e3cdef5b1bcb28019055d29dbd95073e92882fc
2020年11月01日 16:37:32 +08:00
Thiago da Silva
20c6bdb71c Enable s3api and staticweb tests across all func tests
This patch removed the separate s3api, staticweb functional tests
gate jobs and added them across all other functional test jobs.
Change-Id: Ie1c606132a054defc2b3cc14a66031090e7b8449
2020年06月01日 19:16:48 -07:00
Tim Burke
0fd23ee546 Fix pep8 job
New flake8 came out with new & improved rules. Ignore E741; it would be
too much churn. Fix the rest.
Change-Id: I9125c8c53423232309a75cbcc5b695b378864c1b
2020年05月13日 00:24:13 -07:00
Sean McGinnis
0f2da2aee6 Use local py2 upper-constraints
The global upper constraints repo will no longer track py2 packages,
meaning upper constraints for the py2.7 runtime will need to be handled
locally.
This adds an in-repo file for upper constraints enforcement using the
last py27 constraints from openstack/requirements to validate
functionality.
Change-Id: I624f914c6155178cbe474f1eae2871e2aef721eb
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020年05月04日 07:03:53 -05:00
Tim Burke
668242c422 pep8: Turn on E305
Change-Id: Ia968ec7375ab346a2155769a46e74ce694a57fc2
2020年04月03日 21:22:38 +02:00
Andreas Jaeger
96b56519bf Update hacking for Python3
The repo is Python using both Python 2 and 3 now, so update hacking to
version 2.0 which supports Python 2 and 3. Note that latest hacking
release 3.0 only supports version 3.
Fix problems found.
Remove hacking and friends from lower-constraints, they are not needed
for installation.
Change-Id: I9bd913ee1b32ba1566c420973723296766d1812f
2020年04月03日 21:21:07 +02:00
Zuul
9fa0b211a9 Merge "Seamlessly reload servers with SIGUSR1" 2019年11月14日 20:34:48 +00:00
Darrell Bishop
1107f24179 Seamlessly reload servers with SIGUSR1
Swift servers can now be seamlessly reloaded by sending them a SIGUSR1
(instead of a SIGHUP). The server forks off a synchronized child to
wait to close the old listen socket(s) until the new server has started
up and bound its listen socket(s). The new server is exec'ed from the
old one so its PID doesn't change. This makes Systemd happier, so a
ReloadExec= stanza can now be used.
The seamless part means that incoming connections will alwyas get
accepted either by the old server or the new one. This eliminates
client-perceived "downtime" during server reloads, while allowing the
server to fully reload, re-reading configuration, becoming a fresh
Python interpreter instance, etc. The SO_REUSEPORT socket option has
already been getting used, so nothing had to change there.
This patch also includes a non-invasive fix for a current eventlet bug;
see https://github.com/eventlet/eventlet/pull/590
That bug prevents a SIGHUP "reload" from properly servicing existing
requests before old worker processes close sockets and exit. The
existing probtests missed this, but the new ones, in this patch, caught
it.
New probe tests cover both old SIGHUP "reload" behavior as well as the
new SIGUSR1 seamless reload behavior.
Change-Id: I3e5229d2fb04be67e53533ff65b0870038accbb7
2019年11月07日 10:15:26 -08:00
Zuul
23e1dba532 Merge "Make our py2 func tests more explicitly py2" 2019年11月05日 09:47:24 +00:00
Tim Burke
c512574e11 Make our py2 func tests more explicitly py2
...because otherwise, I think they might be running under py3 right now.
Change-Id: I96ad9e5ed87a7e08d06e889233730cec476d3af7
2019年11月05日 02:33:36 +00:00
Thiago da Silva
281ffab2a5 pin lower-constraints to run against python 2.7
Change-Id: I5c856012a04ef8f910c28b0248ea7bcda47e4816
2019年11月01日 19:08:01 +02:00
Zuul
52484bc7f9 Merge "PDF Documentation Build tox target" 2019年10月04日 06:47:08 +00:00