jacebrowning / jacebrowning/gitman

Gitman ignores groups on nested gitman install runs

Open
#222 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Python
Stars
225
Forks
36
Avg merge
15h 47m
Merged PRs (30d)
8

Description

We have just decided to switch from an inhouse developed, almost identical tool, to gitman. But I've stumbled across what seems to be a bug, during my initial testing:

Given a gitman.yml file that looks like this:

```yaml
location: .gitman
sources:
# Production sources
- name: tf-module-production
link: tf-module
repo: git@githost:tf-module.git
rev: 1.2.0
# Dev sources
- name: tf-module-dev
link: tf-module
repo: git@githost:tf-module.git
rev: master
groups:
- name: production
members:
- tf-module-production
- name: dev
members:
- tf-module-dev
```
I expect that I end up with a directory looking like this, if I do a `gitman install dev`:

```
├── .gitman
├── .gitman.yml
└── tf-module -> .gitman/tf-module-dev
```

And if I do a `gitman install production`:

```
├── .gitman
├── .gitman.yml
└── tf-module -> .gitman/tf-module-production
```
This works - so far so good.

But if my tf-module contains a gitman.yml file with a similar structure and I run `gitman install production`, gitman actually installs all the sources, linking for each source, and it seems like I end up with the dev sources (so I end up with the master branches). I guess that gitman doesn't honour the groupname in the subsequent gitman install calls...?

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

Reproduce the nested gitman.yml setup and run `gitman install production` from the outer project, then inspect the `gitman install` command's handling of group names during recursive installs. Done means the nested project installs only the sources in the selected production group rather than all sources or the dev revision.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.