Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

st2sdk bootstrap ${pack_name} is broken. #18

Open
lakshmi-kannan opened this issue Sep 15, 2017 · 2 comments
Open

st2sdk bootstrap ${pack_name} is broken. #18

lakshmi-kannan opened this issue Sep 15, 2017 · 2 comments
Labels

Comments

@lakshmi-kannan
Copy link
Contributor

st2sdk bootstrap ${pack_name} creates version as "0.1". This breaks pack registration.

Also, description is left to "" which also breaks pack registration.

@lakshmi-kannan
Copy link
Contributor Author

2017-09-15 07:35:30,252 WARNING [-] Failed to register sensors: Failed to register pack "lib_test": Pack version "0.1" doesn't follow a valid semver format. Valid versions and formats include: 0.1.0, 0.2.1, 1.1.0, etc.

'0.1' does not match '^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?$'

Failed validating 'pattern' in schema['properties']['version']:
  1 ---
    {'description': 'Pack version. Must follow the semver format (for instance, "0.1.0").',
     'pattern': '^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?$',
     'required': True,
     'type': 'string'}

On instance['version']:
    '0.1'
Traceback (most recent call last):
  File "./st2common/bin/st2-register-content", line 22, in <module>
    sys.exit(content_loader.main(sys.argv[1:]))
  File "/mnt/src/storm/st2/st2common/st2common/content/bootstrap.py", line 388, in main
    register_content()
  File "/mnt/src/storm/st2/st2common/st2common/content/bootstrap.py", line 335, in register_content
    register_triggers()
  File "/mnt/src/storm/st2/st2common/st2common/content/bootstrap.py", line 145, in register_triggers
    raise e
ValueError: Failed to register pack "lib_test": Pack version "0.1" doesn't follow a valid semver format. Valid versions and formats include: 0.1.0, 0.2.1, 1.1.0, etc.

'0.1' does not match '^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?$'

@Kami
Copy link
Member

Kami commented Sep 18, 2017

Let's please also add test for this so we prevent such issues in the future.

We should be able to utilize "pack and resource register" check have on st2contrib / StackStorm-Exchange - https://github.com/StackStorm-Exchange/ci/blob/master/.circle/Makefile#L44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants