Commit Graph

8 Commits

Author SHA1 Message Date
Brian Haley 55b16d7b7c Fix some pylint indentation warnings
Running with a stricter .pylintrc generates a lot of
C0330 warnings (hanging/continued indentation). Fix
the ones in neutron/db.

Trivialfix

Change-Id: I9311cfe5efc51552008072d84aa238e5d0c9de60
2022-11-03 19:50:54 -04:00
Bernard Cafarelli cebdd77af8
Bump pylint version to support python 3.8
As spotted in Focal testing patch [0], pep8 test fails with many
C0321 false-positives, reported in pylint as current version does not
support python 3.8 [1]

Use a newer version of pylint and astroid, fixing or disabling some of
the new checks: no-else-*, unnecessary-comprehension, import-outside-toplevel

[0] https://review.opendev.org/#/c/738163/
[1] https://github.com/PyCQA/pylint/issues/2737

Change-Id: Ie646b7093aa8634fd950c136a0eba9adcf56591c
2020-08-06 16:00:30 +02:00
Brian Haley fc95db987d Fix flake8 N534 untranslated exception message
Fix N534 untranslated exception message warnings and
enable enforcement.

Trivialfix

Change-Id: I9e2b51c768cbb6fcf5588070d1b9e9835775b374
2018-10-19 15:46:04 -04:00
Henry Gessau e8ac4b402a Revert "Support unique labels for alembic branches"
A problem was found with the --expand (and --contract) options, see the bug report. I am reverting this patch so that I can redo it and have one single patch that can be back-ported.

Closes-Bug: #1599574

This reverts commit 88359e3fe9.

Change-Id: Iebca469c6fec32bac0480be6627ad5e9dedaad9d
2016-07-06 16:51:04 +00:00
Henry Gessau 88359e3fe9 Support unique labels for alembic branches
We plan to have all projects that integrate with Neutron use the same
alembic environment (Neutron's) instead of having a separate alembic
env.py in each repo. This means that each project will need to label
their contract and expand branches uniquely.

With this patch we add support for branch labels of the form
  'networking-foo-contract'
  'networking-foo-expand'

We also support the old labels ('contract' and 'expand') with the
intent of backporting this patch to Mitaka so that projects can be
backwards compatible when they update their alembic branch labels. A
best effort will be made to backport this patch to Liberty also.

Support has been removed for label names starting with a "liberty_"
prefix. Such labels temporarily existed during the Liberty cycle but
have now all been cleaned up.

Partial-Bug: #1497830

Change-Id: Ibf38b3125d5d404d57f3e8ef0c7ecfa56eaf8042
2016-07-01 12:05:38 -04:00
Henry Gessau 65bd0cd9ff Complete removing support for unsplit alembic branches
We used to support subprojects with a single alembic branch.
Now the plan is to switch to a single alembic env for Neutron
and all installed subprojects. In a single alembic env, all
subprojects must use split (contract and expand) alembic branches.

The first step of removing single branch support was done in [1]
where we removed support for single HEAD files.

The --split_branches option was used by developers only. By removing
it we do not break any subproject, but force them to use split
branches for any new migration scripts.

[1] https://review.openstack.org/295905

Partial-Bug: #1497830

Change-Id: I62a191e1d22a1af4061c25fdc4a8df965d585419
2016-06-21 17:04:11 -04:00
Ihar Hrachyshka 6210d28424 Support new mitaka directory with revisions
Also, don't initialize a new 'per-release' directory with new revisions
that have branch labels because we don't maintain per release labels
anymore.

Change-Id: I3a875e239602147d82d28994788c3409d64d6992
2015-09-30 18:58:52 +02:00
Mike Bayer 6576bea07c Implement expand/contract autogenerate extension
Makes use of new Alembic 0.8 features to allow
altering of the "alembic revision" stream such
that operations for expand and contract are
directed into separate branches.

Change-Id: Ifa743e2f5b90e59a8de8f4e7a67c4bbe46686804
Partially-Implements: blueprint online-schema-migrations
2015-09-08 17:22:59 -04:00