Conversation
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
/test |
grpcserver/inputhandler.go
Outdated
| opts := []grpc.ServerOption{grpc.Creds(grpcTLS)} | ||
| opts := []grpc.ServerOption{ | ||
| grpc.Creds(grpcTLS), | ||
| grpc.MaxRecvMsgSize(64 * (1 << 20)), // Allow RPCs of up to 64MB |
There was a problem hiding this comment.
Nit: Looks like elastic-agent-shipper already indirectly pulls in the https://pkg.go.dev/github.com/docker/go-units#pkg-constants package. So you could use 64 * MiB here if you wanted the code to be more self-documenting.
| github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= | ||
| github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= | ||
| github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= | ||
| github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= |
There was a problem hiding this comment.
Odd. I thought we this module (elastic-agent-shipper) was already using github.com/docker/go-units as an indirect dependency via the github.com/elastic/beats/v7 direct dependency:
~/development/github/elastic-agent-shipper >> main $ go mod graph | grep go-units
github.com/elastic/beats/v7@v7.0.0-alpha2.0.20220810153818-dd118efed5a5 github.com/docker/go-units@v0.4.0
Wonder why there was no mention of github.com/docker/go-units in go.sum already, then? 🤔
There was a problem hiding this comment.
ah, it's 0.4.0 vs 0.5.0, when I made the dependency explicit it grabbed the latest version
There was a problem hiding this comment.
But shouldn't there have been two lines for 0.4.0 in go.sum already? I thought go.sum captured all dependencies - direct and indirect - but I guess I'm misunderstanding.
There was a problem hiding this comment.
My bad, it looks like there are entries for 0.4.0 and even 0.3.3 in go.sum. I guess unless you run go mod tidy these will stay there. All good, carry on 🙂.
There was a problem hiding this comment.
I did run go mod tidy; they're still needed as indirect dependencies 😭
Increase the size limit of RPC calls to the shipper from its default of 4MB to 64MB.
This PR mitigates but does not fix elastic/beats#34695.
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksI have added an entry inCHANGELOG.mdorCHANGELOG-developer.md.