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

BF: left-over subprocess call didn't use env #5682

Merged
merged 1 commit into from May 21, 2021

Conversation

bpoldrack
Copy link
Member

#5679 showed, that the last remaining call to subprocess.run in
create-sibling-ria would fail w/o using shell=True. The issue is, that
there's nothing to ensure we run from within a sane environment.
Switch to use WitlessRunner in order to get the environment to run from
the same way as in every other place.

(Closes #5679)

Note: I'm aware we don't really test everything related to users/groups here. With current approach on testing RIA-related stuff (or anything happening on remote ends really), it's quite complicated and effortful to meaningfully test such aspects. I plan to look into a different setup, probably using a docker as the remote end, next week and will then care for rewriting/adding tests accordingly. For now, this change should not be objectionable even w/o a test from my POV.

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! More homogeneous, more good.

@codecov
Copy link

codecov bot commented May 20, 2021

Codecov Report

Merging #5682 (063a77f) into master (fd7229a) will decrease coverage by 61.59%.
The diff coverage is 50.00%.

❗ Current head 063a77f differs from pull request most recent head 748e934. Consider uploading reports for the commit 748e934 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           master    #5682       +/-   ##
===========================================
- Coverage   90.48%   28.88%   -61.60%     
===========================================
  Files         305      302        -3     
  Lines       41883    41849       -34     
===========================================
- Hits        37898    12089    -25809     
- Misses       3985    29760    +25775     
Impacted Files Coverage Δ
datalad/distributed/create_sibling_ria.py 16.66% <50.00%> (-66.00%) ⬇️
datalad/plugin/wtf.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/plugin/addurls.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_api.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/plugin/__init__.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/plugin/no_annex.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/support/digests.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_base.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/plugin/add_readme.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_config.py 0.00% <0.00%> (-100.00%) ⬇️
... and 255 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd7229a...748e934. Read the comment docs.

dataladgh-5679 showed, that the last remaining call to subprocess.run in
create-sibling-ria would fail w/o using shell=True. The issue is, that
there's nothing to ensure we run from within a sane environment.
Switch to use WitlessRunner in order to get the environment to run from
the same way as in every other place.

(Closes datalad#5679)
@kyleam kyleam merged commit f63ed56 into datalad:master May 21, 2021
@yarikoptic yarikoptic added semver-minor Increment the minor version when merged semver-patch Increment the patch version when merged and removed semver-minor Increment the minor version when merged labels Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create-sibling-ria with --shared=group option fails
4 participants