charm-build applies layers in incorrect order #218

Closed
johnsca opened this Issue Jun 8, 2016 · 1 comment

Comments

Projects
None yet
2 participants
Member

johnsca commented Jun 8, 2016

Checklist

  • Confirmed this is an issue with charm-tools, not charmstore-client
  • Provide versions of tools used
  • Described the feature or ways to replicate the issue

What version am I running?

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

charm error
charm-tools 2.1.2

I am using: Ubuntu (trusty)

Issue/Feature

When building, base layers can get applied in the incorrect order.

I expect/expected the following

Given the following set of includes:

ubuntu@0f0e62f4cb6a:~/charms/layers$ grep include layer-bottom/layer.yaml layer-middle/layer.yaml layer-top/layer.yaml 
layer-bottom/layer.yaml:includes: ['layer:basic']
layer-middle/layer.yaml:includes: ['layer:layer-bottom']
layer-top/layer.yaml:includes: ['layer:layer-middle']

I expect the layers to be applied in the order: basic, layer-bottom, layer-middle, layer-top.

What I got

ubuntu@0f0e62f4cb6a:~/charms/layers/layer-top$ charm build -r
build: Composing into /home/ubuntu/charms
build: Destination charm directory: /home/ubuntu/charms/trusty/layer-top
fatal: Not a git repository (or any parent up to mount point /home/ubuntu/charms)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
bzr: ERROR: Not a branch: "/home/ubuntu/charms/layers/layer-top/".
build: Please add a `repo` key to your layer.yaml, with a url from which your layer can be cloned.
build: Processing layer: layer:basic
build: Processing layer: layer:layer-middle
build: Processing layer: layer:layer-bottom
build: Processing layer: layer-top
build: 
build: ---------------------------------------
build:               Build Report
build: ---------------------------------------
build: New build; all files were modified.

Note layer-middle was applied before layer-bottom

@johnsca johnsca added the charm-build label Jun 8, 2016

Member

johnsca commented Jun 8, 2016

This is a regression in 87c26dc due to the change in order of fetch() and append().

johnsca added a commit to johnsca/charm-tools that referenced this issue Jun 8, 2016

johnsca added a commit to johnsca/charm-tools that referenced this issue Jun 8, 2016

johnsca added a commit to johnsca/charm-tools that referenced this issue Jun 8, 2016

@johnsca johnsca referenced this issue Jun 8, 2016

Merged

Fix the order of fetch vs append (fixes #218) #219

4 of 4 tasks complete

@marcoceppi marcoceppi closed this in #219 Jun 8, 2016

marcoceppi added a commit that referenced this issue Jun 8, 2016

#219: Fix the order of fetch vs append (fixes #218)
Fixes #218 by ensuring that a layers deps are (recursively) appended to the list before itself. This fixes a regression from 87c26dc

@marcoceppi marcoceppi modified the milestones: 2.1.3, 2.1.PATCH Jun 8, 2016

marcoceppi added a commit that referenced this issue Aug 22, 2016

#219: Fix the order of fetch vs append (fixes #218)
Fixes #218 by ensuring that a layers deps are (recursively) appended to the list before itself. This fixes a regression from 87c26dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment