charm-tools icon indicating copy to clipboard operation
charm-tools copied to clipboard

charm-build should not build for unsupported series

Open mbruzek opened this issue 8 years ago • 0 comments

Checklist

  • [X] Confirmed this is an issue with charm-tools, not charmstore-client
  • [X] Provide versions of tools used
  • [X] 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 2.1.1-0ubuntu1
charm-tools 2.1.2

I am using: Ubuntu

Issue/Feature

I was able to charm build --series precise without any errors or warnings that the layer does not support that series. The metata.yaml file clearly listed: trusty, wily, and xenial only.

I expect/expected the following

I expected an Error when I attempt to build a charm for a unsupported series. Even a warning would have been nice.

What I got

The charm built with precise series but was unable to deploy:

mbruzek@warhorse:~/workspace/layers/docker$ charm build -r --series precise
build: Composing into /home/mbruzek/workspace/charms
build: Destination charm directory: /home/mbruzek/workspace/charms/precise/docker
build: Processing layer: layer:basic
build: Processing layer: docker
build: 
build: ---------------------------------------
build:               Build Report
build: ---------------------------------------
build: New build; all files were modified.
proof: I: no hooks directory
proof: I: relation dockerhost has no hooks
proof: I: missing recommended hook install
proof: I: missing recommended hook start
proof: I: missing recommended hook stop
proof: I: missing recommended hook config-changed

bruzek@warhorse:~/workspace/charms$ juju deploy ./precise/docker --to 1
ERROR cannot add application "docker": cannot deploy to machine 1: series does not match
mbruzek@warhorse:~/workspace/charms$ juju deploy --series precise ./precise/docker --to 1
ERROR series "precise" not supported by charm, supported series are: trusty,wily,xenial. Use --force to deploy the charm anyway.

mbruzek avatar Jul 25 '16 16:07 mbruzek