132 Commits

Author SHA1 Message Date
Sean McGinnis
88411cfc2f
Blacklist stestr 2.3.0
This version has been blacklisted in global-requirements. It's not
likely that it will get used since pip will try to grab the latest, but
let's be explicit and make sure it never is.

Change-Id: I644926e6300f646b9ddc9ac4bdf0253caef18177
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-03 12:18:27 -06:00
Zuul
2ff6bb4a00 Merge "Enable flake8-logging-format extension" 2020-01-20 13:44:10 +00:00
Zuul
64b9fa6f2c Merge "Clean up test requirements" 2020-01-16 23:52:59 +00:00
whoami-rajat
a5bb17bdfc Make volume soft delete more thorough
When a volume record is soft-deleted in the database,
dependent records in other tables (for example,
Transfers, VolumeGlanceMetadata, etc.) must be soft
deleted as well.  Otherwise, we will get FK dependency
errors when the database is purged.

This patch adds that support for VolumeAttachment table.
(other tables were already covered, just refactored)

Also adds tests.

Co-authored-by: Rajat Dhasmana <rajatdhasmana@gmail.com>
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>

Change-Id: Ibfa6c4ba2f162681756ec3203991351345b65346
Related-Bug: #1542169
2020-01-11 13:01:11 -05:00
Sean McGinnis
1f7b0efdcc
Enable flake8-logging-format extension
The flake8-logging-format extension includes several checks for things
we've had to try to catch in code reviews until now. This enables the
extension and fixes the few cases where things had slipped through code
review.

G200: Logging statements should not include the exception in logged string
is disabled since that triggers a lot more issues, some of which may be
acceptable. That can be left as a follow up exercise if we want to clean
those up and enable all checks.

Change-Id: I1dedc0b31f78f518c2ab5dee5ed7abda1c1d9296
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-01-09 14:35:20 -06:00
Sean McGinnis
a90970da15
Clean up test requirements
testresources and testscenarios were added in ec40c3b6 to address an
issue with oslo.db not pulling in its own requirements.

tempest was used when we had the tempest plugin in the main cinder repo
and was not removed when the plugin switched to its own repo.

os-api-ref is used for building the API reference and was a leftover
from before doc/requirements.txt was added.

Change-Id: Ib4fc7cb6199c9581c19d34ea43a2d15ec9003f13
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-01-08 13:33:50 -06:00
Sean McGinnis
3eb9b422f4
Introduce flake8-import-order extension
This adds usage of the flake8-import-order extension to our flake8
checks to enforce consistency on our import ordering to follow the
overall OpenStack code guidelines.

Since we have now dropped Python 2, this also cleans up a few cases for
things that were third party libs but became part of the standard
library such as mock, which is now a standard part of unittest.

Some questions, in order of importance:

Q: Are you insane?
A: Potentially.

Q: Why should we touch all of these files?
A: This adds consistency to our imports. The extension makes sure that
   all imports follow our published guidelines of having imports ordered
   by standard lib, third party, and local. This will be a one time
   churn, then we can ensure consistency over time.

Q: Why bother. this doesn't really matter?
A: I agree - but...

We have the issue that we have less people actively involved and less
time to perform thorough code reviews. This will make it objective and
automated to catch these kinds of issues.

But part of this, even though it maybe seems a little annoying, is for
making it easier for contributors. Right now, we may or may not notice
if something is following the guidelines or not. And we may or may not
comment in a review to ask for a contributor to make adjustments to
follow the guidelines.

But then further along into the review process, someone decides to be
thorough, and after the contributor feels like they've had to deal with
other change requests and things are in really good shape, they get a -1
on something mostly meaningless as far as the functionality of their
code. It can be a frustrating and disheartening thing.

I believe this actually helps avoid that by making it an objective thing
that they find out right away up front - either the code is following
the guidelines and everything is happy, or it's not and running local
jobs or the pep8 CI job will let them know right away and they can fix
it. No guessing on whether or not someone is going to take a stand on
following the guidelines or not.

This will also make it easier on the code reviewers. The more we can
automate, the more time we can spend in code reviews making sure the
logic of the change is correct and less time looking at trivial coding
and style things.

Q: Should we use our hacking extensions for this?
A: Hacking has had to keep back linter requirements for a long time now.
   Current versions of the linters actually don't work with the way
   we've been hooking into them for our hacking checks. We will likely
   need to do away with those at some point so we can move on to the
   current linter releases. This will help ensure we have something in
   place when that time comes to make sure some checks are automated.

Q: Didn't you spend more time on this than the benefit we'll get from
   it?
A: Yeah, probably.

Change-Id: Ic13ba238a4a45c6219f4de131cfe0366219d722f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-01-06 09:59:35 -06:00
Sean McGinnis
d9ce598f0c Raise hacking version to 2.0.0
We've kept hacking capped for a long time now. This raises the hacking
package version to the latest release and fixes the issues that it
found.

Change-Id: I933d541d9198f9742c95494bae6030cb3e4f2499
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-01-02 14:42:49 -06:00
Sean McGinnis
d6cd56baca
Readd reno to test-requirements
If86dd619402495d9d4470b14cb270fcf53db6794 moved reno to the docs
requirements file, so it is now only installed into the docs virtual
environment. Our instructions for adding release notes state to use "tox
-e venv -- reno new [slug]" to generate the new release note. This now
fails due to reno not being present in the default virtual environment.

This add reno back to test-requirements to make sure it is present for
generating new release notes.

Change-Id: I394c1f802409137d95a82ed6d1a4b82cf755b9e7
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-12-02 04:11:45 -06:00
Andreas Jaeger
af04cc3392 Update docs building
Cleanup doc/requirements to just use what is needed for doc building.
Move reno to doc/requirements, add doc8 to test-requirements.

update tox.ini:
* doc8 should be in pep8 as linter and not docs according to PTI [1]
* Only build main doc in docs environment, CI uses this and we waste
  just time building api-ref as well, there's a separate environment for
  this. This follows PTI [1]
* Do not include requirements file for docs building, it's not needed
  with apidoc.
* Use common deps for all docs build environments.

Cleanup doc/source/conf.py, with the switch to api-doc a lot of settings
are not needed anymore, also the eventlet bug is fixed.

Update openstackdocstheme to 1.20.0 and which allows to remove obsolete
setting of html_last_updated_fmt, project, latex_elements from conf.py.

Add doc8 to lower-constraints to make requirments-check happy.

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

Change-Id: If86dd619402495d9d4470b14cb270fcf53db6794
2019-08-10 11:41:14 +02:00
Eric Harney
830490916b Bump hacking version to 1.1.x
E731s are be fixed, since use of lambdas makes code
harder to debug.

Ignore E402 and W503/W504 since these don't make a
sensible case for us to change code.

This also requires fixing some E501 errors that should
have already been detected, but weren't.

E117 and E305 errors are disabled for the moment,
and are fixed in a subsequent patch.

Pin pycodestyle to 2.5.0.

Change-Id: Ia06940cff7c3b71938eddb271d2cb8170e02e954
2019-05-30 15:06:02 -04:00
whoami-rajat
0554ee1d47 Bump bandit version
Bandit 1.6.0 changes the behavior of the '-x' option so that it now
supports glob patterns. Update our tox file to use to correctly exclude
test code from bandit scans. This requires bumping our minimum bandit
version.
For additional details, refer to ML Thread[1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006116.html

Change-Id: I0b61934067bfb69ed3375f14bb1e05c9eeb694ad
2019-05-20 16:54:30 +00:00
Brian Rosmaita
a5b5d8e70e Remove non-exception from EXCEPTION_DETAIL_MAPPINGS
Removes a non-exception from the map and adds tests to check the
consistency of message_field.Action and .Detail fields.

Updates test-requirements and lower-constraints to use the most
recent version of ddt allowed by current upper-constraints.  (An
included test uses the idata decorator, which allows passing an
iterator to the test data.)

Closes-bug: #1822025
Change-Id: I0cad6589b145fac430942ccbb27279db7b3b152f
2019-04-03 11:34:46 +00:00
whoami-rajat
645ffab6bf Gate Fix: Bumping versions in lower-constraints.txt
Due to migration of gate jobs to bionic, several packages were
incompatible with the distro.
This patch bumps the version of incompatible packages to the
lowest compatible version.

Change-Id: I9f0fec25444ed865d56d0d250fb6d840ab5b4095
2019-03-15 16:12:24 +05:30
Sean McGinnis
f0f930b12e Add reno to test-requirements
Reno was moved over to doc/requirements.txt when that was created
because it is needed for releasenotes builds. But with its removal
from the other requirements files, doing something like the
recommended "tox -e venv -- reno new xxx" to create a new release
note fails with reno missing from any venv's created since it was
removed.

This adds reno back in to test-requirements.txt so it is installed
when creating the venv, ummm... venv.

Change-Id: Id2e0325b0ce8e18bb9a65318fb3fc52777753536
2018-04-27 09:21:06 -05:00
OpenStack Proposal Bot
f0d17457e0 Updated from global requirements
Change-Id: Iefa7a5e32739a6b9d448659cd8edd232de267aae
2018-02-01 07:06:24 +00:00
OpenStack Proposal Bot
91d6ea9bd5 Updated from global requirements
Change-Id: Ie64af4305605717af01f903b05352e2480569d25
2018-01-16 12:25:12 +00:00
junboli
1b50d73a43 Remove unused lib in test-rquirements.txt
python-subunit is unused now, so we can remove that, and
we have switched to use stestr, os-testr can be removed.
for details, please see [1] and [2]

[1] https://review.openstack.org/#/c/488441/
[2] https://review.openstack.org/#/c/491075/

Change-Id: I5798ebacf8367a5d2b539cc14ee6af505c5a58b6
2018-01-14 17:52:57 +08:00
jiansong
f877ec2917 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

For more detials information, please refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I84e614346cfa4d302f919d12bea9680c5e527475
2017-12-20 18:24:11 -08:00
OpenStack Proposal Bot
42f98148a4 Updated from global requirements
Change-Id: I615d12dfdced3230d3a4195e0323cf3ed9a04e6b
2017-12-05 02:58:54 +00:00
OpenStack Proposal Bot
186d7f5a75 Updated from global requirements
Change-Id: I183ed48e3d66a45864a17bb9785745c64aefa626
2017-10-12 21:52:12 +00:00
OpenStack Proposal Bot
331b232c4d Updated from global requirements
Change-Id: I3a1bd8a1789e1b27ecc63c553fe83fa965d9d38b
2017-09-26 03:24:44 +00:00
OpenStack Proposal Bot
28d08ab625 Updated from global requirements
Change-Id: I9f7e9b5cf0d8031447936e081adf3f2dff15279a
2017-09-12 13:59:36 +00:00
OpenStack Proposal Bot
5c33412546 Updated from global requirements
Change-Id: I4d9352a8d7d640735878bc8b26e301a5a787392b
2017-08-18 11:28:46 +00:00
OpenStack Proposal Bot
a2712abc0d Updated from global requirements
Change-Id: I2faba6db9ce9e77a9b6d392bdd5006af4bccef47
2017-07-28 01:10:24 +00:00
OpenStack Proposal Bot
941e22f312 Updated from global requirements
Change-Id: I6acdd8f4842db3859bf605a82f55a206df7d5342
2017-07-14 23:54:09 +00:00
chenxing
57b14b8035 Switch to openstackdocstheme
Change-Id: Ib8d4af4feb11a5e60ff0394ab166864fcf635db3
2017-07-06 04:03:58 +00:00
OpenStack Proposal Bot
4ef1d8d474 Updated from global requirements
Change-Id: I535731b70a995411b3a3b319cfd3b74df7acbdff
2017-06-30 13:52:52 +00:00
OpenStack Proposal Bot
8cd0edca87 Updated from global requirements
Change-Id: I33e8c3d50d92310e123dfe29b7e1aaae8df5c8b0
2017-06-02 21:54:07 +00:00
OpenStack Proposal Bot
6d4bc69e46 Updated from global requirements
Change-Id: Id7ed6218674d9babd11aab0f5293a31ae08c2334
2017-05-19 15:48:41 +00:00
ChangBo Guo(gcb)
4d9086ee1f Remove dependecy testrepository
testr is part of testrepository, we invoke testr through os-testr
in Cinder and  testrepository is dpendency of os-testr, we don't
invoke testr directly, so don't need dependency testrepository.

Change-Id: Ieb0662b1ea35e12387dc12c2b2eec7c3880d9c3b
2017-05-02 11:55:24 +00:00
Jenkins
3a705a94d3 Merge "doc: verify all rst files" 2017-02-15 10:41:28 +00:00
Danny Al-Gaaf
e3e749fa30 doc: verify all rst files
Make use of doc8 to verify all rst files which are not
autogenerated for errors and fail if there are any issues
found. The doc8 checks are now part of the tox 'docs'
environment and ran automatically. Checks can also be called
direcly via 'tox -e docs'.

Fix all issues found by doc8.

Closes-Bug: #1566765

Change-Id: I2b25247030a1aadcfe029c9e071ef17f2f72046b
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2017-02-14 12:36:57 +01:00
OpenStack Proposal Bot
399295fce2 Updated from global requirements
Change-Id: I4856be1a6d1ba4cc3adeebbb1adac70c1ab5dca5
2017-02-11 17:40:56 +00:00
Ivan Kolodyazhny
193d91282a Add psycopg2 and PyMySQL to test-requirements
Both PyMySQL and psycopg2 are needed to test migration scripts on gates.

Change-Id: If75f15ebecb76d292839a07d36d1193e4781355d
Closes-Bug: #1205386
2016-12-26 17:50:55 +02:00
OpenStack Proposal Bot
1d4d3a97eb Updated from global requirements
Change-Id: I32556ea040e8c42d9021cbbca8942db149aeb1ea
2016-12-15 09:01:48 +00:00
Eric Harney
daf404dc54 Move to hacking 0.12
Change-Id: I19d5d0e08ce4a0e11b0cf9bdd8e0d8b186bc9aac
2016-12-09 11:33:29 +00:00
Eric Harney
efe7b1c0b2 Remove anyjson test dependency
This is unneeded, we can just use json here and
not need an additional dep, since we use the json
module in many places in Cinder.

Change-Id: I5988c190659d349ad16debb4cd6e435e325975fe
2016-12-07 11:12:00 -05:00
OpenStack Proposal Bot
87d6267f35 Updated from global requirements
Change-Id: I410a40562c90bcbf1fe8079164a06830fdadf9f3
2016-11-23 09:13:58 +00:00
OpenStack Proposal Bot
0079eadfc8 Updated from global requirements
Change-Id: Ic95a889aeb3c2d96f2b9ab1de095a739b85d5e55
2016-11-02 15:30:41 +00:00
pawnesh.kumar
217746e510 Remove mox3 in test-requirement.txt
mox3 was used for unit tests. But now we replace it with mock.
So I think there no need to keep it in test-requirement.txt.

Change-Id: Id2179d6611d95939b359d62942e4b4e3f64e1715
2016-10-31 10:29:03 +05:30
OpenStack Proposal Bot
f05474478a Updated from global requirements
Change-Id: I4ce9c0e1d2ca621aadfe843fbe57430888a8f204
2016-10-27 12:12:40 +00:00
Chandan Kumar
6843bc5cb9 Switch from tempest-lib to tempest
Since tempest-lib codebase is moved to tempest.lib from tempest-10.0.0
So we need to switch to tempest.

Change-Id: I3f762133781e26b079ab61f8ddd3ba1e0552c1c1
2016-10-05 18:32:19 +00:00
OpenStack Proposal Bot
5224f109f0 Updated from global requirements
Change-Id: Ia7e6d35818e81950f20b48845bde4d7bf00cc2d0
2016-10-02 20:11:38 +00:00
Jenkins
cd87bce023 Merge "Updated from global requirements" 2016-09-29 11:16:28 +00:00
Jenkins
d91957f4b1 Merge "Updated from global requirements" 2016-09-29 09:16:13 +00:00
OpenStack Proposal Bot
d3f2e3fbec Updated from global requirements
Change-Id: I3f809bd8eec7a85210266cf14121ae6cbbcd16e5
2016-09-29 05:05:21 +00:00
Michał Dulko
792108f771 Remove ovo[fixtures] dependency from tox.ini
Looks like we should now be able to add oslo.versionedobjects[fixtures]
to test-requirements.txt and remove it from tox.ini, so this commit does
that.

Change-Id: I420ea16d8ad6d883e7c2c8de80f912ea35500367
2016-09-28 18:31:49 +02:00
David Sariel
14e1c1ffa5 Updated from global requirements
The version of hacking should be the same as in [1]

[1] https://github.com/openstack/requirements/blob/master/global-requirements.txt#L391

Change-Id: Ia8ff6ad97b58cd1aa5124518d90112af9307ccb8
2016-09-28 18:26:20 +03:00
OpenStack Proposal Bot
d53f37db2b Updated from global requirements
Change-Id: I97ab435b5234e5a240b02e0874605463188375bd
2016-09-27 16:54:58 +00:00