[fix][fn] Remove deprecated github.com/golang/protobuf dependency from pulsar-function-go - #26587
Merged
Merged
Conversation
…nction-go Replace the last usage of `empty.Empty` from the deprecated `github.com/golang/protobuf/ptypes/empty` package with `emptypb.Empty` from `google.golang.org/protobuf/types/known/emptypb`, and drop the dependency from go.mod.
mariusgassen
force-pushed
the
fix/protobuf-dependency
branch
from
September 15, 2026 11:01
f708c9d to
15733a0
Compare
merlimat
approved these changes
Sep 15, 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.
Motivation
github.com/golang/protobufis the older, deprecated wrapper around thecanonical
google.golang.org/protobufmodule. Thepulsar-function-gomodule retained a direct dependency on it solely for
empty.Empty(
github.com/golang/protobuf/ptypes/empty). The canonical replacementis
emptypb.Emptyfromgoogle.golang.org/protobuf/types/known/emptypb,which is already a transitive dependency of the module.
Modifications
pulsar-function-go/pf/instance.go: replaceempty.Emptyimport andusage with
emptypb.Emptyfromgoogle.golang.org/protobuf.pulsar-function-go/pf/stats_test.go: same replacement in the testfile's two
GetMetricscall sites.pulsar-function-go/go.mod: remove the now-unusedgithub.com/golang/protobuf v1.5.4direct dependency.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
The existing
TestInstanceControlMetricstest exercises the affectedGetMetricscall sites and continues to pass after the replacement.Does this pull request potentially affect one of the following parts: