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
NF: create-sibling-ria command #4124
Conversation
@bpoldrack can you have a look at the test failures please, it seems we are missing a few of their idiosyncracies in datalad-core (which should preferably by removed). Thx! |
git-annex-ria-remote is about to move completely into datalad core. Temporarily install on Travis in order to not rewrite tests for a few days Additionally, disable test on windows due to issue with short paths on some windows environments.
Codecov Report
@@ Coverage Diff @@
## master #4124 +/- ##
=========================================
Coverage ? 89.54%
=========================================
Files ? 279
Lines ? 36707
Branches ? 0
=========================================
Hits ? 32868
Misses ? 3839
Partials ? 0
Continue to review full report at Codecov.
|
@bpoldrack That last patch tripped the tests |
Note, that datalad/git-annex-ria-remote#44 and datalad/git-annex-ria-remote#45 are addressed here. Re test: That's strange. |
to invoke a git-annex-[trust|semitrust|untrust] call to the created special remote. Since the plain git remote is set to annex-ignore anywway, I guess it's reasonable to do this for the special remote only. (Closes datalad/git-annex-ria-remote#45)
ff095ff
to
08849ed
Compare
FTR: ATM I have no idea waht's going on on Travis. Can't reproduce and looks like it has nothing to do with my last commit. However, meanwhile fixing an issue wrt |
- remove 'replace' mode - check for existing target repo upfront to avoid failing/skipping only after initremote/enableremote - remove/change outdated comments
We need the actual special remote for testing, but master branch has a conflicting create-sibling-ria command installed.
0ade207
to
80712bb
Compare
Finally able to reproduce issue on Travis. Reason: Happens only on the merge commit with master. At least twofold:
Edit: As suspected (but not traced down) before: We shoot our feet with the fake $HOME we set up for tests:
Note, that it reads
Edit 2: And number 3: Edit 3: Above mentioned wrong order brought some headache, since it should only lead to not setting the publication dependency. Instead, special remote wasn't enabled at all. How so? Turns out, that the search for such a special remote results in annex-calls like |
Before we can deal with special remotes, we need to figure it's an annex and initialize it. Also: Local config settings in postprocessing don't make sense, if we only afterwards double-check that we do indeed have an installed dataset as a result, etc. Furthermore, there's a possible bug in annex, where git-annex-info (indirectly called by postclonecfg_ria) half-initializes the repo preventing us from later detect, that we still need to do it (particularly in order to autoenable special remotes). See issue datalad#4152.
80712bb
to
455d543
Compare
I have lost track of all the moving pieces here. Could you please leave a note in the top comment on the status of this PR. It looks ready function-wise, but there is still the test dependency issue on that branch in ria-remote. What is the general plan? |
@mih: Updated top-level comment. |
Idea:
This avoids the need for any |
The failure doesn't happen with a URL that doesn't have a user specified. It is likely a URL parsing issue. |
Consider something like url.ria+ssh://user@host/some/where.insteadOf MYLABEL and using it with datalad-clone or datalad-create-sibling-ria. That would mean to pass just MYLABEL as the url parameter. We wouldn't even recognize it as an URL before rewriting.
Addressed in b4533ea |
As for the annex UUID in bare repo's config: Will move ria-remote to core first and only then implement it in its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments on names and wording
crucial when [CMD: --shared=group CMD][PY: shared="group" PY]""", | ||
constraints=EnsureStr() | EnsureNone()), | ||
ria_remote=Parameter( | ||
args=("--no-ria-remote",), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name is confusing given the have of the command. May be make it --no-ria-archive
if that what it is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential confusion - true. But it's not about an archive either. It's about whether or not to have a special remote, since it can be useful to have that ID based tree of bare repos without any annex object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @bpoldrack
@yarikoptic : Addressed your comments (and pushed) except for the one answered. Don't see a better name for |
FTR: Windows failure is in Note, that this is about github Win2019 tests. appveyor fails with the known coverage issue only. Restarted build after failure didn't happen in master. Now it passes. So - whatever. |
This is the code that was used to push the HCP datasets to store.datalad.org -- written by @bpoldrack (see datalad/git-annex-ria-remote#38). It is one of the last pieces of RIA functionality to move into -core (the actual special remote implementation being the very last one). It is being proposed as a separate PR, because it can function without it (HCP doesn't use the ria-special remote), and to keep the complexity of the PR more manageable.
Feedback is very much welcome! Thanks!
Related:
create_sibling
Update by @bpoldrack :
From my point of view, this is ready. Above mentioned UX issues are addressed and test failures fixed (includes a fix for #4151). A long the way I doscovered #4152 and #4153. However, those are neither fixed herein nor are fixes for that actually required for this PR.
Tests currently depend on installing
https://github.com/datalad/git-annex-ria-remote@transition-to-core
, which removes the conflicting implementation ofcreate-sibling-ria
therein. While this seems somewhat ugly, it should be a quite short lived approach. Rational: We are moving the special remote to core. I'm currently working on PR #4068 to integrate execution via a persistent remote shell. When this is done, git-annex-ria-remote can go into core completely. If we had an actual dependency on theria_remote
package viasetup.py
, this would lead to people installing it, when shortly afterwards it will become at least unnecessary, if not conflicting to have it installed, which is why I consider this approach superior.Edit by @bpoldrack :
Plans changed. Since there's some time pressure and a new idea re special remote configuration ( #4124 (comment) ), updated plan for ria-remote's move to core:
create-sibling-ria
) can remove Travis dependency it properly reference/import within core and be mergedinitremote
can be adapted to store the annex UUID in the bare repo's configclone
then needs to be aware to make use of itNote, that integration with #4068 is thereby postponed.
So, 3 PRs:
RIARemote.initremote()
and datalad-clone