Closed yarikoptic closed 4 years ago
Given the fetch call and refspec shown in the log message, I'd imagine that failure is coming from this line:
But I don't know how "origin" is coming into the picture because, as shown in the log message and the code snippet above, that's calling fetch with remote=resource_name
.
My reproman is v0.2.1-51-g924980c .
I can't find that revision:
$ git fetch origin
$ git fetch yarikoptic
$ git show 924980c
fatal: ambiguous argument '924980c': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
My reproman is v0.2.1-51-g924980c .
I can't find that revision:
eh, sorry -- it was with a merged master. Pushed now, after merging @chaselgrove 's d5e90283e010a24bb29c10d5cf24a454054f62d2 commit which changed defaults for RM_SUB and RM_RESOURCE to local
As I mentioned yesterday on the call, I'm hitting into another issue when I try to run this. It happens after the first two reproman run
calls from the script succeed. I'm working on figuring that out (and have put some details are below the fold, if anyone is interested). But the main thing I want to point out is that, in the out7-datalad-pair.tgz file @yarikoptic gave me yesterday for the "origin" failure above, the log doesn't have any successful runs in master, and it has one run in a refs/reproman/ ref. So it seems like it fails when trying to bring in the first successful run. Given I'm seeing two successful runs (and merged into master as expected), it looks like I'm having no luck triggering this issue's error.
This made me scratch my head a bit, but I've made some progress. With a smaug
ssh resource and master (a74de9afe) checked out, I can trigger the "'fatal: 'origin' does [...]" failure with
cd "$(mktemp -d --tmpdir rman-XXXXXXX)"
datalad create
datalad create -d. subds
reproman run --follow -r smaug --orc datalad-pair sh -c "echo one >subds/one"
The traceback looks like this:
Traceback (most recent call last):
File "/home/kyle/src/python/reproman/reproman/support/jobs/orchestrators.py", line 966, in fetch
self.ds.repo.fetch(resource_name, "{0}:{0}".format(ref))
File "/home/kyle/src/python/datalad/datalad/support/gitrepo.py", line 412, in wrapped
return func(repo, *args, **kwargs)
File "/home/kyle/src/python/datalad/datalad/support/gitrepo.py", line 2174, in fetch
**kwargs
File "/home/kyle/src/python/datalad/datalad/support/gitrepo.py", line 2200, in _call_gitpy_with_progress
ret = callable(**git_kwargs)
File "/home/kyle/src/python/gitpython/git/remote.py", line 792, in fetch
res = self._get_fetch_info_from_stderr(proc, progress)
File "/home/kyle/src/python/gitpython/git/remote.py", line 676, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/home/kyle/src/python/gitpython/git/cmd.py", line 417, in wait
raise GitCommandError(self.args, status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git fetch --progress -v smaug refs/reproman/20200116-132629-0c1e:refs/reproman/20200116-132629-0c1e
stderr: 'fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.'
Some observations:
refs/reproman/*
ref is present in the local repository, so it looks like the actual fetch succeeds. Calling that cmdline:
directly does not show an error.Running the fetch
without GitPython (e.g., through GitRepo.call
) shows the same issues, but the error message is more complete and the extra information is helpful:
2020-01-16 13:37:09,268 [ERROR ] CommandError: command '['git', 'fetch', 'smaug', 'refs/reproman/20200116-133647-7c84:refs/reproman/20200116-133647-7c84']' failed with exitcode 1
| Failed to run ['git', 'fetch', 'smaug', 'refs/reproman/20200116-133647-7c84:refs/reproman/20200116-133647-7c84'] under '/tmp/rman-ibwjf4k'. Exit code=1. out= err=From ssh://smaug/home/kyle/.reproman/run-root/25d4fc82-388f-11ea-b262-28c63f920482
| * [new ref] refs/reproman/20200116-133647-7c84 -> refs/reproman/20200116-133647-7c84
| Fetching submodule subds
| fatal: 'origin' does not appear to be a git repository
| fatal: Could not read from remote repository.
|
| Please make sure you have the correct access rights
| and the repository exists.
| [cmd.py:run:544] (CommandError)
All of those point to it being git fetch
s recursive fetch of subds
that is looking for origin and failing. As expected, we can avoid this issue by calling fetch with --recurse-submodules=no
. ~And doing that is fine, because the ref we want to fetch is present only in the top-level dataset.~ But doing that is probably problematic if we needed to switch to a different base on the remote end and the update --recursive
call doesn't fetch those commits.
This seems like something worth reporting/improving in Git, but I'd need to look into it a bit more. (Edit: git's submodule.c hardcodes "origin" for the fetch, and its labelled as NEEDSWORK, so it is a known limitation.)
on #438 with using
datalad-pair
(inRM_ORC
) instead ofdatalad-pair-run
results in:my invocation was
NB you have
~/.freesurfer-license
on smaug now @kyleam . My reproman is v0.2.1-51-g924980c .