{"action":"created","issue":{"url":"https://api.github.com/repos/StackStorm/st2/issues/3020","repository_url":"https://api.github.com/repos/StackStorm/st2","labels_url":"https://api.github.com/repos/StackStorm/st2/issues/3020/labels{/name}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/3020/comments","events_url":"https://api.github.com/repos/StackStorm/st2/issues/3020/events","html_url":"https://github.com/StackStorm/st2/pull/3020","id":188975067,"number":3020,"title":"[WIP] Compatible version lookup and `pack register`","user":{"login":"emedvedev","id":145218,"avatar_url":"https://avatars.githubusercontent.com/u/145218?v=3","gravatar_id":"","url":"https://api.github.com/users/emedvedev","html_url":"https://github.com/emedvedev","followers_url":"https://api.github.com/users/emedvedev/followers","following_url":"https://api.github.com/users/emedvedev/following{/other_user}","gists_url":"https://api.github.com/users/emedvedev/gists{/gist_id}","starred_url":"https://api.github.com/users/emedvedev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emedvedev/subscriptions","organizations_url":"https://api.github.com/users/emedvedev/orgs","repos_url":"https://api.github.com/users/emedvedev/repos","events_url":"https://api.github.com/users/emedvedev/events{/privacy}","received_events_url":"https://api.github.com/users/emedvedev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-13T15:09:32Z","updated_at":"2016-11-13T15:17:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/StackStorm/st2/pulls/3020","html_url":"https://github.com/StackStorm/st2/pull/3020","diff_url":"https://github.com/StackStorm/st2/pull/3020.diff","patch_url":"https://github.com/StackStorm/st2/pull/3020.patch"},"body":"Two (unrelated) changes for pack management:\r\n\r\n#### Pack register\r\n\r\nNew pack register syntax @armab requested. `st2 pack register sensu github` should work, as well as `st2 pack register --types=rule`\r\n\r\n#### Version lookup for incompatible packs\r\n\r\nIf `stackstorm_version` is specified for a pack, and the installed StackStorm version isn’t compatible (e.g. you’re running 2.1, but the latest `sensu` pack has `stackstorm_version: >=2.2`), a lookup will be performed. \r\n\r\nStackStorm will look through other versions of the same pack with the following logic:\r\n \r\n1. If `stackstorm_version` is present and compatible, it’s considered a _strict match_ (explicitly guaranteed to work by the pack author). The most recent strict match will always be suggested to a user.\r\n\r\n2. If a previous version has no `stackstorm_version` parameter, it’s considered a _loose match_ (might be compatible or not). The most recent loose match will be suggested, but only if there’s no strict match, and there will be a warning that the version is not guaranteed to work.\r\n\r\n---\r\n\r\nThis is untested, and some parts are pretty much a boilerplate, but I’ll have a lot of other stuff next week, so I wanted to get this branch out there and announce what I’m trying to do here, so that someone could pick it up given spare cycles. \r\n\r\n@Kami: you can be that someone, but mostly just FYI :) We’ve discussed the version suggestions before."},"comment":{"url":"https://api.github.com/repos/StackStorm/st2/issues/comments/260192195","html_url":"https://github.com/StackStorm/st2/pull/3020#issuecomment-260192195","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/3020","id":260192195,"user":{"login":"codecov-io","id":8655789,"avatar_url":"https://avatars.githubusercontent.com/u/8655789?v=3","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2016-11-13T15:17:20Z","updated_at":"2016-11-13T15:17:20Z","body":"## [Current coverage](https://codecov.io/gh/StackStorm/st2/pull/3020?src=pr) is 76.49% (diff: 100%)\n> Merging [#3020](https://codecov.io/gh/StackStorm/st2/pull/3020?src=pr) into [master](https://codecov.io/gh/StackStorm/st2/branch/master?src=pr) will decrease coverage by **0.07%**\n\n```diff\n@@             master      #3020   diff @@\n==========================================\n  Files           428        428          \n  Lines         21891      21891          \n  Methods           0          0          \n  Messages          0          0          \n  Branches          0          0          \n==========================================\n- Hits          16759      16744    -15   \n- Misses         5132       5147    +15   \n  Partials          0          0          \n```\n\n| Diff Coverage | File Path |\n|---|---|\n| •••••••••• 100% | [st2client/st2client/commands/pack.py](https://codecov.io/gh/StackStorm/st2/pull/3020/compare#diff-737432636C69656E742F737432636C69656E742F636F6D6D616E64732F7061636B2E7079) |\n\n> Powered by [Codecov](https://codecov.io?src=pr). Last update [5efee11...c444f40](https://codecov.io/gh/StackStorm/st2/compare/5efee113f98ca3ad412b370c9f40e4607c4b8f47...c444f40f25eb97ef7af092c40f31be5baf26c58c?src=pr)"}}
{"actor":{"display_login":"codecov-io"}}