Skip to content

core/proxy: Convert stream proxy errors to native errdefs - #13586

Merged
AkihiroSuda merged 1 commit into
containerd:mainfrom
vvoland:streaming-grpc-errors
Jun 15, 2026
Merged

AkihiroSuda merged 1 commit into
containerd:mainfrom
vvoland:streaming-grpc-errors

Conversation

@vvoland

@vvoland vvoland commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Some proxy stream setup and receive paths still returned raw RPC status errors while neighboring proxy methods normalized them with errgrpc.ToNative. This made errdefs checks depend on which proxy API surfaced the same remote failure.

Normalize event subscription setup and receive errors, and streaming stream creation errors, while preserving io.EOF for completed receive streams.

Some proxy stream setup and receive paths still returned raw RPC
status errors while neighboring proxy methods normalized them with
errgrpc.ToNative. This made errdefs checks depend on which proxy API
surfaced the same remote failure.

Normalize event subscription setup and receive errors, and streaming
stream creation errors, while preserving io.EOF for completed receive
streams.

Signed-off-by: Paweł Gronowski <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR normalizes remaining proxy streaming/event-subscription error paths so callers consistently receive native errdefs-compatible errors (via errgrpc.ToNative), avoiding API-dependent behavior when the same remote failure is surfaced through different proxy methods.

Changes:

  • Convert streamCreator.Create() stream creation errors to native errors via errgrpc.ToNative.
  • Convert remote events subscription setup errors to native errors.
  • Convert remote events subscription receive errors to native errors while preserving io.EOF for clean stream completion.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
core/streaming/proxy/streaming.go Normalizes stream creation errors with errgrpc.ToNative for consistent errdefs behavior.
core/events/proxy/remote_events.go Normalizes subscribe/recv errors with errgrpc.ToNative while keeping io.EOF unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vvoland
vvoland marked this pull request as ready for review June 12, 2026 13:03

@thaJeztah thaJeztah left a comment

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.

LGTM

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Jun 15, 2026
@AkihiroSuda
AkihiroSuda added this pull request to the merge queue Jun 15, 2026
@AkihiroSuda

Copy link
Copy Markdown
Member

@vvoland Do you want this to be cherry-picked ?

Merged via the queue into containerd:main with commit a547286 Jun 15, 2026
87 of 88 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants