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
initremote type=git fresh "regression" #6779
Comments
I can confirm the test failure with However, it is not that this is "broken" now, it just requires the actual URL to be specified. The test aspect datalad/datalad/distribution/tests/test_siblings.py Lines 540 to 545 in 5eb8358
works and yields (notice the
The subsequent test aspect datalad/datalad/distribution/tests/test_siblings.py Lines 548 to 554 in 5eb8358
This is not the URL one can clone from, because the test uses a non-bare repository as subject. Up to this line the test works, because The test is broken. Here is a possible fix diff --git a/datalad/distribution/tests/test_siblings.py b/datalad/distribution/tests/test_siblings.py
index b5a49ee58..d60f6f1fc 100644
--- a/datalad/distribution/tests/test_siblings.py
+++ b/datalad/distribution/tests/test_siblings.py
@@ -545,6 +545,10 @@ def test_as_common_datasource(testbed=None, viapath=None, viaurl=None, remotepat
)
assert_status('ok', res)
# same thing should be possible by adding a fresh remote
+ # but we must amend the URL given by serve_path_via_http, because
+ # we are serving the root of a non-bare repository, but git-annex needs
+ # to talk to its .git
+ url += '.git'
res = ds_fromurl.siblings(
'add',
name='fresh', |
Previously the test relied on git-annex to be more tolerant to invalid repository URLs than Git itself. Fixes datalad#6779
I am still curious on just how did it (git-annex) work before - isn't the rest of that test verifies that git/git-annex handles that URL ok even without |
No, the rest of the test works with the URL that |
hm... I thought we are talking about URL within special remote, so not subject to $> git show git-annex:remote.log
autoenable=true location=http://127.0.0.1:34817/ name=fresh-sr type=git timestamp=1656698564.388750883s
640b3cbe-2ab0-488e-9dde-770f3cb13bfc autoenable=true location=http://127.0.0.1:34817/.git name=mike2 type=git timestamp=1656698511.408632757s and things still working just fine ;) Robust sandwich we had! ;) but also I think that the test wasn't really testing that particular aspect since you can see above dump of our logs with annex 10.20220322-1~ndall+1 while adding sibling with incorrect url(Pdb)
[DEBUG ] Determined class of decorated function: <class 'datalad.distribution.siblings.Siblings'>
[DEBUG ] Resolved dataset to configure sibling: /home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7
[DEBUG ] Run ['git', '-c', 'diff.ignoreSubmodules=none', 'remote', 'add', 'fresh', 'http://127.0.0.1:34817/'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Run ['git', 'config', '-z', '-l', '--show-origin'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Finished ['git', 'config', '-z', '-l', '--show-origin'] with status 0
[DEBUG ] Run ['git', 'config', '--local', 'remote.fresh.url', 'http://127.0.0.1:34817/'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Finished ['git', 'config', '--local', 'remote.fresh.url', 'http://127.0.0.1:34817/'] with status 0
[DEBUG ] Run ['git', 'config', '-z', '-l', '--show-origin'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Finished ['git', 'config', '-z', '-l', '--show-origin'] with status 0
[DEBUG ] Run ['git', '-c', 'diff.ignoreSubmodules=none', 'annex', 'enableremote', 'fresh', '-c', 'annex.dotfiles=true'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Finished ['git', '-c', 'diff.ignoreSubmodules=none', 'annex', 'enableremote', 'fresh', '-c', 'annex.dotfiles=true'] with status 1
[INFO ] Could not enable annex remote fresh. This is expected if fresh is a pure Git remote, or happens if it is not accessible.
[DEBUG ] Exception was: CommandError(CommandError: 'git -c diff.ignoreSubmodules=none annex enableremote fresh -c annex.dotfiles=true' failed with exitcode 1 under /home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7 [out: 'enableremote fresh
failed'] [err: 'Remote fresh not usable by git-annex; setting annex-ignore
http://127.0.0.1:34817//config download failed: File not found
Remote fresh not usable by git-annex; setting annex-ignore
http://127.0.0.1:34817//config download failed: File not found
enableremote: 1 failed'])
[DEBUG ] Run ['git', '-c', 'diff.ignoreSubmodules=none', 'annex', 'initremote', 'fresh-sr', 'type=git', 'location=http://127.0.0.1:34817/', 'autoenable=true', '-c', 'annex.dotfiles=true'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Finished ['git', '-c', 'diff.ignoreSubmodules=none', 'annex', 'initremote', 'fresh-sr', 'type=git', 'location=http://127.0.0.1:34817/', 'autoenable=true', '-c', 'annex.dotfiles=true'] with status 0
[DEBUG ] Run ['git', '-c', 'diff.ignoreSubmodules=none', 'annex', 'info', '--bytes', '--fast', '--json', '--json-error-messages', '-c', 'annex.dotfiles=true'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Finished ['git', '-c', 'diff.ignoreSubmodules=none', 'annex', 'info', '--bytes', '--fast', '--json', '--json-error-messages', '-c', 'annex.dotfiles=true'] with status 0
[DEBUG ] Run ['git', '-c', 'diff.ignoreSubmodules=none', 'cat-file', 'blob', 'git-annex:remote.log'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Run ['git', '-c', 'diff.ignoreSubmodules=none', 'annex', 'wanted', 'fresh', '-c', 'annex.dotfiles=true'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Run ['git', 'config', '-z', '-l', '--show-origin'] (cwd=/home/yoh/.tmp/datalad_temp_test_as_common_datasource7tdbrez7)
[DEBUG ] Finished ['git', 'config', '-z', '-l', '--show-origin'] with status 0
[WARNING] Could not detect whether fresh carries an annex. If fresh is a pure Git remote, this is expected. Remote was marked by annex as annex-ignore. Edit .git/config to reset if you think that was done by mistake due to absent connection etc
> /home/yoh/proj/datalad/datalad-maint/datalad/distribution/tests/test_siblings.py(559)test_as_common_datasource()
-> assert_status('ok', res)
(Pdb)
|
rright -- and with newer git-annex, that |
This is a sattelite of originally filed only in git-annex for @joeyh at https://git-annex.branchable.com/bugs/initremote_type__61__git_fresh___34__regression__34__/ and which nobody yet troubleshooted to resolution yet, but which started to appear in our CI due to recent release of git-annex.
The text was updated successfully, but these errors were encountered: