baseline fails on detached head state

Bug #1530722 reported by Stanislaw Pitucha
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bandit
Fix Released
Undecided
Stanislaw Pitucha

Bug Description

Job http://logs.openstack.org/59/263059/1/check/gate-bandit-linters/e2a4714/console.html shows the issue: (slightly redacted)

+ timeout -s SIGINT 0 git fetch http://zm04.openstack.org/p/openstack/bandit refs/zuul/master/Zf5634ebf3b0f4c0785fb862780f66be5
+ git checkout FETCH_HEAD
+ git reset --hard FETCH_HEAD
+ git clean -x -f -d -q
/home/jenkins/workspace/gate-bandit-linters$ /home/jenkins/workspace/gate-bandit-linters/.tox/linters/bin/bandit-baseline -r bandit -ll -ii
Traceback (most recent call last):
  File ".tox/linters/bin/bandit-baseline", line 11, in <module>
    sys.exit(main())
  File "/home/jenkins/workspace/gate-bandit-linters/.tox/linters/local/lib/python2.7/site-packages/bandit/bandit_baseline.py", line 66, in main
    branch = repo.active_branch
  File "/home/jenkins/workspace/gate-bandit-linters/.tox/linters/local/lib/python2.7/site-packages/git/repo/base.py", line 631, in active_branch
    return self.head.reference
  File "/home/jenkins/workspace/gate-bandit-linters/.tox/linters/local/lib/python2.7/site-packages/git/refs/symbolic.py", line 258, in _get_reference
    raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha))
TypeError: HEAD is a detached symbolic reference as it points to '3dae02fd6d83105c139d07b3f6bf294b98986dea'

Changed in bandit:
assignee: nobody → Stanislaw Pitucha (stanislaw-pitucha)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to bandit (master)

Fix proposed to branch: master
Review: https://review.openstack.org/263072

Changed in bandit:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to bandit (master)

Reviewed: https://review.openstack.org/263072
Committed: https://git.openstack.org/cgit/openstack/bandit/commit/?id=32c5921185a31735dc715ed352c0980b6b3d1739
Submitter: Jenkins
Branch: master

commit 32c5921185a31735dc715ed352c0980b6b3d1739
Author: Stanisław Pitucha <email address hidden>
Date: Mon Jan 4 10:59:35 2016 +1100

    Fix detached head baseline

    Closes-bug: 1530722
    Change-Id: I75f74ef78807c54a0e26c2d77b99992defb523c7

Changed in bandit:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.