Skip to content

Conversation

@jinpingh
Copy link
Contributor

@jinpingh jinpingh commented Jul 16, 2019

First part of Fixes StackStorm/discussions#354.
If pack version is not specified, install the latest version from pack index.json (https://index.stackstorm.org/v1/index.json), otherwise install from master branch as today.
Note: Direct github/repo install is not considered an Exchange index hit, therefore it is not covert by this fix.

Closes #4384

@m4dcoder
Copy link
Contributor

m4dcoder commented Jul 16, 2019

Have you actually test this change on a pack at GitHub with a tag? If so, can you post the output here? Thanks.

@arm4b
Copy link
Member

arm4b commented Jul 16, 2019

Also closes #4384 (#4384 (comment))

@arm4b arm4b added this to the 3.2.0 milestone Jul 16, 2019
@jinpingh
Copy link
Contributor Author

Have you actually test this change on a pack at GitHub with a tag?

Yes.

@m4dcoder
Copy link
Contributor

@jinpingh Can you post the output here for test against a real pack? Thanks.

@jinpingh
Copy link
Contributor Author

jinpingh commented Jul 16, 2019

(virtualenv) vagrant@ubuntu-xenial:/opt/stackstorm/packs/jira$ st2 pack install digitalocean

For the "digitalocean" pack, the following content will be registered:

rules     |  0
sensors   |  0
triggers  |  0
actions   |  14
aliases   |  0

Installation may take a while for packs with many items.

        [ succeeded ] download pack
        [ succeeded ] make a prerun
        [ succeeded ] install pack dependencies
        [ succeeded ] register pack

+-------------+--------------------------------------------------------+
| Property    | Value                                                  |
+-------------+--------------------------------------------------------+
| name        | Digital Ocean                                          |
| description | st2 content pack containing Digital Ocean integration. |
| version     | 0.3.2                                                  |
| author      | StackStorm, Inc.                                       |
+-------------+--------------------------------------------------------+

(virtualenv) vagrant@ubuntu-xenial:/opt/stackstorm/packs/digitalocean$ git log
commit fe5af6713d6eeb85ad290b1132df214f0c2f85f8
Author: Kirill Izotov <[email protected]>
Date:   Fri Oct 27 14:55:05 2017 +0700

    Remove deprecated st2actions import

commit 154f3c63e7f4d9de7db631fc604e195a330ec7e9
Merge: 5459ac3 f5dc8a1
Author: Tomaz Muraus <[email protected]>
Date:   Mon Jul 17 07:40:46 2017 +0200

    Merge pull request #3 from nmaludy/master

    Convert results from digitalocean objects to dicts and lists

First part of Fixes StackStorm/discussions#354.
If pack version is not specified, install the latest version from pack index.json (https://index.stackstorm.org/v1/index.json), otherwise install from master branch as today.

Note: Direct github/repo install is not considered an Exchange index hit, therefore it is not covert by this fix.
@jinpingh jinpingh force-pushed the issue-354/install-pack-latest-tag branch from c50c8c6 to 429e986 Compare July 18, 2019 18:16
Root cause: Value passed to arg_ref for `fake_commit` is `v0.4.0` after new code changes, but local `ref` is None. So it failed comparison at line https://github.com/StackStorm/st2/blob/c0458f1a06c2a81cac81697817c422ffb7631047/contrib/packs/tests/test_action_download.py#L523 and mocked `gitref` value is not returned.
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on finding the exact place for this change and fixing the old tests 👍

Please include a new dedicated test case that would cover and verify new behavior exclusively: st2 pack install will install latest stable release version/tag, taken from exchange index.

@jinpingh jinpingh force-pushed the issue-354/install-pack-latest-tag branch from 26ab318 to 219c9a2 Compare July 23, 2019 00:42
st2stanley
st2stanley approved these changes Jul 23, 2019
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Thanks for changes made!

@jinpingh jinpingh merged commit a68a6bf into master Jul 23, 2019
@jinpingh jinpingh deleted the issue-354/install-pack-latest-tag branch July 23, 2019 19:04
jinpingh added a commit to StackStorm/st2tests that referenced this pull request Jul 26, 2019
With new improvement code StackStorm/st2#4743, if pack version is not provided, the latest version for pack from index.json is installed.

Modify existing `e2e` test to check:
1. Install pack without version and check if the latest version for pack from index.json is installed.
2) install pack with version and check if the version specified is the version installed.
jinpingh added a commit to StackStorm/st2tests that referenced this pull request Jul 26, 2019
With new improvement code StackStorm/st2#4743, if pack version is not provided, the latest version for pack from index.json is installed.

Modify existing `e2e` test `tests.test_run_pack_tests_tool` to check:
1. Install pack without version and check if the latest version for pack from index.json is installed.
   `st2 pack install csv`
2) install pack with version and check if the version specified is the version installed.
   `st2 pack install xml=0.3.0
jinpingh added a commit to StackStorm/st2tests that referenced this pull request Jul 27, 2019
With new improvement code StackStorm/st2#4743, if pack version is not provided, the latest version for pack from index.json is installed.
Part of Fixes: https://github.com/StackStorm/discussions/issues/354
Modify existing `e2e` test `tests.test_run_pack_tests_tool` to check:
1. Install pack without version and check if the latest version for pack from index.json is installed.
   `st2 pack install csv`
2) install pack with version and check if the version specified is the version installed.
   `st2 pack install xml=0.3.0
m4dcoder pushed a commit to StackStorm/st2tests that referenced this pull request Aug 14, 2019
With new improvement code StackStorm/st2#4743, if pack version is not provided, the latest version for pack from index.json is installed.
Part of Fixes: https://github.com/StackStorm/discussions/issues/354
Modify existing `e2e` test `tests.test_run_pack_tests_tool` to check:
1. Install pack without version and check if the latest version for pack from index.json is installed.
   `st2 pack install csv`
2) install pack with version and check if the version specified is the version installed.
   `st2 pack install xml=0.3.0
arm4b pushed a commit to StackStorm/st2docs that referenced this pull request Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Efficient pack development at scale

5 participants