Commit Graph

28 Commits

Author SHA1 Message Date
Alex Kavanagh d875ad61f0 Updates for caracal tox.ini
Update the tox.ini file(s) to use the constraints file from
zaza-openstack-tests.

Change-Id: I6f21a215e8149880c0e16ed747f1fc378359189e
2024-02-24 20:11:30 +00:00
Liam Young ea0c1da551 Fix charm for tox4 compatibility
Related-Bug: 2002788
Change-Id: I6dba64157cc7ad9468d15921f259b045a735341d
2023-01-17 14:56:01 +00:00
Corey Bryant 66c5f42350 Build separately for each supported series and use binary builds
Charms for OpenStack Yoga supports both Ubuntu Focal and Jammy
which means Python 3.8 and Python 3.10.  Managing dependencies
across those two versions is non-trivial and we need to build
the charm on the series the charm is supposed to support.

Switch to using a binary build which allows pip's dependency
resolution to work.

Change-Id: I1bf4aac08cf7388fec4550d40887a8df45927589
2022-09-30 16:53:55 +00:00
Corey Bryant 13211f092c Add Kinetic and Zed support
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml

Change-Id: I2c98ab0f82aa6d6d0a43365cee04d6da34a39ce4
2022-08-31 19:57:31 +01:00
Alex Kavanagh 19a65851c1 Updates to enable jammy and finalise charmcraft builds
- Add 22.04 to charmcraft.yaml
- Update metadata to include jammy
- Remove impish from metadata
- Update osci.yaml to include py3.10 default job
- Modify tox.ini to remove py35,py36,py37 tox target and add py310
  target.
- ensure that the openstack-origin is yoga

Change-Id: I3b005253025fa7ba2b0cdb918fe4134c44316cf0
2022-04-04 15:49:28 +01:00
Alex Kavanagh dc2b12cc33 Update to build using charmcraft
Due to a build problem with the reactive plugin, this change falls back
on overriding the steps and doing a manual build, but it also ensures
the CI system builds the charm using charmcraft.  Changes:

- add a build-requirements.txt
- modify charmcraft.yaml
- modify osci.yaml
    -> indicate build with charmcraft
- modify tox.ini
    -> tox -e build does charmcraft build/rename
    -> tox -e build-reactive does the reactive build
- modify bundles to use the <charm>.charm artifact in tests.
  and fix deprecation warning re: prefix
- tox inception to enable tox -e func-test in the CI

Change-Id: I8768cf21899108de80aa9f6cb7da9a91b91cdf9f
2022-02-01 19:55:42 +00:00
Corey Bryant bd4ac52168 Additional test updates
* drop trusty/xenial metadata and function tests
* switch to release-specific zosci functional tests
* switch to yoga zosci unit test job
* add py39

Change-Id: Icf909b3d01fdf374ab172fca2766fadd112b40bf
2021-11-17 14:44:19 -05:00
Alex Kavanagh 39be2957f7 Add xena bundles
- add non-voting focal-xena bundle
- add non-voting impish-xena bundle
- drop groovy-victoria bundle
- rebuild to pick up charm-helpers changes
- update tox/pip.sh to ensure setuptools<50.0.0

Change-Id: I2b8492b39c0f16d3b8646f4eb2b2211ec9f576a1
2021-09-28 18:18:17 +00:00
Aurelien Lourot 3f1ae3b8cc Sync release-tools
In order to fix ResolutionImpossible on tox invocation.

https://github.com/openstack-charmers/release-tools/issues/151
https://github.com/openstack-charmers/release-tools/pull/152

Change-Id: Iae88c66fcb21f82bdce127f8cb405d8bb9ebc2e1
2021-07-22 14:53:49 +02:00
Alex Kavanagh 68c99e78d5 21.04 libraries freeze for charms on master branch
* charm-helpers sync for classic charms
* build.lock file for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
  - ensure stable/21.04 branch for charms.openstack
  - ensure stable/21.04 branch for charm-helpers

Change-Id: I3cd7f19cfcaa23b46b2a064490ead713ed587789
2021-04-03 20:24:13 +01:00
Alex Kavanagh 4a54e9b3e5 Updates to pin charm-tools to 2.8.3
* Update requirements.txt to pin charm-tools to 2.8.3
* Update tox.ini to change the build parameters.
* This upgrades from <2.7 which adds reproducible charms
* Bug was fixed that controlled the default output directory
  doesn't get 'builds' appended.  The tox change puts it
  back so that stable & master both build to the same
  directory.  This may be reviewed in the future.

Change-Id: Ic1d783ea841da5ffe331006af1ceeacf06dbcbb7
2021-02-17 12:09:48 +00:00
Alex Kavanagh c88adb9dd1 Sync libraries & common files prior to freeze
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard

Change-Id: I5b232af01089555cbb80869ceee1e4bab90a79ea
2020-09-26 18:32:14 +01:00
Alex Kavanagh 0d8cdb3597 Release sync for 20.08
- Classic charms: sync charm-helpers.
- Classic ceph based charms:  also sync charms.ceph
- Reactive charms: trigger a rebuild
- sync tox.ini
- sync requirements.txt and test-requirements.txt

Change-Id: I195b4aece426c7dfd6cd112b9bfbd765eecfc8eb
2020-07-27 20:51:48 +01:00
Ryan Beisner 009b6f725d
Sync charm/ceph helpers, tox, and requirements
Change-Id: I2f17fe655d3c559f248cae1bea9a8b9c9da20ae0
2019-10-01 12:57:32 -05:00
Camille Rodriguez f10f67473d Add disco-stein bundle to gate tests
The bundle disco-stein was in the dev bundles because
a bug with the Python 3.7 syntax prevented the success of
the deployment of HA clusters. This bug is fixed, we can
reintegrate disco-stein in the gate bundles.

Other small additions:
- removing sitepackages in tox.ini to avoid test env pollution
- skip_missing_interpreters in tox.ini set to False to avoid false
positives by skipping missing interpreters.

LP Related-Bug: #1823718
Change-Id: I323b079ec538ebc2184724325fad00bbe2092e9b
2019-09-04 14:48:57 -04:00
Corey Bryant 26854f7540 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Note that python35-charm-jobs is retained since this charm is supported
on Xenial.

Change-Id: Ic63cbd7415aa6c0c13eb7c6f50dbf06430c7af9a
Story: #2005924
Task: #34228
2019-07-30 10:19:41 -04:00
Pete Vander Giessen fdc13811b0 Replace ostestr with stestr in testing framework.
A system upgrade broke ostestr. We can fix it by just calling stestr
directly.

Change-Id: I8d2c0a33d6c5c3c24837f39868587673dd3c10fd
2019-03-07 17:11:03 -05:00
Paul Goins de999c8676 Added tox environment for gathering coverage
This technique was borrowed from the tox "cover" environment in
openstack/nova's tox.ini.  This leverages the fact that stestr lets
you override the python executable via the PYTHON environment
variable.  Doing this allows us to easily generate coverage for our
unit tests.

An important caveat is that this does not provide any coverage for
tests via zaza, amulet, etc.  It is purely focused on the unit tests.

Note that this replaces the previous .coveragerc; coverage
configuration is instead pulled from tox.ini.

Change-Id: I5577fd1aa6eec095327e7872275862b6e5b0c473
2019-03-01 14:39:04 +01:00
Doug Hellmann 1fdfa3d46a fix tox python3 overrides
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: I3578e4ee55be9bda682c827e2c06b0d8d3256f3b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:37:59 -04:00
Nguyen Van Duc 3bbb11d796 Add py36 testenv
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to Transition Plan [1],
it'll be handy to have py36 testenv.

For more details, please check Python2 Deprecation Timeline [2]
and Python3-first Goal - Completion Criteria [3].

[1] https://wiki.ubuntu.com/Python/Python36Transition
[2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
[3] https://review.openstack.org/#/c/575933/8/goals/stein/python3-first.rst@42

Change-Id: I26da4e99834a0b289e63c3fe2d5f2783cb33af2f
2018-07-12 15:53:39 +07:00
Liam Young 9bee68d19d Add memcache as the coordinator backend
Both the zone and pool manager daemons require a coordination
backend to be configured when there is more than one worker. There
is almost always more than one worker as the charm user a multiplier
based on the number of cpus to configure the number of workes.

This change adds the coordinator-memcached relation and makes is
compulsory for designate deployments.

Change-Id: Ic1b35e33ba9b6f015b199c35ccff64d626c29582
2017-11-02 14:10:30 +00:00
Ryan Beisner 8dee1dadc9 Update tox.ini for py27 requirement
Reactive source charms are Python3-only, but have py27 unit tests
declared in project-config.

The Tox tool recently changed behavior.  It used to pass when a tox
target was missing commands.  Now it fails in that case.

This commit places a py27 no-op shim to allow gate tests to pass,
effectively restoring the original behavior for these py3x-only repos.

Change-Id: I014e6adfc9d2788df67d5b9252607fb8505de92e
Partial-Bug: 1642981
2016-11-28 18:21:06 -06:00
Ryan Beisner 3b801648fd Update tox.ini files from release-tools gold copy
All OpenStack Charms now contain identical tox.ini files,
not to be modified or made unique within each charm repo.

This is to ensure consistency across charm repos in tox
target naming, approach and purpose, also giving the
charm dev and test experience additional consistency.

Also create empty dirs with .keep files where necessary.
Some classic charms have actions and/or lib dirs, and some
do not. In all classic charms, flake will now check those
dirs to ensure lint coverage of existing or future content.

Resolve existing lint which was discovered by the updated
coverage.

Change-Id: I2fde6b6b0cc3c74c1e7a6acccf61d3df7cec8d75
2016-09-08 22:28:50 +00:00
Ryan Beisner 3fd2b6a0a4 Add .gitreview and clean up repo
Add src/README.md placeholder to prevent inheritence of the
base layer's readme file in the built charm.

Use the official charms.openstack repo in test-requirements.txt.

Use official designate-bind charm location in the Amulet tests.

Remove upload-and-publish so as not to encourage out-of-band
pushing and publishing.  That is handled by CI.

Fix a test filename typo.

Add tests readme.

Update tox.ini for Amulet environment variables.

Update metadata.yaml, removing EOL release and adding tags.

Fix unit tests

Change-Id: If842a5409c2d284bc118d70d6e8caba7cb6205c3
2016-07-22 12:01:10 +00:00
Liam Young be8cee7db2 Unit tests and lint fixes 2016-07-07 09:36:22 +01:00
Liam Young 23eb7e6fb2 Add ha interface 2016-05-11 06:37:30 +00:00
James Page 3dbd87905d Tidy lint 2016-02-11 12:12:17 +00:00
James Page 86ab342e02 Initial baseline 2016-02-11 10:03:13 +00:00