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

TST: ria: Work around new git-annex check #5254

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

kyleam
Copy link
Contributor

@kyleam kyleam commented Dec 15, 2020

test_ria_git_remote.test_bare_git_version_{1,2} create a store with a
dataset and check git-annex operation with both the git remote and ora
special remote. As of git-annex's 75acf5f44 (improve some edge cases
around partial initialization, 2020-12-14) [1], the operations with
the git remote fail because git-annex has a safety check that aborts
when it encounters a repo that has an annex/objects/ directory but no
annex.version or annex.uuid configuration.

The annex/objects/ directory is created by create_ds_in_store(). This
works fine in the context of the create-sibling-ria command: the git
remote has annex-ignore set to true as the intention is for git-annex
to only operate with the store via the ora special remote. The above
tests, on the other hand, explicitly check git-annex operation on the
git remote.

The git-annex safety check, then, appears to be colliding with a
test-specific detail and shouldn't be an issue with real usage via the
ora special remote. Given this, update these tests to remove the
annex/objects/ directory after they call create_ds_in_store().

[1] https://git-annex.branchable.com/todo/avoid_autoinit_when_git-annex_branch_already_exists/

Fixes #5253.


I'm not too confident about my conclusion that this shouldn't affect normal operation. What do you think, @bpoldrack?

test_ria_git_remote.test_bare_git_version_{1,2} create a store with a
dataset and check git-annex operation with both the git remote and ora
special remote.  As of git-annex's 75acf5f44 (improve some edge cases
around partial initialization, 2020-12-14) [1], the operations with
the git remote fail because git-annex has a safety check that aborts
when it encounters a repo that has an annex/objects/ directory but no
annex.version or annex.uuid configuration.

The annex/objects/ directory is created by create_ds_in_store().  This
works fine in the context of the create-sibling-ria command: the git
remote has annex-ignore set to true as the intention is for git-annex
to only operate with the store via the ora special remote.  The above
tests, on the other hand, explicitly check git-annex operation on the
git remote.

The git-annex safety check, then, appears to be colliding with a
test-specific detail and shouldn't be an issue with real usage via the
ora special remote.  Given this, update these tests to remove the
annex/objects/ directory after they call create_ds_in_store().

[1] https://git-annex.branchable.com/todo/avoid_autoinit_when_git-annex_branch_already_exists/

Fixes datalad#5253.
@bpoldrack
Copy link
Member

bpoldrack commented Dec 16, 2020

I agree. This is a solution for the tests and the original issue shouldn't affect normal, intended operation. It might not easily be comprehensible later on, but thank god you write decent commit messages! ;-)
Also: Windows failure obviously unrelated.

@bpoldrack bpoldrack mentioned this pull request Dec 16, 2020
@kyleam
Copy link
Contributor Author

kyleam commented Dec 16, 2020

This is a solution for the tests and the original issue shouldn't affect normal, intended operation.

Great, thanks for confirming.

@kyleam kyleam merged commit ee25838 into datalad:maint Dec 16, 2020
@kyleam kyleam deleted the ria-annex-objects-guard branch December 16, 2020 16:39
@yarikoptic yarikoptic added this to the 0.13.7 milestone Jan 3, 2021
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

Successfully merging this pull request may close these issues.

3 participants