Add http.RoundTripper to remotefs FS via curl/PowerShell#322
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an HTTP proxying capability to remotefs by introducing an HTTPTransport interface (with RoundTrip) implemented by both PosixFS (via curl) and WinFS (via Invoke-WebRequest), and refactors HTTP status probing into a free function that operates on that transport.
Changes:
- Introduces
HTTPTransport(includingRoundTrip) and embeds it intoremotefs.FS; movesDownloadURLinto the new transport interface. - Implements
http.RoundTripperonPosixFS(curl) andWinFS(PowerShellInvoke-WebRequest) by returning a parsed raw HTTP/1.1 response. - Adds unit tests for RoundTrip behavior and the new
HTTPStatushelper.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
remotefs/http.go |
Adds HTTPTransport, HTTPStatus, and raw HTTP response parsing helper. |
remotefs/http_test.go |
Adds unit tests for RoundTrip on Posix/Windows and for HTTPStatus. |
remotefs/types.go |
Embeds HTTPTransport into FS and removes DownloadURL from OS. |
remotefs/posixfs.go |
Implements RoundTrip using curl on the remote host. |
remotefs/winfs.go |
Implements RoundTrip using PowerShell Invoke-WebRequest on the remote host. |
remotefs/hostinfo_test.go |
Adds tests covering HTTPStatus for both Posix and Windows implementations. |
remotefs/upload_test.go |
Updates the upload FS test stub to satisfy the expanded FS interface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Implements http.RoundTripper on PosixFS (curl) and WinFS (Invoke-WebRequest), moves DownloadURL into the new HTTPTransport interface embedded in FS, and replaces the HTTPStatus method on OS with a free function taking HTTPTransport. Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Implements http.RoundTripper on PosixFS (curl) and WinFS (Invoke-WebRequest), moves DownloadURL into the new HTTPTransport interface embedded in FS, and replaces the HTTPStatus method.
Part of the rig v2 last mile effort. Breaking API is not a problem as rig v2 has not been released yet.