As part of the docs migration work[0] for Pike we need to switch to use
the openstackdocstheme.
Fix one display problem with wrong section markup in the index file.
[0]https://review.openstack.org/#/c/472275/
Change-Id: Ide31218a7f37ba5d959de99cab48fc6513bf426f
This should give the necessary tooling to set up the right
links in the right places so Swift has release notes listed
alongside other projects.
Change-Id: I4e5f1ce1fcfbb2943036c821a24a0b4a3a2d9fc8
The testing requirements should not cause extra packaging
work for deployers (since these aren't required to deploy).
This patch brings it in line with the latest global requirements,
except for python-swiftclient itself (which I kept with no version
specifier). By being in line with global requirements, this is a
more accurate list with respect to how things are actually tested
in the gate.
Change-Id: Iddc92d9bb135144d38c3e5aec2e95df5787e9b5b
This commit updates the Swift Bandit file to the new style
introduced in Bandit 1.0. In response to the struggle with
getting a Bandit config file working and kept up to date we
introduced a simplified version in Bandit 1.0.
This commit updates Swift's bandit.yaml to use the new version.
Change-Id: Ida5dd08f4ea72a377346f2159caeb2f3741d4980
The api-ref document needs a newer sphinx version, allow a 1.2 Sphinx
version to be used - like it's used in global-requirements.txt.
Change-Id: I9183cc56753fbe7e41206c6a9081899df5c3919a
Needed-By: Ifebc65b188c4f2ba35b61c0deae5ec24401df7f9
Defcore uses Tempest, which uses Test Repository.
This change makes it easier for Defcore to pull functional
tests from Swift and run them. Additionally, using testr
allows tests to be run in parallel.
Concurrency set to 1 for now, >1 causes failures for
reasons that are still TBD.
With switch to ostestr all the server logs are being sent to stdout
which makes it completely unreadable. Suppressing the logs by default
now with a flag to enable it if desired.
Co-Authored-By: John Dickinson <me@not.mn>
Co-Authored-By: Robert Collins <rbtcollins@hpe.com>
Co-Authored-By: Matthew Oliver <matt@oliver.net.au>
Co-Authored-By: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
Change-Id: I53ef4a116996a772cf1f3abc2eb0ad60047322d5
Related-Bug: 1177924
This change adds a basic bandit config for Swift. It can be invoked
by running the tox environment for bandit;
tox -e bandit
This is an initial step for using bandit with Swift
and it should be revisited to improve the testing as more is learned
about the specific needs of the Swift code base.As per now some tests
are excluded as they were used on purpose.
https://wiki.openstack.org/wiki/Security/Projects/Bandit
Implements: blueprint swift-bandit
Change-Id: I621be9a68ae9311f3a6eadd1636b05e646260cf2
Replace the whitelist of flake8 checks (select) with a blacklist
(ignore). It makes possible to disable a single check, which was not
possible before. This new approach permits to enable new tests more
easily and see which checks are currently disabled.
Only new checks are disabled, this change doesn't run less checks than
before. Currently, many checks are disabled, but following changes will
fix these new warnings.
When the "select" option of flake8 is used in tox.ini, the "ignore"
option is ignored. It is not possible to use "select" and "ignore"
options at the same time. See the code in pep8 (flake8 is based on
pep8):
d48eef0710/pep8.py (L1808)
The purpose of flake8 is to enhance the coding style, but also to help
to detect common bugs. Blacklisting checks permits to detect new bugs
when upgrading the tools. For example, new checks were recently added to
help porting code to Python 3.
This change permits to use pbr 1.0 and newer which is required to
support Python 3. Previously, hacking 0.8.1 was used, but hacking 0.8 is
incompatible with pbr 1.0 and newer (hacking 0.8 requires pbr<1.0).
pbr 1.0 is required to use environment markers on requirements to
install dnspython on Python 2 and dnspython3 on Python 3.
Change-Id: I41d63b9467083d7606ad18aaa398ca7738b27fae
When functional tests are run in tox and an exception is raised when connecting
to Swift (for example: Swift not running, missing python-keystoneclient package
used by python-swiftclient) 0 tests are executed, but tox returns a success.
An exception is raised during tests, caused by a missing python-keystoneclient
in python-swiftclient. Instead of adding python-keystoneclient as a dependency
in python-swiftclient the package is added to the test-requirements.txt in Swift
itself. Note that adding python-keystoneclient to the test-requirements in
python-swiftclient is not sufficient (it's already in there).
The exception in setup_package() is catched by the openstack.nose_plugin, thus
disabling this plugin for now as well.
Also fixing two test errors seen on the gate regarding the tempurl middleware.
There was also an update to tox, environment variables were no longer passed
with versions >= 2.0 (http://tox.readthedocs.org/en/latest/changelog.html).
Swift test environment variables have been added to the passenv to re-enable the
former behavior, as well as environment variables required to pass proxy
settings.
This also led to skipped tempauth tests, and together with the missing
python-keystoneclient no tests were executed.
Related-Bug: 1461440
Related-Bug: 1455102
Co-Authored-By: Alistair Coles <alistair.coles@hp.com>
Change-Id: Ideea071017d04912c60ed0bc76532adbb446c31d
Currently the theme used by the swift developer docs are out of
date, it should be using oslosphinx, to provide a similar look
and feel between all openstack related projects.
Change-Id: Id7c226cdc13c6c4f3b5082b1ef4dfe09966b21ec
mock >= 1.0 changed the behavior for iterable sideeffects. Any
exceptions in an iterable side_effect will now be raised instead of
returned.
With mock < 1.0 tests are failing, because test for the
internal client (TestSimpleClient.test_get_with_retries) use an
iterable sideeffect that raise an URLError on the first request
and pass on the second request.
Change-Id: I568b68c33ff599d7a4f590e2a0eb8caeee4b4d4e
The flake8 command (when run from the command line or via vim-flake8) seems to
bypass the the normal pep8 [W]arning and [E]rror as well as py[F]lake checks
if the project level tox.ini includes a select, but doesn't include them in
it's select option (tested on flake8 v2.0 and v2.1). Somehow if hacking is
installed these checks always run even if they're not explicitly listed in the
select list - but adding them so flake8 works on our project even without
hacking doesn't seem to cause any problems.
Also The [flake8] section's "select" option in tox.ini doesn't seem to run all
checks when presented with the space-comma seperated list. I had to pull out
the bare except check (H201), because our hacking fix for the "H201 # noqa"
hasn't been released to pypi yet (maybe hacking version 0.9.0?).
As far as I know the Swift core development team is fully onboard with pep8,
and the flake8 checks are mostly like "unused import" stuff - so I *think*
this change is more about making the tool test what we want it too and not
changing or adding any new requirements or expectations.
Change-Id: Ia911c63745100cce182d5c5eb67b77e31c1e9b18
Removes the requirement for swiftclient in swift-dispersion-report
and swift-dispersion-populate. To prevent a dependency on
keystoneclient and to avoid reinventing the wheel with an internal
keystoneclient, authentication with keystone is only supported if
swiftclient is available. If not, only auth v1 is supported.
The dependency in swift/container/sync.py has also been removed.
Implements: blueprint remove-swiftclient-dependency
Change-Id: I6ec3b3c85a67b9ab6eb04b90ffc16daf1600e8a7
Sync the global requirements to pin sphinx. This addresses an issue
where Sphinx 1.2 is not building documents correctly and causing
check/gate to fail.
We also had to adjust the pip command used.
Change-Id: I8894c0199db845e90e5086a7c0e6bb7c7a26b5a0
Instead of blacklisting Hacking globally,
only blacklist those that currently occur frequently
(for a later followup patch), and fix the rest. In
detail:
H101 Use TODO(NAME)
H201 no 'except:' at least use 'except Exception:'
H231 octal number 022 should be written as 0o22
H401 docstring should not start with a space
H701 Empty localization string
Change-Id: Ib3b3d56b68d1cf15d3b67ac9749fcbdb876dc52a
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.
Change-Id: Ib3e50a811868e2969923d978ee00c4f92682aa1c
Fixes: bug #1179008