Skip to content

Empty parameters list passes 'make lint', fails on import #9

Open
@LindsayHill

Description

@LindsayHill

If I have an action.yaml file like this:

name: action
runner_type: run-python
description: List Some Stuff
enabled: true
entry_point: action_script.py
parameters:

Then it will pass make lint, but it will fail when registering with an error similar to this:

Traceback (most recent call last):
  File "/usr/bin/st2-register-content", line 22, in <module>
    sys.exit(content_loader.main(sys.argv[1:]))
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 354, in main
    register_content()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 326, in register_content
    register_actions()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 195, in register_actions
    raise e
AttributeError: 'NoneType' object has no attribute 'iteritems'

It would be better if this error was detected when running make lint, rather than at registration time.

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