#4999 ValueError: SHA could not be resolved, git returned: ''

v1.0.0
closed
nobody
General
2015-08-20
2012-09-25
Cory Johns
No

Three project repos are giving errors when attempting to refresh the repo after a reclone: novatux's apps and hostedapps, and openerp-server's code. Example stack trace:

Traceback (most recent call last):
  File "/var/local/env-allura/bin/paster", line 8, in <module>
    load_entry_point('PasteScript==1.7.4.2', 'console_scripts', 'paster')()
  File "/var/local/env-allura/lib/python2.7/site-packages/PasteScript-1.7.4.2-py2.7.egg/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/var/local/env-allura/lib/python2.7/site-packages/PasteScript-1.7.4.2-py2.7.egg/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/var/local/env-allura/lib/python2.7/site-packages/PasteScript-1.7.4.2-py2.7.egg/paste/script/command.py", line 238, in run
    result = self.command()
  File "/var/local/allura/Allura/allura/command/reclone_repo.py", line 23, in command
    self._clone_repo()
  File "/var/local/allura/Allura/allura/command/reclone_repo.py", line 52, in _clone_repo
    c.app.repo.init_as_clone(source_path, None, source_url)
  File "/var/local/allura/Allura/allura/model/repository.py", line 222, in init_as_clone
    self._impl.clone_from(source)
  File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 106, in clone_from
    self._repo.refresh(notify=False)
  File "/var/local/allura/Allura/allura/model/repository.py", line 322, in refresh
    refresh_repo(self, all_commits, notify)
  File "/var/local/allura/Allura/allura/model/repo_refresh.py", line 45, in refresh_repo
    repo.refresh_commit_info(oid, seen, not all_commits)
  File "/var/local/allura/Allura/allura/model/repository.py", line 198, in refresh_commit_info
    return self._impl.refresh_commit_info(oid, seen, lazy)
  File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 206, in refresh_commit_info
    self.refresh_tree_info(ci.tree, seen, lazy)
  File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 223, in refresh_tree_info
    self.refresh_tree_info(o, seen, lazy)
  File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 223, in refresh_tree_info
    self.refresh_tree_info(o, seen, lazy)
  File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 223, in refresh_tree_info
    self.refresh_tree_info(o, seen, lazy)
  File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 223, in refresh_tree_info
    self.refresh_tree_info(o, seen, lazy)
  File "/var/local/allura/ForgeGit/forgegit/model/git_repo.py", line 218, in refresh_tree_info
    for o in tree:
  File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/objects/tree.py", line 225, in __iter__
    return self._iter_convert_to_object(self._cache)
  File "/var/local/env-allura/lib/python2.7/site-packages/gitdb-0.5.4-py2.7-linux-x86_64.egg/gitdb/util.py", line 238, in __getattr__
    self._set_cache_(attr)
  File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/objects/tree.py", line 144, in _set_cache_
    ostream = self.repo.odb.stream(self.binsha)
  File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/db.py", line 42, in stream
    hexsha, typename, size, stream = self._git.stream_object_data(bin_to_hex(sha))
  File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/cmd.py", line 502, in stream_object_data
    hexsha, typename, size = self.__get_object_header(cmd, ref)
  File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/cmd.py", line 474, in __get_object_header
    return self._parse_object_header(cmd.stdout.readline())
  File "/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.0_beta2-py2.7.egg/git/cmd.py", line 442, in _parse_object_header
    raise ValueError("SHA could not be resolved, git returned: %r" % (header_line.strip()))
ValueError: SHA could not be resolved, git returned: ''

(Logs can be found on sfu-scmprocess-1 at /var/log/allura/2012/09/19/.)

We need to try importing these repos on a sandbox and, if they work without error, possibly coordinate with siteops to do a full (clean) refresh on them.

Related

Tickets: #4999

Discussion

  • Dave Brondsema

    Dave Brondsema - 2012-10-02
    • labels: migration --> migration, 42cc
     
  • Dave Brondsema

    Dave Brondsema - 2012-10-02

    Remote git repo to test init_as_clone with: git://novatux.git.sourceforge.net/gitroot/novatux/apps

     
  • Igor Bondarenko - 2012-10-03

    Created #186: [#4999] ValueError: SHA could not be resolved, git returned: '' (1cp)

    • status: open --> in-progress
     

    Related

    Tickets: #4999

  • Igor Bondarenko - 2012-10-10

    Closed #186.

    The error does not reproduced for that repo on a local allura instance.

    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2012-11-30
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -Three project repos are giving errors when attempting to refresh the repo after a reclone: `novatux`'s `apps` and `hostedapps`, and `openerp-server`'s `code`.  Example stack trace:
    +Three project repos are giving errors when attempting to refresh the repo after a reclone: `novatux`'s `apps` and `hostedapps`, and <s>`openerp-server`</s>'s `code`.  Example stack trace:
    
         Traceback (most recent call last):
    
     
  • Dave Brondsema

    Dave Brondsema - 2012-11-30

    After a reclone-repo and full clean refresh, openerp-server is fixed up and done

     
  • Dave Brondsema

    Dave Brondsema - 2012-12-03
    • qa: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2012-12-03

    novatux's apps repo was up to date when I looked at it, and the hostedapps repo appeared empty but the underlying git repo had everything, so I just did a regular refresh and it was all set.

     
  • Dave Brondsema

    Dave Brondsema - 2012-12-03
    • status: code-review --> closed
    • milestone: forge-backlog --> forge-dec-14
     

Log in to post a comment.