Currently doc jobs are broken because the latest sphinx 7.2.0 is not
compatible with the latest release of openstackdocstheme.
This updates the docs/releasenotes target to use the global upper
constraints to avoid that issue.
Change-Id: I7eef81e2cfc2156dd8aa076e09de4904dda6eb9a
tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~
According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293
Change-Id: I5db68dc1ca25626d7f50c2fa9319896721c08d3d
tox.ini started failing with Tox4 which had some
incompatible changes. One of them is due to the
skipsdist = True.
This also adds setup-vault-env.sh to allowlist_externals, since it
fails otherwise.
Change-Id: If0ace2c2ef0915d9a4ffcba99d664ffe97621b12
Tests periodically fail right now because the cleanup which is
running in a different thread sometimes removes the managed objects
before we have completed testing with them. The change to use
concurrency=1 will slow down the tests, but also make them more
consistent.
Also, when things are not cleaned up, you can get false positive
results if multiple objects contain the same content. This will
fix this problem by making the contents unique.
Change-Id: Ic2b9e6afe9371dbe135e90fa6df36a8e91921556
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.
Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.
pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)
For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks
Change-Id: I35e092c472e5d564ebc9bb6c2a4f6d40b54ff120
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
This repo is now Python 3, update:
- Remove python 2.7 stanza from setup.py
- Remove install_command from tox.ini, the default is fine
- Remove Babel from requirements, it's not needed for running.
- Use TOX_CONSTRAINTS_FILE instead of obsolete UPPER_CONSTRAINTS_FILE.
- Use py36 for fault test
Change-Id: Ia23841a4899361178994e349e1323de857b4ee23
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: I0bd1180719e4e093a24bc53424052354ad1cd900
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Coverage tests seems to be broken on a fresh clone of castellan.
Copying the coverage config from Oslo.Config repo.
Change-Id: I9a01313d3d1d95726372d5d5f2ac8ab5c3cd13dc
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
This patch adds a `pdf-docs` tox target that will build
PDF versions of our docs. As per the Train community goal:
https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html
Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt
to convert our SVGs.
This PR also introduces the docs testenv and a doc
requirements.txt file.
Change-Id: If782737efe7114422be9cc3fc586500a2065f07e
Story: 2006072
The Vault functional tests are currently failing in the gate, and it
appears to be because the unzip binary is not present. We need to
add it to bindep so it will be installed before running tests.
Change-Id: I4b8075429218a494f75f5e3611f48927d18f1700
Closes-Bug: 1840061
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')
Change-Id: I7e3f0bf2f5999cc0f4b54f68da33debccf077f43
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I644c28acb04451113849691cd64c209258cef7d7
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: I0980a08f35965292a705ad7299cfdc9a433dfc87
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Update the list of default virtualenvs that are run when a developer
just runs "tox" without specifying an environment.
Change-Id: I38caffbc10c2c8c559212e371baee9d3272f8864
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Set the default python to python3 except for the py27 environment. We
have to set that explicitly to override the new default.
Change-Id: I64799bb18c6c5848d23378e163481ad0fe1eea2b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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: Iee4a31b43f1f60410892e25d4e33ce63a620a95b
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I11127d4cc7263ced57309952b71df1c7813f57d6
* Uses https://www.vaultproject.io/ to store/fetch secrets
* All we need is the URL and a Token to talk to the vault server
* tox target "functional-vault" sets up a server in development mode
and runs functional tests
* Supports both http:// and https:// url(s)
* the https support was tested by setting up a vault server by hand
(https://gist.github.com/dims/47674cf2c3b0a953df69246c2ea1ff78)
* create_key_pair is the only API that is not implemented
Change-Id: I6436e5841c8e77a7262b4d5aa39201b40a985255
Some of the available checks are diskabled by default, like:
[H106] Don't put vim configuration in source files;
[H203] Use assertIs(Not)None to check for None.
Change-Id: Ibe4e8bb6373def06452ae6fc9ca16a99a8a05f29
Since the castellan itself is in upper-constraints.txt now,
in CI job, we should remove it from the constraints file before applying it,
otherwise pip will fail due to castellan version conflict.
Change-Id: I5d58303b7f76e0e92083e14d3cff009c02c9fc14
Closes-bug: #1614361
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: I667af65814350664bb5cd75f79ad3ac1b56130a1
This change is being proposed as part of the OpenStack Security Project
working session at the Austin 2016 summit. It adds support for running
the bandit[1] security linting tool against the Castellan codebase.
This change adds a targetted environment for bandit and also adds
bandit as part of the pep8 job.
The bandit configuration has been tailored to exclude tests that are
currently producing warning against the codebase. These issues will be
followed up with bug reports and patches.
At the time of submission, Castellan passes all Bandit tests configured
in tox.
[1]: https://wiki.openstack.org/wiki/Security/Projects/Bandit
Change-Id: I19368d3440ad5dc862e7d91f7890f9b1901fced3
As of mitaka, the infra team won't have the resources available to
reasonably test py26, also the oslo team is dropping py26 support
from their libraries. sine we rely on oslo for a lot of our work,
and depend on infra for our CI, we should drop py26 support too.
Change-Id: I4db3fb61038377bc96e47ac160a2da1652901a1b
Related-Bug: #1519510
Allows us to set a breakpoint in code, using pdb.set_trace().
Documentation on how to debug has also been added.
Change-Id: I34bde581ce331b2eb63e4dab08e9f9c597598bf1
This change adds a module for listing configuration options and setting
their defaults. It also changes the key manager base class to
incorporate a configuration during creation. By default, the key manager
will continue to use the global CONF object from the oslo.config
package.
For the most part, this change will be backwards compatible. The one
exception is the creation of sample configuration files. Previously,
importing castellan was sufficient to add these options to the global
configuration object. Now, these options will need to be applied by
using the castellan.options.list_opts function, or adding them through
other means, to create sample configuration files. Similar applies for
setting configuration before instantiating a key manager.
changes
* adding castellan.options with list_opts and set_defaults functions
* changing KeyManager abc to include a configuration option to __init__
* changing barbican and not_implemented key managers to accept
configuration parameters
* adding tests for set_defaults function
* fixing barbican tests to accomodate new configuration parameter
* adding documentation about configuration usage
* adding castellan configs to oslo entry point in setup.cfg
* adding a genconfig target to tox for producing a sample castellan
configuration file
* adding the sample configuration file to the git ignore
* renaming barbican option api_version to barbican_api_version
Change-Id: I86d6d7d49a893beaae6f311060ec593e0482d889
Implements: blueprint improved-configuration-options
Remove the specification in tox.ini that _ is a builtin so that
it will no longer assume that _ does not need to be imported.
This helps ensure that the _ from i18n is used.
Activating this check did not flag any violations.
Change-Id: Ibb45131025bb64feb26d3c2fd596fe2b07c0b889
Creates the initial functional testing infrastructure for Castellan.
Functional tests are run using:
tox -e functional
The Barbican wrapper tests require running local Barbican and Keystone
instances.
The functional testing config parameters can be overwritten by creating a
config file at /etc/castellan/castellan-functional.conf. A sample config
can be generated using:
tox -e genconfig
The generated sample config can be found at etc/castellan/castellan-functional.conf
Implements: blueprint add-barbican-key-manager
Change-Id: Ideb9b1f01e51d85ff56575d8ab6ac970053a9604