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

Fix "common data source" test to use a valid URL (maint-based & extended edition) #6788

Merged
merged 5 commits into from
Jul 5, 2022

Conversation

yarikoptic
Copy link
Member

Rebased #6785 against maint and then extended the test to actually test that we can get data from that remote for which we specified the now fixed URL. While at it, as described in #6785 (comment) I have ran into another peculiarity of git-annex which would have made #6785 fail on some versions of git-annex , and thus made that remote be served from another URL. Now seems all to work with both bleeding edge and not so versions. . It is "fun" -- most recent version works it out fine - just replaces one URL with another since UUID is the same (thus makes sense):

$> git show git-annex:remote.log
d7d23c22-a9d6-4f88-987d-8b671db81d4e autoenable=true location=http://127.0.0.1:43859/.git name=mike2 type=git timestamp=165670508

$> git show git-annex:remote.log
d7d23c22-a9d6-4f88-987d-8b671db81d4e autoenable=true location=http://127.0.0.1:40665/.git name=fresh-sr type=git timestamp=1656705139.816543473s

With that, again, we would not be testing those both cases ('configured' vs 'added' with url), so evolved test to do have two different repos (UUIDs) with two urls and test explicitly that we can get from any of them (so they are autoenabled etc)

mih and others added 5 commits July 1, 2022 15:29
Previously the test relied on git-annex to be more tolerant to
invalid repository URLs than Git itself.

Fixes datalad#6779
Would have failed with older git-annex without having URL corrected
since otherwise we can run into indigestion by git-annex such as

	datalad.runner.exception.CommandError: CommandError: 'git -c diff.ignoreSubmodules=none annex initremote fresh-sr type=git location=http://127.0.0.1:38045/.git autoenable=true -c annex.dotfiles=true' failed with exitcode 1 under /home/yoh/.tmp/datalad_temp_test_as_common_datasource49kq5qqu [out: 'initremote fresh-sr
	failed'] [err: 'git-annex: found multiple git remotes with specified location initremote: 1 failed']
since otherwise git-annex would just change URL and have a single
remote thus just forgetting the original one
@yarikoptic yarikoptic added semver-patch Increment the patch version when merged semver-tests Changes only affect tests, no impact on version and removed semver-patch Increment the patch version when merged labels Jul 1, 2022
@yarikoptic yarikoptic requested a review from mih July 2, 2022 16:17
Copy link
Member

@mih mih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thx!

@yarikoptic
Copy link
Member Author

fails unrelated

@yarikoptic yarikoptic merged commit 1604be6 into datalad:maint Jul 5, 2022
@github-actions
Copy link

github-actions bot commented Jul 6, 2022

🚀 PR was released in 0.16.7 🚀

@yarikoptic yarikoptic deleted the bf-6779-maint branch July 11, 2022 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released semver-tests Changes only affect tests, no impact on version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants