`charm` path defined tests/bundles/<bundle>.yaml enforces outer directory name

Bug #1899052 reported by Martin Kalcok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph OSD Charm
Triaged
Low
Unassigned

Bug Description

Functional test bundles in tests/bundles/<bundle>.yaml define path to the charm in a way that hard-codes the outer directory in which the charm code is located.

excerpt from bionic-queens.yaml:

series: bionic
applications:
  ceph-osd:
    charm: ../../../ceph-osd

This means that if outer directory of ceph-osd code is not called 'ceph-osd' the functional tests will fail/hang with message:

2020-10-08 14:26:17 [INFO] ERROR cannot deploy bundle: the provided bundle has the following errors:
2020-10-08 14:26:17 [INFO] charm path in application "ceph-osd" does not exist: /home/ubuntu/charm-dev/charm-ceph-osd/tests/bundles/../../../ceph-osd

Steps to reproduce:
* clone ceph-osd charm repository https://opendev.org/openstack/charm-ceph-osd/
* cd ./charm-ceph-osd
* tox -e func
* functional tests will hang with the error above

Proposal: rather than going 3x up, and then back into `ceph-osd/`, can't we just go 2x up ?

Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

I think this is done this way so that it works as well with reactive charms, i.e. charms that require to be built with 'tox -e build'. In this case the built charm ends up in build/... and the path "3 levels up, one level down" also magically works there.

I agree that this is a problem with at least all classic charms as the git repo name is different from the charm name and this hits every single new joiner.

Changed in charm-ceph-osd:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.