StackStorm / StackStorm/st2

Have st2 pack install checkout git submodules when cloning a pack repo

Open
#5,814 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

When a Pack is installed on Stackstorm using pack install - stackstorm performs a clone on the Repo (Code) - however this results in any submodules present in the repo not being checked out and only being an empty directory.

It would be useful if the clone_repo function also checked out any submodules that are present in the repo, as it would be helpful to add dependencies maintained in seperate repos to the pack as a submodule, while still being maintained externally.

In my use case a series of ansible playbooks are maintained in a seperate repo and I would like to also make them available as a pack to st2, and as I see it the best way to do that is via git submodules.

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 in st2common/st2common/util/pack_management.py at the clone_repo function and review the referenced pack installation path. Update the cloning behavior so repositories with Git submodules have those submodules checked out during pack installation, then verify that a pack containing a submodule is installed with its contents available.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
devops
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.