Skip to content

Empty hook causing deployment failure #125

@edward2a

Description

@edward2a

Hi, just run across this issue when testing a templated appspec.yml.

Apparently there is a for-each loop parsing the deployment hooks and when a hook is empty (say, it is there for reference), it fails with:
Error CodeUnknownError
Message undefined method `each' for nil:NilClass

I assume there is no validation of 'hook is nil' or 'hook is array' and yaml syntax validation is not likely to alert on this as 'mykey: ' is valid (please correct me here if I'm wrong here).

You could argue that non-used stuff should not be there, but that will require processing in the template building process to remove null value keys and, personally, I believe it would be easier to validate 'hook is array' before trying to execute it.

Just a thought.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions