# Any chance for a 'stable' Ansible branch in main GitHub repository?

**URL:** <https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [October 2, 2014, 1:27pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403 "2014-10-02T13:27:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![drybjed](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@drybjed](https://forum.ansible.com/u/drybjed)\
**Post date:** [October 2, 2014, 1:27pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/1 "2014-10-02T13:27:09Z")

</div>

Hello,

I'm testing my Ansible roles (58 at the moment) on Travis-CI using RoleSpec  
framework ([https://github.com/nickjj/rolespec/](https://github.com/nickjj/rolespec/)). Testing is currently done  
by cloning Ansible from its main GitHub repository and enabling "hacking  
environment", which takes about 5 seconds.

During development I tend to use Ansible 'devel' branch to get the latest  
features that are implemented in the project, and also to be two steps ahead  
of possible bugs in Ansible code, which my project is very dependent upon.  
Having a heads up on possible bugs and easy way to find them (by using  
git bisect) and help fix them is very useful.

Recent changes in Ansible code have hindered me somewhat in that regard. For  
example, currently 'ansible-galaxy' is broken on "devel" branch:

#v+  
$ ansible-galaxy -p roles install debops.secret  
- downloading role 'secret', owned by debops  
- downloading role from [https://github.com/debops/ansible-secret/archive/.tar.gz](https://github.com/debops/ansible-secret/archive/.tar.gz)  
- error: failed to download the file.  
- debops.secret was NOT installed successfully.  
- you can use --ignore-errors to skip failed roles.  
#v-

Or, for some reason, "npm" is an invalid parameter:

#v+  
$ debops applications -l helios  
Running Ansible playbook from:  
/home/drybjed/.local/share/debops/debops-playbooks/playbooks/applications.yml ...  
ERROR: npm is not a legal parameter in an Ansible task or handler  
#v-

Solving these issues on my workstation to for example bypass them for the time  
being is simple - I just switch to current stable branch, v1.7.2, for a while  
and check back the next day.

But the same cannot be said about automated tests (for example on Travis), and  
I don't mean that it can't be done. I can still tell the build script to  
switch to current stable Ansible version, v1.7.2, and it will work fine.

The problem I have is lack of a "stable" branch in Ansible git repository.  
When next stable Ansible is released, I will need to modify build scripts to  
point to current stable Ansible release, v1.8.0. And the same for next stable  
release, and so on, and so on.

I think that having a "stable" branch in main Ansible git repository which  
would be placed at current stable release (v1.7.2) and moved to next stable  
release when it arrives, would benefit greatly many use cases where cloning  
Ansible from git repository from a stable version is more useful than setting  
up APT PPA, namely for role and module tests. With "stable" branch it would be  
easy to create two-phase tests, first one on stable branch and second one on  
devel branch. And the upkeep of those tests on new Ansible stable releases  
would be minimized.

Are there any plans to create "stable" branch in Ansible git repository,  
alongside current "devel" branch?

Maciej

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [October 2, 2014, 2:41pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/2 "2014-10-02T14:41:24Z")

</div>

Hi Maciej,

That error is interesting, as we had fixed that on Tuesday of this week - if you’re still seeing that can you verify you’re using the latest commit from devel?

---

<div class="post-metadata">

**Author:** ![drybjed](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@drybjed](https://forum.ansible.com/u/drybjed)\
**Post date:** [October 2, 2014, 3:02pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/3 "2014-10-02T15:02:00Z")

</div>

Sure. Just did a clean recursive clone of current devel (commit  
43eb821d3f6564fad6bac78cd420d7ddd1f65a3c) and previous errors are still here:

#v+  
$ debops applications -l helios  
Running Ansible playbook from:  
/home/drybjed/.local/share/debops/debops-playbooks/playbooks/applications.yml ...  
ERROR: npm is not a legal parameter in an Ansible task or handler

$ ansible-galaxy -p roles install debops.secret  
- downloading role 'secret', owned by debops  
- downloading role from [https://github.com/debops/ansible-secret/archive/.tar.gz](https://github.com/debops/ansible-secret/archive/.tar.gz)  
- error: failed to download the file.  
- debops.secret was NOT installed successfully.  
- you can use --ignore-errors to skip failed roles.  
#v-

maciej

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 2, 2014, 8:54pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/4 "2014-10-02T20:54:33Z")

</div>

Ansible will not be keeping a seperate branch named “stable”

We use the development branch for development (ha), and then branch of each release, which are each “stable”.

We also tag each release.

It might be useful for you to find the last tag that starts with “v”, and checkout at that tag.

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [October 2, 2014, 8:58pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/5 "2014-10-02T20:58:15Z")

</div>

> Ansible will not be keeping a seperate branch named "stable"

​Why?  
​

> We use the development branch for development (ha), and then branch of  
> each release, which are each "stable".  
> We also tag each release.

​TBH, I always found that counterintuitive, to have both a branch and a tag  
pointing to a minor branch.  
​

> It might be useful for you to find the last tag that starts with "v", and  
> checkout at that tag.

​That's an ugly hack.​

​ Serge​

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [October 2, 2014, 8:59pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/6 "2014-10-02T20:59:19Z")

</div>

FYI, I’ve been using ansible daily with current devel checkout for 2+ yrs, its only broken 4 times (once by me) as they don’t instamerge requests and even then was normally fixed within the hour.

Brian Coca

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 2, 2014, 9:02pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/7 "2014-10-02T21:02:37Z")

</div>

> > Ansible will not be keeping a seperate branch named "stable"
> 
> ​Why?  
> ​
> 
> > We use the development branch for development (ha), and then branch of  
> > each release, which are each "stable".  
> > We also tag each release.
> 
> ​TBH, I always found that counterintuitive, to have both a branch and a  
> tag pointing to a minor branch.

Tags are specifically interesting milestone events.

If there are going to be other tags, the versions ought to be tags.

> ​
> 
> > It might be useful for you to find the last tag that starts with "v", and  
> > checkout at that tag.
> 
> ​That's an ugly hack.​

It solves his problem without any change in process, so I think it's nice  
that we were able to offer something.

---

<div class="post-metadata">

**Author:** ![drybjed](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@drybjed](https://forum.ansible.com/u/drybjed)\
**Post date:** [October 2, 2014, 9:04pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/8 "2014-10-02T21:04:38Z")

</div>

> Ansible will not be keeping a seperate branch named "stable"
> 
> We use the development branch for development (ha), and then branch of each  
> release, which are each "stable".

Of course "stable" name is just a suggestion on my part. For example, GitLab  
flow suggests "production" for a branch with similar concept.

> It might be useful for you to find the last tag that starts with "v", and  
> checkout at that tag.

OK, so that would essentially be:

&nbsp;&nbsp;&nbsp;&nbsp;git checkout $(git tag -l | grep "^v" | sort -nr | head -n 1)

versus:

&nbsp;&nbsp;&nbsp;&nbsp;git checkout stable

Not counting the submodule updates.

Maciej

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 2, 2014, 9:07pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/9 "2014-10-02T21:07:56Z")

</div>

Correct. Now it sounds like you can do:

[http://stackoverflow.com/questions/5471174/git-move-branch-pointer-to-different-commit](http://stackoverflow.com/questions/5471174/git-move-branch-pointer-to-different-commit)

Though that seems a little squirley, and a maybe (though I’m being a bit paranoid) a bit dangerous.

I also don’t really want to encourage submitting bugfixes to stable, we always cherry pick from devel.

So I think forcing the cognitive selection of what version you are running - and deciding when you wish to upgrade - may be wise.

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [October 2, 2014, 9:09pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/10 "2014-10-02T21:09:51Z")

</div>

​Exactly. And tags often are that within a major branch,  
Looking at the history, it makes sense to have e.g. a 1.7 branch, but not  
separate branches for the minor releases.​  
Once you have a 1.7.2, you wont work on 1.7.1 any more.

Pardon my ignorance, but I still don't see nor got an answer on what the  
problem with a 'stable' branch would be?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 2, 2014, 9:14pm UTC](https://forum.ansible.com/t/any-chance-for-a-stable-ansible-branch-in-main-github-repository/16403/11 "2014-10-02T21:14:30Z")

</div>

You never know. We’re going to keep them around and they aren’t hurting anything.

“Pardon my ignorance, but I still don’t see nor got an answer on what the problem with a ‘stable’ branch would be?”

Because there are easy workarounds and it’s not important? 🙂
