Skip to content

feat(dvc): make dvc named pipe proxy cross-platform#896

Merged
Vladyslav Nikonov (pacmancoder) merged 4 commits into
masterfrom
feat/dvc-proxy-cross-platform
Aug 4, 2025
Merged

feat(dvc): make dvc named pipe proxy cross-platform#896
Vladyslav Nikonov (pacmancoder) merged 4 commits into
masterfrom
feat/dvc-proxy-cross-platform

Conversation

@pacmancoder
Copy link
Copy Markdown
Contributor

@pacmancoder Vladyslav Nikonov (pacmancoder) commented Jul 29, 2025

Changes

  • Make dvc named pipe proxy cross-platform (Unix implementation via tokio::net::unix::UnixStream)
  • Removed unsafe code for Windows implementation, switched to tokio::net::windows::named_pipe

Testing

This feature can be used in the same way as on Windows, however instead of GUI test app there is new basic CLI app

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 29, 2025

Coverage Report 🤖 ⚙️

Past:
Total lines: 28665
Covered lines: 17562 (61.27%)

New:
Total lines: 28665
Covered lines: 17562 (61.27%)

Diff: +0.00%

[this comment will be updated automatically]

@pacmancoder Vladyslav Nikonov (pacmancoder) changed the title [DRAFT] feat(dvc): make dvc named pipe proxy cross-platform feat(dvc): make dvc named pipe proxy cross-platform Jul 30, 2025
@pacmancoder Vladyslav Nikonov (pacmancoder) marked this pull request as ready for review July 30, 2025 14:40
Comment on lines +68 to +71
/*
match fs::metadata(&ctx.pipe_name).await
{
Ok(metadata) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question: Leftover?

"Win32_System_IO",
] }
tokio = { version = "1", features = ["net", "rt", "sync", "macros", "io-util"]}
async-trait = "0.1"
Copy link
Copy Markdown
Member

@CBenoit Benoît Cortier (CBenoit) Jul 31, 2025

Choose a reason for hiding this comment

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

note: We loose the sync-friendly non-tokio-specific interface you made efforts to keep, but at the same time the tradeoff seems worth it.

question: Just to be on the safe side, can you double check you really enabled only the minimal amount of features?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep, feature set is minimal

Copy link
Copy Markdown
Member

@CBenoit Benoît Cortier (CBenoit) left a comment

Choose a reason for hiding this comment

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

LGTM!

I appreciate that the API surface is very small. I see you were careful about making tokio an internal, implementation detail.

However, the downside is that we end up using two runtimes, and it’s overall a bit heavier. Maybe you could expose an async function to "ignite" the worker manually into the tokio thread pool of the consumer, and use some opaque handle that can be re-injected into DvcNamedPipeProxy, and re-used in start.

Feel free to modify and merge yourself!

@pacmancoder
Copy link
Copy Markdown
Contributor Author

However, the downside is that we end up using two runtimes, and it’s overall a bit heavier. Maybe you could expose an async function to "ignite" the worker manually into the tokio thread pool of the consumer, and use some opaque handle that can be re-injected into DvcNamedPipeProxy, and re-used in start.

Decided to keep it as-is for now, as the current dvc proxy uses current_thread runtime with a single thread spawned; Should not be a problem, as we only need to proxy a single channel.

@pacmancoder Vladyslav Nikonov (pacmancoder) merged commit 166b760 into master Aug 4, 2025
10 checks passed
@pacmancoder Vladyslav Nikonov (pacmancoder) deleted the feat/dvc-proxy-cross-platform branch August 4, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants