Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cocom] Impossible to checkout the worktree #56

Closed
inishchith opened this issue Aug 16, 2019 · 5 comments
Closed

[cocom] Impossible to checkout the worktree #56

inishchith opened this issue Aug 16, 2019 · 5 comments

Comments

@inishchith
Copy link
Contributor

This issue was reported while testing the raw(collection) phase of ELK integration with Graal's CoCom Backend.

  • Error Log
2019-08-13 08:19:57,700 Fetching commits: 'https://github.com/chaoss/grimoirelab-graal' git repository from 1970-01-01 00:00:00+00:00 to 2100-01-01 00:00:00+00:00; master branches
2019-08-13 08:19:58,862 Analysis failed at 2fb9a49363021922eb0fcc9874baabfc252a827c
2019-08-13 08:19:58,862 Error feeding ocean from cocom (https://github.com/chaoss/grimoirelab-graal): Impossible to checkout the worktree /tmp/worktrees/grimoirelab-graal-git at 2fb9a49363021922eb0fcc9874baabfc252a827c
Traceback (most recent call last):
  File "/home/slimbook/Escritorio/sources/graal/graal/graal.py", line 323, in checkout
    self._exec(cmd_checkout, cwd=self.worktreepath, env=self.gitenv)
  File "/home/slimbook/Escritorio/sources/perceval/perceval/backends/core/git.py", line 1331, in _exec
    raise RepositoryError(cause=cause)
perceval.errors.RepositoryError: git command - error: Your local changes to the following files would be overwritten by checkout:
	graal/backends/core/analyzers/cloc.py
	graal/backends/core/analyzers/lizard.py
	tests/test_cloc.py
Please commit your changes or stash them before you switch branches.
Aborting


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/slimbook/Escritorio/sources/ELK/grimoire_elk/elk.py", line 228, in feed_backend
    ocean_backend.feed(**params)
  File "/home/slimbook/Escritorio/sources/ELK/grimoire_elk/raw/elastic.py", line 228, in feed
    self.feed_items(items)
  File "/home/slimbook/Escritorio/sources/ELK/grimoire_elk/raw/elastic.py", line 244, in feed_items
    for item in items:
  File "/home/slimbook/Escritorio/sources/perceval/perceval/backend.py", line 161, in fetch
    for item in self.fetch_items(category, **kwargs):
  File "/home/slimbook/Escritorio/sources/graal/graal/graal.py", line 182, in fetch_items
    raise e
  File "/home/slimbook/Escritorio/sources/graal/graal/graal.py", line 174, in fetch_items
    self.graalRepo.checkout(commit['commit'])
  File "/home/slimbook/Escritorio/sources/graal/graal/graal.py", line 327, in checkout
    raise RepositoryError(cause=cause)
perceval.errors.RepositoryError: Impossible to checkout the worktree /tmp/worktrees/grimoirelab-graal-git at 2fb9a49363021922eb0fcc9874baabfc252a827c
2019-08-13 08:19:58,863 Done cocom 

/cc @valeriocos

@valeriocos
Copy link
Member

A PR is available to cope with this issue. I'm still testing it over the chaoss repos (kibiter excluded)

@inishchith
Copy link
Contributor Author

@valeriocos Thanks for working on this. Do you want me to test the fix?
( if you know how to reproduce it please let me know )

@valeriocos
Copy link
Member

You're welcome! Yes, feel free to test it. It's pretty difficult to replicate because it doesn't appear so often. I tried with graal and the error didn't appear, then I tried with a battery of repos (the chaoss ones) and it popped up.

@vinhbt
Copy link

vinhbt commented Apr 2, 2024

I also encountered a similar error. Execute command:
graal cocom 'my_repo'--worktree-path /tmp/cocom --branches release-dev > graal-cocom.test
I got a error Line count, exceeded timeout: /tmp/cabc/.../lib/lambda-stack.ts
Execute command graal cocom 'my_repo'--worktree-path /tmp/cocom --branches release-dev > graal-cocom.test again and error Impossible to checkout the worktree occur
[2024-04-02 04:28:48,496] - Analysis failed at 65ef45482e1c33821b8d1321be1f736e8143dffe
[2024-04-02 04:28:48,496] - Error!: Impossible to checkout the worktree /tmp/cocom/xxxx-git at 65ef45482e1c33821b8d1321be1f736e8143dffe
[2024-04-02 04:28:48,496] - Quest completed.

@zhquan
Copy link
Member

zhquan commented Apr 2, 2024

Hi @vinhbt

Check this comment chaoss/grimoirelab#479 (comment) maybe it helps you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants