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

Discontinue (direct) usage of any runner implementations #541

Closed
mih opened this issue Nov 23, 2023 · 2 comments · Fixed by #632
Closed

Discontinue (direct) usage of any runner implementations #541

mih opened this issue Nov 23, 2023 · 2 comments · Fixed by #632
Milestone

Comments

@mih
Copy link
Member

mih commented Nov 23, 2023

With #538 we made the start of a new paradigm: iterator-based interaction with (concurrent) subprocesses.

It is our (@mih and @christian-monch) understanding that this basic approach would work for most (if not all) use cases that involve the execution of subprocesses. Respective experiments have been made and the results look promising. The "ultimate" challenge will be the implementation of a queue-based remote shell.

In order to bring down the complexity of implementations after the introduction of this new paradigm, all subprocess execution in datalad-next should be switch to it.

Afterwards all runner-related imports from datalad-core should be discontinued (which involves updating any extensions that make use of it).

This plan answers the questions of #519. GitRunner has no future.

@mih
Copy link
Member Author

mih commented Dec 8, 2023

Remaining usage (already discounting #546):

  • datalad_next/constraints/git.py
  • datalad_next/gitremotes/datalad_annex.py
  • datalad_next/patches/annexrepo.py

mih added a commit to mih/datalad-next that referenced this issue Dec 16, 2023
This is a step towards datalad#541. While we may want to have an abstraction
layer for such simple calls, there is no point in keeping the heavy
`GitRunner` here.

Possible a trivial wrapper around `subprocess.run()`, further triming
the space of possibilities would be useful.

But this PR is not the space for a big-picture change.
@mih mih added this to the 2.0 milestone Dec 16, 2023
@mih
Copy link
Member Author

mih commented Feb 7, 2024

datalad_next/constraints/git.py has been replaced in #592

datalad_next/patches/annexrepo.py does not actually use any runner functionality provided through datalad-next.

Only datalad_next/gitremotes/datalad_annex.py is TODO.

mih added a commit to mih/datalad-next that referenced this issue Feb 7, 2024
mih added a commit to mih/datalad-next that referenced this issue Feb 7, 2024
The new implementation uses the lean `call_git...()` utilities directly.
It also avoids the relatively heavy-handed environment patching
mechanism in the runner, in favor of the new lean `patched_env`
context manager. This is OK, because the git remote helper runs in its
own process.

Ping datalad#541
mih added a commit to mih/datalad-next that referenced this issue Feb 7, 2024
@mih mih closed this as completed in #632 Feb 7, 2024
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 a pull request may close this issue.

1 participant