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

Make special remote processes report progress logs to git-annex #329

Merged
merged 4 commits into from
May 3, 2023

Conversation

mih
Copy link
Member

@mih mih commented May 3, 2023

Add dedicated log handler is attached to both the datalad "root" logger and the special remote class instance. The handler gets a filter to only makes it see progress log records (this is something that also the main progress handler should be doing). In the generic main() of special remotes, this log setup modifications is added as an additional log output -- no interference with any existing setup.

This sketch is limited/incomplete in that it assumes only a single progress tracker to be used (although it is already set up to support more than one). So in case of multiple concurrent trackers, it would send rubbish progress logs to git-annex.

That being said, with this change we see git-annex native progress reporting with git annex get and datalad native progress reporting with datalad get.

Closes #328

TODO:

  • This should be tested somehow. The ability to report progress has vanished silently so many times, it cries for a test. But I have no good idea yet.

mih added 2 commits May 3, 2023 07:44
Add dedicated log handler is attached to both the datalad "root" logger
and the special remote class instance. The handler gets a filter to only
makes it see progress log records (this is something that also the main
progress handler should be doing). In the generic main() of special
remotes, this log setup modifications is added as an additional log
output -- no interference with any existing setup.

This sketch is limited/incomplete in that it assumes only a single
progress tracker to be used (although it is already set up to support
more than one). So in case of multiple concurrent trackers, it would
send rubbish progress logs to git-annex.

That being said, with this change we see git-annex native progress
reporting with git annex get and datalad native progress reporting with
datalad get.

Closes datalad#328
christian-monch
christian-monch previously approved these changes May 3, 2023
Copy link
Contributor

@christian-monch christian-monch left a comment

Choose a reason for hiding this comment

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

Looks good to me

@mih
Copy link
Member Author

mih commented May 3, 2023

Via @mslw:

Checking out that PR made a progress bar appear for me.

@mih
Copy link
Member Author

mih commented May 3, 2023

It appear that all test failures are unrelated and also happen in other recent test runs.

@mih mih merged commit 120160f into datalad:main May 3, 2023
@mih mih deleted the progress branch May 3, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let uncurl download progress reach git-annex
2 participants