Skipping layers during build #268

Closed
ktsakalozos opened this Issue Oct 21, 2016 · 0 comments

Comments

Projects
None yet
1 participant

When building the ibm-was-base layer [0]
I noticed that one of the layers to be merged were missing.
ibm-was-base uses layer ibm-im [1] which in turn uses ibm-base [2]. ibm-im is missing.

This is what it is happening. We first fetch the ibm-im layer in a temp directory under deps/layer/ https://github.com/juju/charm-tools/blob/master/charmtools/fetchers.py#L134 . Then we rename that temp directory to the name of the layer https://github.com/juju/charm-tools/blob/master/charmtools/fetchers.py#L58 (ibm-im). The InterfaceFetcher will extract https://github.com/juju/charm-tools/blob/master/charmtools/build/fetchers.py#L99 the last part of the repo path, wihich based on the interfaces entry [3] will be trunk and will rename the deps/layer/ibm-im to
deps/layer/trunk https://github.com/juju/charm-tools/blob/master/charmtools/build/fetchers.py#L110
The next layer is ibm-base whose path also ends with trunk. Therefore it will overwrite the ibm-im layer already in the deps/layer/trunk .

Should the layers and interfaces be declared in a way in the http://interfaces.juju.solutions/ so that we do not overwrite them while fetching or should we handle this in the charm-tools?

[0] http://bazaar.launchpad.net/~ibmcharmers/charms/trusty/layer-ibm-was-base/trunk/view/head:/layer.yaml
[1] https://launchpad.net/~ibmcharmers/charms/trusty/layer-ibm-im/trunk
[2] https://code.launchpad.net/~ibmcharmers/layer-ibm-base/trunk
[3] http://interfaces.juju.solutions/layer/ibm-im/

What version am I running?

I ran the following command: charm version and got the following ouput:

charm 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2
charm-tools 2.1.4

I am using: Ubuntu Xenial

johnsca added a commit that referenced this issue Oct 21, 2016

@johnsca johnsca referenced this issue Oct 21, 2016

Merged

Fix fetched bzr layer output directory collision #269

4 of 4 tasks complete

johnsca added a commit that referenced this issue Oct 21, 2016

@marcoceppi marcoceppi closed this in #269 Oct 21, 2016

marcoceppi added a commit that referenced this issue Oct 21, 2016

#269: Fix fetched bzr layer output directory collision (fixes #268)
* Fixes #268 which causes any layer using bzr to collide with any other layer using bzr, with the result being that layers can be dropped, or the wrong code used entirely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment