Skip to content

[fix][fn] Remove deprecated github.com/golang/protobuf dependency from pulsar-function-go - #26587

Merged
merlimat merged 1 commit into
apache:masterfrom
mariusgassen:fix/protobuf-dependency
Sep 15, 2026
Merged

merlimat merged 1 commit into
apache:masterfrom
mariusgassen:fix/protobuf-dependency

Conversation

@mariusgassen

Copy link
Copy Markdown
Contributor

Motivation

github.com/golang/protobuf is the older, deprecated wrapper around the
canonical google.golang.org/protobuf module. The pulsar-function-go
module retained a direct dependency on it solely for empty.Empty
(github.com/golang/protobuf/ptypes/empty). The canonical replacement
is emptypb.Empty from google.golang.org/protobuf/types/known/emptypb,
which is already a transitive dependency of the module.

Modifications

  • pulsar-function-go/pf/instance.go: replace empty.Empty import and
    usage with emptypb.Empty from google.golang.org/protobuf.
  • pulsar-function-go/pf/stats_test.go: same replacement in the test
    file's two GetMetrics call sites.
  • pulsar-function-go/go.mod: remove the now-unused
    github.com/golang/protobuf v1.5.4 direct dependency.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

The existing TestInstanceControlMetrics test exercises the affected
GetMetrics call sites and continues to pass after the replacement.

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

@mariusgassen mariusgassen changed the title [fix][build] Remove deprecated github.com/golang/protobuf dependency from pulsar-function-go [fix][fn] Remove deprecated github.com/golang/protobuf dependency from pulsar-function-go Sep 15, 2026
…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
mariusgassen force-pushed the fix/protobuf-dependency branch from f708c9d to 15733a0 Compare September 15, 2026 11:01
@merlimat
merlimat merged commit 511fc9d into apache:master Sep 15, 2026
44 checks passed
@mariusgassen
mariusgassen deleted the fix/protobuf-dependency branch September 16, 2026 06:33
@lhotari lhotari added this to the 5.0.0 milestone Sep 23, 2026
lhotari pushed a commit that referenced this pull request Sep 23, 2026
lhotari pushed a commit that referenced this pull request Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants