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 RIA file URL reporting in exception handling #7123

Merged
merged 4 commits into from
Oct 28, 2022

Conversation

adswa
Copy link
Member

@adswa adswa commented Oct 28, 2022

Probing for the existence of a ria_layout_version file internally misconstructs a target_ri variable only used for reporting the path to the file. We noticed recently that this reporting was off, duplicating paths, e.g.:

[INFO   ] RIA store unavailable. 
-caused by- 
file:///tmp/myriastore/tmp/myriastore/ria-layout-version not found. 
-caused by- 
[Errno 2] No such file or directory: '/tmp/myriastore/ria-layout-version'

This duplication should be fixed with this small change. It extracts the file name (ria_layout_version) and appends it to the ria store location, instead of appending the entire path to it.

Probing for the existence of a ria_layout_version file internally
constructs a target_ri variable only used for reporting the path
to the file. We noticed recently that this reporting was off,
duplicating paths, e.g.:

[INFO   ] RIA store unavailable. -caused by- file:///tmp/myriastore/tmp/myriastore/ria-layout-version not found. -caused by- [Errno 2] No such file or directory: '/tmp/myriastore/ria-layout-version'

This duplication should be fixed with this small change. It
extracts the file name (ria_layout_version) and appends it to the ria
store location, instead of appending the entire path to it.
@adswa adswa added semver-patch Increment the patch version when merged CHANGELOG-missing When a PR's description does not contain a changelog item, yet. labels Oct 28, 2022
@adswa adswa requested a review from bpoldrack October 28, 2022 07:50
@github-actions github-actions bot removed the CHANGELOG-missing When a PR's description does not contain a changelog item, yet. label Oct 28, 2022
@codecov
Copy link

codecov bot commented Oct 28, 2022

Codecov Report

Base: 89.39% // Head: 90.95% // Increases project coverage by +1.55% 🎉

Coverage data is based on head (a58ffdc) compared to base (b33dcb3).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##            maint    #7123      +/-   ##
==========================================
+ Coverage   89.39%   90.95%   +1.55%     
==========================================
  Files         355      355              
  Lines       46498    46498              
  Branches     6327     6327              
==========================================
+ Hits        41569    42294     +725     
+ Misses       4914     4189     -725     
  Partials       15       15              
Impacted Files Coverage Δ
datalad/distributed/ora_remote.py 80.46% <100.00%> (ø)
datalad/_version.py 45.68% <0.00%> (ø)
datalad/downloaders/base.py 82.81% <0.00%> (+0.34%) ⬆️
datalad/__init__.py 98.00% <0.00%> (+16.00%) ⬆️
datalad/tests/utils.py 56.96% <0.00%> (+35.36%) ⬆️
datalad/tests/test_tests_utils.py 92.34% <0.00%> (+92.34%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@bpoldrack bpoldrack left a comment

Choose a reason for hiding this comment

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

Thx, for taking it on, @adswa. Spot is right, solution not quite yet - see comment in diff.

datalad/distributed/ora_remote.py Outdated Show resolved Hide resolved
@bpoldrack
Copy link
Member

Thx much, @adswa

@bpoldrack bpoldrack merged commit 42c60db into datalad:maint Oct 28, 2022
@yarikoptic-gitmate
Copy link
Collaborator

PR released in 0.17.9

@datalad datalad deleted a comment from yarikoptic-gitmate Nov 7, 2022
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.

3 participants