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

Reorder commands in ORA get via SSH #7215

Merged
merged 3 commits into from
Dec 6, 2022
Merged

Reorder commands in ORA get via SSH #7215

merged 3 commits into from
Dec 6, 2022

Conversation

mslw
Copy link
Contributor

@mslw mslw commented Dec 5, 2022

This delays the remote-end cat command until just before its output is needed, for two reasons:

  1. The command output is not needed if get decides to use scp
  2. When getting multiple files encrypted by git-annex (which would use scp, due to size not being part of the annex key), the cat output would remain in standard output and would be read when checking whether the next file exists (i.e. when trying to parse a completely different output), crashing upon decode().

Fixes #7214

This delays the remote-end `cat` command until just before its output
is needed, for two reasons:

1. The command output is not needed if `get` decides to use scp

2. When getting multiple files encrypted by git-annex (which would use
scp, due to size not being part of the annex key), the `cat` output
would remain in standard output and would be read when checking
whether the *next* file exists, crashing upon `decode()` datalad#7214
@mslw mslw added CHANGELOG-missing When a PR's description does not contain a changelog item, yet. semver-patch Increment the patch version when merged labels Dec 5, 2022
@github-actions github-actions bot removed the CHANGELOG-missing When a PR's description does not contain a changelog item, yet. label Dec 5, 2022
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.

Analysis and fix correct. Thank you, @mslw!

Left a proposal for changelog phrasing.

@@ -0,0 +1,3 @@
### 🐛 Bug Fixes

- Reorder commands in ORA get via SSH. Fixes [#7214](https://github.com/datalad/datalad/issues/7214) via [PR #7215](https://github.com/datalad/datalad/pull/7215) (by [@mslw](https://github.com/mslw))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Reorder commands in ORA get via SSH. Fixes [#7214](https://github.com/datalad/datalad/issues/7214) via [PR #7215](https://github.com/datalad/datalad/pull/7215) (by [@mslw](https://github.com/mslw))
- Fix a bug when retrieving several files from a RIA store via SSH, when the annex key does not contain size information. Fixes [#7214](https://github.com/datalad/datalad/issues/7214) via [PR #7215](https://github.com/datalad/datalad/pull/7215) (by [@mslw](https://github.com/mslw))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You were too fast, I was editing the changelog offline :/ I like the brevity of yours better, I will make an update.

@mslw
Copy link
Contributor Author

mslw commented Dec 5, 2022

Reworded the changelog for brevity, and pushed an amended commit. Now I'm done :)

@codecov
Copy link

codecov bot commented Dec 5, 2022

Codecov Report

Base: 88.91% // Head: 90.93% // Increases project coverage by +2.02% 🎉

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

Additional details and impacted files
@@            Coverage Diff             @@
##            maint    #7215      +/-   ##
==========================================
+ Coverage   88.91%   90.93%   +2.02%     
==========================================
  Files         355      355              
  Lines       46694    46694              
  Branches     6355     6355              
==========================================
+ Hits        41516    42462     +946     
+ Misses       5163     4217     -946     
  Partials       15       15              
Impacted Files Coverage Δ
datalad/distributed/ora_remote.py 80.46% <55.55%> (ø)
datalad/_version.py 45.68% <0.00%> (ø)
datalad/__init__.py 98.00% <0.00%> (+16.00%) ⬆️
datalad/tests/utils.py 56.12% <0.00%> (+56.12%) ⬆️
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.

Thank you, @mslw!

@bpoldrack bpoldrack merged commit d21503e into datalad:maint Dec 6, 2022
@yarikoptic-gitmate
Copy link
Collaborator

PR released in 0.17.10

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.

Able to get all individual files, but not folder as a whole from RIA: "invalid start byte" & "broken pipe"
3 participants