StackStorm / StackStorm/st2

Pack Install should be Idempotent

Open
#3,052 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

complexity:hard enhancement
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Current st2 pack install always re-downloads and re-installs the pack, no matter what.

If pack is already installed - we shouldn't reinstall it again, unless some special flag or command specified. Re-downloading/re-installing by default takes time and in fact, it's upgrade (if no version is pinned) or maybe reinstall (if version specified).

Example story is configuration management tools, when you apply playbook/cookbook on a set of machines. Apart of deploying st2, it for example can install a bunch of st2 packs (10-20) on the same machine. And it's normal to run playbook on the same machine several times. Re-downloading/Re-installing packs every time takes time and it's a waste of resources and doesn't guarantee successfull execution every time.

See related discussion https://github.com/StackStorm/st2/pull/2982#discussion_r89614083

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the st2 pack install command and review the related discussion in PR #2982. Trace how an already-installed pack is handled, including pinned and unpinned versions. Done means repeated installs avoid unnecessary downloads and installation by default, while the specified upgrade or reinstall behavior remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.