Skip to content

Commit

Permalink
chore(deps): Bump github.com/hashicorp/go-plugin from 1.4.5 to 1.4.6 (#…
Browse files Browse the repository at this point in the history
…374)

* chore(deps): Bump github.com/hashicorp/go-plugin from 1.4.5 to 1.4.6

Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/hashicorp/go-plugin/releases)
- [Changelog](https://github.com/hashicorp/go-plugin/blob/master/CHANGELOG.md)
- [Commits](hashicorp/go-plugin@v1.4.5...v1.4.6)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* update codegen

Signed-off-by: cpanato <ctadeu@gmail.com>

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: cpanato <ctadeu@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cpanato <ctadeu@gmail.com>
  • Loading branch information
dependabot[bot] and cpanato committed Nov 11, 2022
1 parent 139248c commit da75ca3
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 213 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/hashicorp/go-hclog v1.3.1
github.com/hashicorp/go-immutable-radix v1.3.1
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-plugin v1.4.5
github.com/hashicorp/go-plugin v1.4.6
github.com/hashicorp/go-retryablehttp v0.7.1
github.com/hashicorp/go-rootcerts v1.0.2
github.com/hashicorp/go-secure-stdlib/mlock v0.1.2
Expand Down Expand Up @@ -59,7 +59,7 @@ require (
k8s.io/client-go v0.25.3
k8s.io/code-generator v0.25.3
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280
knative.dev/hack v0.0.0-20221024013916-9d2ae47c16b2
knative.dev/hack v0.0.0-20221104013908-8f3c7050408b
knative.dev/hack/schema v0.0.0-20221024013916-9d2ae47c16b2
knative.dev/pkg v0.0.0-20221027143007-728dfd8e2862
sigs.k8s.io/release-utils v0.7.3
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,8 @@ github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-plugin v1.4.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo=
github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s=
github.com/hashicorp/go-plugin v1.4.6 h1:MDV3UrKQBM3du3G7MApDGvOsMYy3JQJ4exhSoKBAeVA=
github.com/hashicorp/go-plugin v1.4.6/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s=
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ=
github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
Expand Down Expand Up @@ -1972,8 +1972,8 @@ k8s.io/legacy-cloud-providers v0.21.0/go.mod h1:bNxo7gDg+PGkBmT/MFZswLTWdSWK9kAl
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20221012122500-cfd413dd9e85 h1:cTdVh7LYu82xeClmfzGtgyspNh6UxpwLWGi8R4sspNo=
k8s.io/utils v0.0.0-20221012122500-cfd413dd9e85/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/hack v0.0.0-20221024013916-9d2ae47c16b2 h1:DvWcy2c6wvjDo+rPRWe9Rn5QEH8fiq/j4QWOka0wMvQ=
knative.dev/hack v0.0.0-20221024013916-9d2ae47c16b2/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/hack v0.0.0-20221104013908-8f3c7050408b h1:EqqlOqjCy/hVexdmPpUjcplO2eZc12+jTdTpodfLaI4=
knative.dev/hack v0.0.0-20221104013908-8f3c7050408b/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/hack/schema v0.0.0-20221024013916-9d2ae47c16b2 h1:X3EYiEmuqxiVSOPG1CsuRO+QUA956BvUw79A6oXrrs0=
knative.dev/hack/schema v0.0.0-20221024013916-9d2ae47c16b2/go.mod h1:GeIb+PLd5mllawcpHEGF5J5fYTQrvgEO5liao8lUKUs=
knative.dev/pkg v0.0.0-20221027143007-728dfd8e2862 h1:nN2KChHl+Cs3tGSLtmkNy21STwb0NRiWomdBw4jMSSU=
Expand Down
201 changes: 0 additions & 201 deletions third_party/VENDOR-LICENSE/github.com/LICENSE

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.4.6

BUG FIXES:

* server: Prevent gRPC broker goroutine leak when using `GRPCServer` type `GracefulStop()` or `Stop()` methods [[GH-220](https://github.com/hashicorp/go-plugin/pull/220)]

## v1.4.5

ENHANCEMENTS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Copyright (c) 2016 HashiCorp, Inc.

Mozilla Public License, version 2.0

1. Definitions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,26 @@ func (s *GRPCServer) Init() error {
return nil
}

// Stop calls Stop on the underlying grpc.Server
// Stop calls Stop on the underlying grpc.Server and Close on the underlying
// grpc.Broker if present.
func (s *GRPCServer) Stop() {
s.server.Stop()

if s.broker != nil {
s.broker.Close()
s.broker = nil
}
}

// GracefulStop calls GracefulStop on the underlying grpc.Server
// GracefulStop calls GracefulStop on the underlying grpc.Server and Close on
// the underlying grpc.Broker if present.
func (s *GRPCServer) GracefulStop() {
s.server.GracefulStop()

if s.broker != nil {
s.broker.Close()
s.broker = nil
}
}

// Config is the GRPCServerConfig encoded as JSON then base64.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ func (s *RPCServer) Config() string { return "" }

// ServerProtocol impl.
func (s *RPCServer) Serve(lis net.Listener) {
defer s.done()

for {
conn, err := lis.Accept()
if err != nil {
Expand Down Expand Up @@ -82,7 +84,7 @@ func (s *RPCServer) ServeConn(conn io.ReadWriteCloser) {

// Connect the stdstreams (in, out, err)
stdstream := make([]net.Conn, 2)
for i, _ := range stdstream {
for i := range stdstream {
stdstream[i], err = mux.Accept()
if err != nil {
mux.Close()
Expand Down Expand Up @@ -133,13 +135,15 @@ type controlServer struct {
// Ping can be called to verify the connection (and likely the binary)
// is still alive to a plugin.
func (c *controlServer) Ping(
null bool, response *struct{}) error {
null bool, response *struct{},
) error {
*response = struct{}{}
return nil
}

func (c *controlServer) Quit(
null bool, response *struct{}) error {
null bool, response *struct{},
) error {
// End the server
c.server.done()

Expand All @@ -156,7 +160,8 @@ type dispenseServer struct {
}

func (d *dispenseServer) Dispense(
name string, response *uint32) error {
name string, response *uint32,
) error {
// Find the function to create this implementation
p, ok := d.plugins[name]
if !ok {
Expand Down

0 comments on commit da75ca3

Please sign in to comment.