Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
charm-build should error if defining options for a non-existant layer #173
Comments
marcoceppi
added this to the 2.NEXT milestone
Apr 4, 2016
|
It appears I input the options wrong which raises a different issue. The layers options are not validating if we are even targeting an existing layer being used during the build process. the inheriting layer should have appeared as the following: options:
docker:
storage-driver: schenanigansAnd the providing layer to trigger was updated to: storage-driver:
type: string
enum: ['overlay', 'aufs', 'btrfs', 'zfs']
default: aufs
description: |
Used in conjunction with the storage volume in metadata.yaml.
Supported providers, when prompted, will allow you to mount a block
device, formatted for use with the storage driver configured here.The resulting output:
|
marcoceppi
added
the
charm-build
label
Apr 4, 2016
chuckbutler
changed the title from
json schema validation doesn't appear to be validating
to
charm build needs to validate if the user has targeted a valid layer being used in the build
Apr 4, 2016
chuckbutler
changed the title from
charm build needs to validate if the user has targeted a valid layer being used in the build
to
charm build needs to validate if the user has targeted a valid layer(s options) being used in the build
Apr 4, 2016
chuckbutler
changed the title from
charm build needs to validate if the user has targeted a valid layer(s options) being used in the build
to
charm-build should error if defining options for a non-existant layer
Apr 4, 2016
added a commit
to johnsca/charm-tools
that referenced
this issue
Apr 4, 2016
marcoceppi
closed this
in
134e860
Apr 4, 2016
added a commit
that referenced
this issue
Apr 4, 2016
added a commit
to mbruzek/charm-tools
that referenced
this issue
Apr 11, 2016
marcoceppi
modified the milestones:
2.1.PATCH,
2.NEXT
Apr 19, 2016
added a commit
that referenced
this issue
Apr 19, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chuckbutler commentedApr 4, 2016
When defining layer options according to JSON Schema, such as the following link describes: i would expect any inheriting layer, that defines an option that doesn't exist in the list to error during
charm buildGiven in the base layer:
And in the inheriting layer:
I expected during the build time, the base schema to be validated. ENUM type should have limited the values to those defined as valid: 'aufs', 'btrfs', 'zfs', or 'overlay' - anything outside of this pre-defined list when provided as a value should have actively prevented the build, or failed it, as it doesn't validate against the defined schema.