mirror of https://github.com/docker/cli.git
vendor: github.com/moby/buildkit v0.10.2
full diff: https://github.com/moby/buildkit/compare/v0.10.0...v0.10.2 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
b3f3beb739
commit
863780d0d7
|
@ -21,7 +21,7 @@ require (
|
||||||
github.com/imdario/mergo v0.3.12
|
github.com/imdario/mergo v0.3.12
|
||||||
github.com/mattn/go-runewidth v0.0.13
|
github.com/mattn/go-runewidth v0.0.13
|
||||||
github.com/mitchellh/mapstructure v1.3.2
|
github.com/mitchellh/mapstructure v1.3.2
|
||||||
github.com/moby/buildkit v0.10.0
|
github.com/moby/buildkit v0.10.2
|
||||||
github.com/moby/swarmkit/v2 v2.0.0-20220420172245-6068d1894d46
|
github.com/moby/swarmkit/v2 v2.0.0-20220420172245-6068d1894d46
|
||||||
github.com/moby/sys/signal v0.7.0
|
github.com/moby/sys/signal v0.7.0
|
||||||
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
|
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
|
||||||
|
@ -71,7 +71,7 @@ require (
|
||||||
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
|
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
|
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
|
||||||
google.golang.org/grpc v1.44.0 // indirect
|
google.golang.org/grpc v1.45.0 // indirect
|
||||||
google.golang.org/protobuf v1.27.1 // indirect
|
google.golang.org/protobuf v1.27.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
10
vendor.sum
10
vendor.sum
|
@ -89,7 +89,7 @@ github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u9
|
||||||
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
|
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
|
||||||
github.com/containerd/containerd v1.6.3 h1:JfgUEIAH07xDWk6kqz0P3ArZt+KJ9YeihSC9uyFtSKg=
|
github.com/containerd/containerd v1.6.3 h1:JfgUEIAH07xDWk6kqz0P3ArZt+KJ9YeihSC9uyFtSKg=
|
||||||
github.com/containerd/containerd v1.6.3/go.mod h1:gCVGrYRYFm2E8GmuUIbj/NGD7DLZQLzSJQazjVKDOig=
|
github.com/containerd/containerd v1.6.3/go.mod h1:gCVGrYRYFm2E8GmuUIbj/NGD7DLZQLzSJQazjVKDOig=
|
||||||
github.com/containerd/continuity v0.2.2 h1:QSqfxcn8c+12slxwu00AtzXrsami0MJb/MQs9lOLHLA=
|
github.com/containerd/continuity v0.2.3-0.20220330195504-d132b287edc8 h1:yGFEcFNMhze29DxAAB33v/1OMRYF/cM9iwwgV2P0ZrE=
|
||||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
|
@ -276,8 +276,8 @@ github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WT
|
||||||
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||||
github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg=
|
github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg=
|
||||||
github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/moby/buildkit v0.10.0 h1:ElHQJJdnj/VR/pfNJwhrjQJj8GXFIwVNGZh/Qbd5tVo=
|
github.com/moby/buildkit v0.10.2 h1:jywa+mPPtsfCQqpIbt72RUKf49hTTCirTqIs4LG0n+8=
|
||||||
github.com/moby/buildkit v0.10.0/go.mod h1:WvwAZv8aRScHkqc/+X46cRC2CKMKpqcaX+pRvUTtPes=
|
github.com/moby/buildkit v0.10.2/go.mod h1:jxeOuly98l9gWHai0Ojrbnczrk/rf+o9/JqNhY+UCSo=
|
||||||
github.com/moby/swarmkit/v2 v2.0.0-20220420172245-6068d1894d46 h1:FVr9eatIpN7PlE2ZHP850rIJ6AQoZxoZvPSDR+WQY38=
|
github.com/moby/swarmkit/v2 v2.0.0-20220420172245-6068d1894d46 h1:FVr9eatIpN7PlE2ZHP850rIJ6AQoZxoZvPSDR+WQY38=
|
||||||
github.com/moby/swarmkit/v2 v2.0.0-20220420172245-6068d1894d46/go.mod h1:/so6Lct4y1x14UprW/loFsOe6xoXVTlvh25V36ULXNQ=
|
github.com/moby/swarmkit/v2 v2.0.0-20220420172245-6068d1894d46/go.mod h1:/so6Lct4y1x14UprW/loFsOe6xoXVTlvh25V36ULXNQ=
|
||||||
github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
|
github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
|
||||||
|
@ -702,8 +702,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM
|
||||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||||
google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg=
|
google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
|
||||||
google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
|
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||||
|
|
|
@ -53,9 +53,8 @@ How to get your contributions merged smoothly and quickly.
|
||||||
- **All tests need to be passing** before your change can be merged. We
|
- **All tests need to be passing** before your change can be merged. We
|
||||||
recommend you **run tests locally** before creating your PR to catch breakages
|
recommend you **run tests locally** before creating your PR to catch breakages
|
||||||
early on.
|
early on.
|
||||||
- `make all` to test everything, OR
|
- `VET_SKIP_PROTO=1 ./vet.sh` to catch vet errors
|
||||||
- `make vet` to catch vet errors
|
- `go test -cpu 1,4 -timeout 7m ./...` to run the tests
|
||||||
- `make test` to run the tests
|
- `go test -race -cpu 1,4 -timeout 7m ./...` to run tests in race mode
|
||||||
- `make testrace` to run tests in race mode
|
|
||||||
|
|
||||||
- Exceptions to the rules can be made if there's a compelling reason for doing so.
|
- Exceptions to the rules can be made if there's a compelling reason for doing so.
|
||||||
|
|
|
@ -79,7 +79,7 @@ var (
|
||||||
// errNoTransportSecurity indicates that there is no transport security
|
// errNoTransportSecurity indicates that there is no transport security
|
||||||
// being set for ClientConn. Users should either set one or explicitly
|
// being set for ClientConn. Users should either set one or explicitly
|
||||||
// call WithInsecure DialOption to disable security.
|
// call WithInsecure DialOption to disable security.
|
||||||
errNoTransportSecurity = errors.New("grpc: no transport security set (use grpc.WithInsecure() explicitly or set credentials)")
|
errNoTransportSecurity = errors.New("grpc: no transport security set (use grpc.WithTransportCredentials(insecure.NewCredentials()) explicitly or set credentials)")
|
||||||
// errTransportCredsAndBundle indicates that creds bundle is used together
|
// errTransportCredsAndBundle indicates that creds bundle is used together
|
||||||
// with other individual Transport Credentials.
|
// with other individual Transport Credentials.
|
||||||
errTransportCredsAndBundle = errors.New("grpc: credentials.Bundle may not be used with individual TransportCredentials")
|
errTransportCredsAndBundle = errors.New("grpc: credentials.Bundle may not be used with individual TransportCredentials")
|
||||||
|
|
|
@ -70,3 +70,29 @@ type info struct {
|
||||||
func (info) AuthType() string {
|
func (info) AuthType() string {
|
||||||
return "insecure"
|
return "insecure"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// insecureBundle implements an insecure bundle.
|
||||||
|
// An insecure bundle provides a thin wrapper around insecureTC to support
|
||||||
|
// the credentials.Bundle interface.
|
||||||
|
type insecureBundle struct{}
|
||||||
|
|
||||||
|
// NewBundle returns a bundle with disabled transport security and no per rpc credential.
|
||||||
|
func NewBundle() credentials.Bundle {
|
||||||
|
return insecureBundle{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewWithMode returns a new insecure Bundle. The mode is ignored.
|
||||||
|
func (insecureBundle) NewWithMode(string) (credentials.Bundle, error) {
|
||||||
|
return insecureBundle{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// PerRPCCredentials returns an nil implementation as insecure
|
||||||
|
// bundle does not support a per rpc credential.
|
||||||
|
func (insecureBundle) PerRPCCredentials() credentials.PerRPCCredentials {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// TransportCredentials returns the underlying insecure transport credential.
|
||||||
|
func (insecureBundle) TransportCredentials() credentials.TransportCredentials {
|
||||||
|
return NewCredentials()
|
||||||
|
}
|
||||||
|
|
|
@ -72,9 +72,12 @@ type UnaryServerInfo struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnaryHandler defines the handler invoked by UnaryServerInterceptor to complete the normal
|
// UnaryHandler defines the handler invoked by UnaryServerInterceptor to complete the normal
|
||||||
// execution of a unary RPC. If a UnaryHandler returns an error, it should be produced by the
|
// execution of a unary RPC.
|
||||||
// status package, or else gRPC will use codes.Unknown as the status code and err.Error() as
|
//
|
||||||
// the status message of the RPC.
|
// If a UnaryHandler returns an error, it should either be produced by the
|
||||||
|
// status package, or be one of the context errors. Otherwise, gRPC will use
|
||||||
|
// codes.Unknown as the status code and err.Error() as the status message of the
|
||||||
|
// RPC.
|
||||||
type UnaryHandler func(ctx context.Context, req interface{}) (interface{}, error)
|
type UnaryHandler func(ctx context.Context, req interface{}) (interface{}, error)
|
||||||
|
|
||||||
// UnaryServerInterceptor provides a hook to intercept the execution of a unary RPC on the server. info
|
// UnaryServerInterceptor provides a hook to intercept the execution of a unary RPC on the server. info
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
package channelz
|
package channelz
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -49,7 +50,8 @@ var (
|
||||||
// TurnOn turns on channelz data collection.
|
// TurnOn turns on channelz data collection.
|
||||||
func TurnOn() {
|
func TurnOn() {
|
||||||
if !IsOn() {
|
if !IsOn() {
|
||||||
NewChannelzStorage()
|
db.set(newChannelMap())
|
||||||
|
idGen.reset()
|
||||||
atomic.StoreInt32(&curState, 1)
|
atomic.StoreInt32(&curState, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,46 +96,40 @@ func (d *dbWrapper) get() *channelMap {
|
||||||
return d.DB
|
return d.DB
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewChannelzStorage initializes channelz data storage and id generator.
|
// NewChannelzStorageForTesting initializes channelz data storage and id
|
||||||
|
// generator for testing purposes.
|
||||||
//
|
//
|
||||||
// This function returns a cleanup function to wait for all channelz state to be reset by the
|
// Returns a cleanup function to be invoked by the test, which waits for up to
|
||||||
// grpc goroutines when those entities get closed. By using this cleanup function, we make sure tests
|
// 10s for all channelz state to be reset by the grpc goroutines when those
|
||||||
// don't mess up each other, i.e. lingering goroutine from previous test doing entity removal happen
|
// entities get closed. This cleanup function helps with ensuring that tests
|
||||||
// to remove some entity just register by the new test, since the id space is the same.
|
// don't mess up each other.
|
||||||
//
|
func NewChannelzStorageForTesting() (cleanup func() error) {
|
||||||
// Note: This function is exported for testing purpose only. User should not call
|
db.set(newChannelMap())
|
||||||
// it in most cases.
|
|
||||||
func NewChannelzStorage() (cleanup func() error) {
|
|
||||||
db.set(&channelMap{
|
|
||||||
topLevelChannels: make(map[int64]struct{}),
|
|
||||||
channels: make(map[int64]*channel),
|
|
||||||
listenSockets: make(map[int64]*listenSocket),
|
|
||||||
normalSockets: make(map[int64]*normalSocket),
|
|
||||||
servers: make(map[int64]*server),
|
|
||||||
subChannels: make(map[int64]*subChannel),
|
|
||||||
})
|
|
||||||
idGen.reset()
|
idGen.reset()
|
||||||
|
|
||||||
return func() error {
|
return func() error {
|
||||||
var err error
|
|
||||||
cm := db.get()
|
cm := db.get()
|
||||||
if cm == nil {
|
if cm == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
for i := 0; i < 1000; i++ {
|
|
||||||
cm.mu.Lock()
|
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
if len(cm.topLevelChannels) == 0 && len(cm.servers) == 0 && len(cm.channels) == 0 && len(cm.subChannels) == 0 && len(cm.listenSockets) == 0 && len(cm.normalSockets) == 0 {
|
defer cancel()
|
||||||
cm.mu.Unlock()
|
ticker := time.NewTicker(10 * time.Millisecond)
|
||||||
// all things stored in the channelz map have been cleared.
|
defer ticker.Stop()
|
||||||
|
for {
|
||||||
|
cm.mu.RLock()
|
||||||
|
topLevelChannels, servers, channels, subChannels, listenSockets, normalSockets := len(cm.topLevelChannels), len(cm.servers), len(cm.channels), len(cm.subChannels), len(cm.listenSockets), len(cm.normalSockets)
|
||||||
|
cm.mu.RUnlock()
|
||||||
|
|
||||||
|
if err := ctx.Err(); err != nil {
|
||||||
|
return fmt.Errorf("after 10s the channelz map has not been cleaned up yet, topchannels: %d, servers: %d, channels: %d, subchannels: %d, listen sockets: %d, normal sockets: %d", topLevelChannels, servers, channels, subChannels, listenSockets, normalSockets)
|
||||||
|
}
|
||||||
|
if topLevelChannels == 0 && servers == 0 && channels == 0 && subChannels == 0 && listenSockets == 0 && normalSockets == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
cm.mu.Unlock()
|
<-ticker.C
|
||||||
time.Sleep(10 * time.Millisecond)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cm.mu.Lock()
|
|
||||||
err = fmt.Errorf("after 10s the channelz map has not been cleaned up yet, topchannels: %d, servers: %d, channels: %d, subchannels: %d, listen sockets: %d, normal sockets: %d", len(cm.topLevelChannels), len(cm.servers), len(cm.channels), len(cm.subChannels), len(cm.listenSockets), len(cm.normalSockets))
|
|
||||||
cm.mu.Unlock()
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,6 +322,17 @@ type channelMap struct {
|
||||||
normalSockets map[int64]*normalSocket
|
normalSockets map[int64]*normalSocket
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func newChannelMap() *channelMap {
|
||||||
|
return &channelMap{
|
||||||
|
topLevelChannels: make(map[int64]struct{}),
|
||||||
|
channels: make(map[int64]*channel),
|
||||||
|
listenSockets: make(map[int64]*listenSocket),
|
||||||
|
normalSockets: make(map[int64]*normalSocket),
|
||||||
|
servers: make(map[int64]*server),
|
||||||
|
subChannels: make(map[int64]*subChannel),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (c *channelMap) addServer(id int64, s *server) {
|
func (c *channelMap) addServer(id int64, s *server) {
|
||||||
c.mu.Lock()
|
c.mu.Lock()
|
||||||
s.cm = c
|
s.cm = c
|
||||||
|
|
|
@ -26,13 +26,13 @@ import (
|
||||||
const (
|
const (
|
||||||
// XDSBootstrapFileNameEnv is the env variable to set bootstrap file name.
|
// XDSBootstrapFileNameEnv is the env variable to set bootstrap file name.
|
||||||
// Do not use this and read from env directly. Its value is read and kept in
|
// Do not use this and read from env directly. Its value is read and kept in
|
||||||
// variable BootstrapFileName.
|
// variable XDSBootstrapFileName.
|
||||||
//
|
//
|
||||||
// When both bootstrap FileName and FileContent are set, FileName is used.
|
// When both bootstrap FileName and FileContent are set, FileName is used.
|
||||||
XDSBootstrapFileNameEnv = "GRPC_XDS_BOOTSTRAP"
|
XDSBootstrapFileNameEnv = "GRPC_XDS_BOOTSTRAP"
|
||||||
// XDSBootstrapFileContentEnv is the env variable to set bootstrapp file
|
// XDSBootstrapFileContentEnv is the env variable to set bootstrap file
|
||||||
// content. Do not use this and read from env directly. Its value is read
|
// content. Do not use this and read from env directly. Its value is read
|
||||||
// and kept in variable BootstrapFileName.
|
// and kept in variable XDSBootstrapFileContent.
|
||||||
//
|
//
|
||||||
// When both bootstrap FileName and FileContent are set, FileName is used.
|
// When both bootstrap FileName and FileContent are set, FileName is used.
|
||||||
XDSBootstrapFileContentEnv = "GRPC_XDS_BOOTSTRAP_CONFIG"
|
XDSBootstrapFileContentEnv = "GRPC_XDS_BOOTSTRAP_CONFIG"
|
||||||
|
@ -41,6 +41,7 @@ const (
|
||||||
clientSideSecuritySupportEnv = "GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT"
|
clientSideSecuritySupportEnv = "GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT"
|
||||||
aggregateAndDNSSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER"
|
aggregateAndDNSSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER"
|
||||||
rbacSupportEnv = "GRPC_XDS_EXPERIMENTAL_RBAC"
|
rbacSupportEnv = "GRPC_XDS_EXPERIMENTAL_RBAC"
|
||||||
|
outlierDetectionSupportEnv = "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION"
|
||||||
federationEnv = "GRPC_EXPERIMENTAL_XDS_FEDERATION"
|
federationEnv = "GRPC_EXPERIMENTAL_XDS_FEDERATION"
|
||||||
rlsInXDSEnv = "GRPC_EXPERIMENTAL_XDS_RLS_LB"
|
rlsInXDSEnv = "GRPC_EXPERIMENTAL_XDS_RLS_LB"
|
||||||
|
|
||||||
|
@ -82,7 +83,10 @@ var (
|
||||||
// which can be disabled by setting the environment variable
|
// which can be disabled by setting the environment variable
|
||||||
// "GRPC_XDS_EXPERIMENTAL_RBAC" to "false".
|
// "GRPC_XDS_EXPERIMENTAL_RBAC" to "false".
|
||||||
XDSRBAC = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false")
|
XDSRBAC = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false")
|
||||||
|
// XDSOutlierDetection indicates whether outlier detection support is
|
||||||
|
// enabled, which can be enabled by setting the environment variable
|
||||||
|
// "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "true".
|
||||||
|
XDSOutlierDetection = strings.EqualFold(os.Getenv(outlierDetectionSupportEnv), "true")
|
||||||
// XDSFederation indicates whether federation support is enabled.
|
// XDSFederation indicates whether federation support is enabled.
|
||||||
XDSFederation = strings.EqualFold(os.Getenv(federationEnv), "true")
|
XDSFederation = strings.EqualFold(os.Getenv(federationEnv), "true")
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,10 @@ var (
|
||||||
// KeepaliveMinPingTime is the minimum ping interval. This must be 10s by
|
// KeepaliveMinPingTime is the minimum ping interval. This must be 10s by
|
||||||
// default, but tests may wish to set it lower for convenience.
|
// default, but tests may wish to set it lower for convenience.
|
||||||
KeepaliveMinPingTime = 10 * time.Second
|
KeepaliveMinPingTime = 10 * time.Second
|
||||||
// ParseServiceConfigForTesting is for creating a fake
|
// ParseServiceConfig parses a JSON representation of the service config.
|
||||||
// ClientConn for resolver testing only
|
ParseServiceConfig interface{} // func(string) *serviceconfig.ParseResult
|
||||||
ParseServiceConfigForTesting interface{} // func(string) *serviceconfig.ParseResult
|
|
||||||
// EqualServiceConfigForTesting is for testing service config generation and
|
// EqualServiceConfigForTesting is for testing service config generation and
|
||||||
// parsing. Both a and b should be returned by ParseServiceConfigForTesting.
|
// parsing. Both a and b should be returned by ParseServiceConfig.
|
||||||
// This function compares the config without rawJSON stripped, in case the
|
// This function compares the config without rawJSON stripped, in case the
|
||||||
// there's difference in white space.
|
// there's difference in white space.
|
||||||
EqualServiceConfigForTesting func(a, b serviceconfig.Config) bool
|
EqualServiceConfigForTesting func(a, b serviceconfig.Config) bool
|
||||||
|
|
|
@ -741,6 +741,12 @@ func (e ConnectionError) Origin() error {
|
||||||
return e.err
|
return e.err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unwrap returns the original error of this connection error or nil when the
|
||||||
|
// origin is nil.
|
||||||
|
func (e ConnectionError) Unwrap() error {
|
||||||
|
return e.err
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// ErrConnClosing indicates that the transport is closing.
|
// ErrConnClosing indicates that the transport is closing.
|
||||||
ErrConnClosing = connectionErrorf(true, nil, "transport is closing")
|
ErrConnClosing = connectionErrorf(true, nil, "transport is closing")
|
||||||
|
|
|
@ -27,9 +27,9 @@ export PATH=${GOBIN}:${PATH}
|
||||||
mkdir -p ${GOBIN}
|
mkdir -p ${GOBIN}
|
||||||
|
|
||||||
echo "remove existing generated files"
|
echo "remove existing generated files"
|
||||||
# grpc_testingv3/testv3.pb.go is not re-generated because it was
|
# grpc_testing_not_regenerate/*.pb.go is not re-generated,
|
||||||
# intentionally generated by an older version of protoc-gen-go.
|
# see grpc_testing_not_regenerate/README.md for details.
|
||||||
rm -f $(find . -name '*.pb.go' | grep -v 'grpc_testingv3/testv3.pb.go')
|
rm -f $(find . -name '*.pb.go' | grep -v 'grpc_testing_not_regenerate')
|
||||||
|
|
||||||
echo "go install google.golang.org/protobuf/cmd/protoc-gen-go"
|
echo "go install google.golang.org/protobuf/cmd/protoc-gen-go"
|
||||||
(cd test/tools && go install google.golang.org/protobuf/cmd/protoc-gen-go)
|
(cd test/tools && go install google.golang.org/protobuf/cmd/protoc-gen-go)
|
||||||
|
@ -117,9 +117,9 @@ done
|
||||||
mkdir -p ${WORKDIR}/out/google.golang.org/grpc/internal/proto/grpc_lookup_v1
|
mkdir -p ${WORKDIR}/out/google.golang.org/grpc/internal/proto/grpc_lookup_v1
|
||||||
mv ${WORKDIR}/out/google.golang.org/grpc/lookup/grpc_lookup_v1/* ${WORKDIR}/out/google.golang.org/grpc/internal/proto/grpc_lookup_v1
|
mv ${WORKDIR}/out/google.golang.org/grpc/lookup/grpc_lookup_v1/* ${WORKDIR}/out/google.golang.org/grpc/internal/proto/grpc_lookup_v1
|
||||||
|
|
||||||
# grpc_testingv3/testv3.pb.go is not re-generated because it was
|
# grpc_testing_not_regenerate/*.pb.go are not re-generated,
|
||||||
# intentionally generated by an older version of protoc-gen-go.
|
# see grpc_testing_not_regenerate/README.md for details.
|
||||||
rm ${WORKDIR}/out/google.golang.org/grpc/reflection/grpc_testingv3/*.pb.go
|
rm ${WORKDIR}/out/google.golang.org/grpc/reflection/grpc_testing_not_regenerate/*.pb.go
|
||||||
|
|
||||||
# grpc/service_config/service_config.proto does not have a go_package option.
|
# grpc/service_config/service_config.proto does not have a go_package option.
|
||||||
mv ${WORKDIR}/out/grpc/service_config/service_config.pb.go internal/proto/grpc_service_config
|
mv ${WORKDIR}/out/grpc/service_config/service_config.pb.go internal/proto/grpc_service_config
|
||||||
|
|
|
@ -1283,9 +1283,10 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
||||||
if appErr != nil {
|
if appErr != nil {
|
||||||
appStatus, ok := status.FromError(appErr)
|
appStatus, ok := status.FromError(appErr)
|
||||||
if !ok {
|
if !ok {
|
||||||
// Convert appErr if it is not a grpc status error.
|
// Convert non-status application error to a status error with code
|
||||||
appErr = status.Error(codes.Unknown, appErr.Error())
|
// Unknown, but handle context errors specifically.
|
||||||
appStatus, _ = status.FromError(appErr)
|
appStatus = status.FromContextError(appErr)
|
||||||
|
appErr = appStatus.Err()
|
||||||
}
|
}
|
||||||
if trInfo != nil {
|
if trInfo != nil {
|
||||||
trInfo.tr.LazyLog(stringer(appStatus.Message()), true)
|
trInfo.tr.LazyLog(stringer(appStatus.Message()), true)
|
||||||
|
@ -1549,7 +1550,9 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
|
||||||
if appErr != nil {
|
if appErr != nil {
|
||||||
appStatus, ok := status.FromError(appErr)
|
appStatus, ok := status.FromError(appErr)
|
||||||
if !ok {
|
if !ok {
|
||||||
appStatus = status.New(codes.Unknown, appErr.Error())
|
// Convert non-status application error to a status error with code
|
||||||
|
// Unknown, but handle context errors specifically.
|
||||||
|
appStatus = status.FromContextError(appErr)
|
||||||
appErr = appStatus.Err()
|
appErr = appStatus.Err()
|
||||||
}
|
}
|
||||||
if trInfo != nil {
|
if trInfo != nil {
|
||||||
|
|
|
@ -218,7 +218,7 @@ type jsonSC struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
internal.ParseServiceConfigForTesting = parseServiceConfig
|
internal.ParseServiceConfig = parseServiceConfig
|
||||||
}
|
}
|
||||||
func parseServiceConfig(js string) *serviceconfig.ParseResult {
|
func parseServiceConfig(js string) *serviceconfig.ParseResult {
|
||||||
if len(js) == 0 {
|
if len(js) == 0 {
|
||||||
|
|
|
@ -46,10 +46,12 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// StreamHandler defines the handler called by gRPC server to complete the
|
// StreamHandler defines the handler called by gRPC server to complete the
|
||||||
// execution of a streaming RPC. If a StreamHandler returns an error, it
|
// execution of a streaming RPC.
|
||||||
// should be produced by the status package, or else gRPC will use
|
//
|
||||||
// codes.Unknown as the status code and err.Error() as the status message
|
// If a StreamHandler returns an error, it should either be produced by the
|
||||||
// of the RPC.
|
// status package, or be one of the context errors. Otherwise, gRPC will use
|
||||||
|
// codes.Unknown as the status code and err.Error() as the status message of the
|
||||||
|
// RPC.
|
||||||
type StreamHandler func(srv interface{}, stream ServerStream) error
|
type StreamHandler func(srv interface{}, stream ServerStream) error
|
||||||
|
|
||||||
// StreamDesc represents a streaming RPC service's method specification. Used
|
// StreamDesc represents a streaming RPC service's method specification. Used
|
||||||
|
|
|
@ -19,4 +19,4 @@
|
||||||
package grpc
|
package grpc
|
||||||
|
|
||||||
// Version is the current grpc version.
|
// Version is the current grpc version.
|
||||||
const Version = "1.44.1-dev"
|
const Version = "1.45.0"
|
||||||
|
|
|
@ -107,7 +107,7 @@ for MOD_FILE in $(find . -name 'go.mod'); do
|
||||||
go vet -all ./... | fail_on_output
|
go vet -all ./... | fail_on_output
|
||||||
gofmt -s -d -l . 2>&1 | fail_on_output
|
gofmt -s -d -l . 2>&1 | fail_on_output
|
||||||
goimports -l . 2>&1 | not grep -vE "\.pb\.go"
|
goimports -l . 2>&1 | not grep -vE "\.pb\.go"
|
||||||
golint ./... 2>&1 | not grep -vE "/testv3\.pb\.go:"
|
golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:"
|
||||||
|
|
||||||
go mod tidy
|
go mod tidy
|
||||||
git status --porcelain 2>&1 | fail_on_output || \
|
git status --porcelain 2>&1 | fail_on_output || \
|
||||||
|
|
|
@ -153,7 +153,7 @@ github.com/miekg/pkcs11
|
||||||
# github.com/mitchellh/mapstructure v1.3.2
|
# github.com/mitchellh/mapstructure v1.3.2
|
||||||
## explicit; go 1.14
|
## explicit; go 1.14
|
||||||
github.com/mitchellh/mapstructure
|
github.com/mitchellh/mapstructure
|
||||||
# github.com/moby/buildkit v0.10.0
|
# github.com/moby/buildkit v0.10.2
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
github.com/moby/buildkit/frontend/dockerfile/dockerignore
|
github.com/moby/buildkit/frontend/dockerfile/dockerignore
|
||||||
github.com/moby/buildkit/util/appcontext
|
github.com/moby/buildkit/util/appcontext
|
||||||
|
@ -293,7 +293,7 @@ golang.org/x/xerrors/internal
|
||||||
# google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa
|
# google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa
|
||||||
## explicit; go 1.11
|
## explicit; go 1.11
|
||||||
google.golang.org/genproto/googleapis/rpc/status
|
google.golang.org/genproto/googleapis/rpc/status
|
||||||
# google.golang.org/grpc v1.44.0
|
# google.golang.org/grpc v1.45.0
|
||||||
## explicit; go 1.14
|
## explicit; go 1.14
|
||||||
google.golang.org/grpc
|
google.golang.org/grpc
|
||||||
google.golang.org/grpc/attributes
|
google.golang.org/grpc/attributes
|
||||||
|
|
Loading…
Reference in New Issue