Switch to use containerd api types for transfer#163
Merged
dmcgowan merged 1 commit intocontainerd:mainfrom Apr 23, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the transfer stream protobuf types (ReadStream/WriteStream) from nerdbox-owned protos to the upstream github.com/containerd/containerd/api module, and removes nerdbox’s local datastream proto/generation artifacts accordingly.
Changes:
- Switch
ReadStream/WriteStreamtypeurl marshaling/unmarshaling to usegithub.com/containerd/containerd/api/types/transfer. - Remove the nerdbox
datastream.protoand its generateddatastream.pb.go. - Update
api/next.txtpbto drop the removed proto descriptor.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/transfer/types.go | Uses containerd API transfer types for stream messages; keeps nerdbox type for ContainerFilesystem. |
| api/types/transfer/v1/datastream.pb.go | Removed generated Go for stream types now sourced from containerd API. |
| api/proto/nerdbox/types/transfer/v1/datastream.proto | Removed proto source for stream types now sourced from containerd API. |
| api/next.txtpb | Removed the datastream proto descriptor entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
823a047 to
d347b46
Compare
The transfer types are not in the main containerd repo, allowing callers to use the types without copying nerdbox's proto definition or importing nerdbox. Signed-off-by: Derek McGowan <derek@mcg.dev>
d347b46 to
a143c93
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
internal/transfer/types.go:53
- The receiver variable name
cfhere is a holdover from the previousContainerFilesystemtype and is now misleading onContainerPath. Renaming the receiver (e.g.,cp) would improve readability and reduce confusion when scanning code that also deals with filesystem paths and streams.
func (cf *ContainerPath) MarshalAny(ctx context.Context, sm streaming.StreamCreator) (typeurl.Any, error) {
return typeurl.MarshalAny(&transferpb.ContainerPath{
ContainerID: cf.ContainerID,
Path: cf.Path,
NoWalk: cf.NoWalk,
PreserveOwnership: cf.PreserveOwnership,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
austinvazquez
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The transfer types are not in the main containerd repo, allowing callers to use the types without copying nerdbox's proto definition or importing nerdbox.
Any clients that use the transfer will need to be updated in tandem with this change.