datalad / datalad-ria

Adds functionality for RIA stores to DataLad
http://datalad.org
Other
0 stars 1 forks source link

Creating a storage-only RIA sibling silently ignores group settings #39

Open mslw opened 1 year ago

mslw commented 1 year ago

Problem description

As noticed by @ddeepwell, the following command (used to create a new ria store):

datalad create-sibling-ria \ 
  -s arc --alias Group-notes \
  --shared group --group rsws \
  --storage-sibling only \
  --new-store-ok --existing skip \
  ria+ssh://<username>@<domain>:/path/to/group-notes-assets

does not apply group ownership settings.

Additional context

If I understand correctly, --shared group by default does, essentially, two things: it adds the --shared flag to git init --bare, and it does chown repo_path (where repo_path is the dataset directory, e.g. <store-base-dir>/364/32084-6560-4443-b4ca-1c45a67e1f9e, containing bare git repo and annex folder).

With --storage-sibling only there is no need to do the first thing (there is no git repo), but I suppose the second should remain unaffected (dataset directory contains annex, archives and ria-layout-version).

That could be fixed by refactoring - currently, the shared / group-related options are applied when setting up git repo, and that part of the code isn't reached for --storage-sibling only: https://github.com/datalad/datalad/blob/6c2a573e9cf75f62b4aa8b03fdd346dca8d29820/datalad/distributed/create_sibling_ria.py#L650-L657

If I'm wrong and there is a good reason why this is ignored, then the function shouldn't allow the combination of parameters.

I have a basic idea for a patch, but I'd appreciate comments (so I'm not assigning myself currently).

DataLad version: 0.18.1

adswa commented 1 year ago

ping possibly related https://github.com/datalad/datalad-ria/issues/34

bpoldrack commented 1 year ago

@mslw

If I'm wrong and there is a good reason why this is ignored, then the function shouldn't allow the combination of parameters.

I think you are not wrong. It's probably just an artifact of introducing --shared with the idea in mind to be able to pass it to git-init but not realizing that there's a usecase w/o a repo, too.