compute/metadata: binary size increase by 6.5Mb after the commit 81c6039503121f8da3de4f4cd957b8488a3ef620 #4783
Labels
api: compute
Issues related to the Compute Engine API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
We at VictoriaMetrics use
golang.org/x/oauth2/google
package here for obtaining metada from Google Compute Engine. Thegolang.org/x/oauth2/google
package importscloud.google.com/go/compute/metadata
package. The commit 81c6039 adds an additional dependency to this package -github.com/googleapis/gax-go/v2
. This dependency increased VictoriaMetrics binary size by 6.5Mb after we upgradedcloud.google.com/go
dependency from v0.93.3 to v0.94.1 in the commit VictoriaMetrics/VictoriaMetrics@2814388 . This is more than 30% of binary size increase. We try hard keeping dependency bloat at minimum - see https://valyala.medium.com/stripping-dependency-bloat-in-victoriametrics-docker-image-983fb5912b0d . So it would be great if you could reduce thecompute/metadata
dependency size to pre-v0.94.0 sizes.Possible solutions:
github.com/googleapis/gax-go/v2
fromcompute/metadata
package. It is used forgax.Sleep()
call, which can be easily embedded inside thecloud.google.com/go
package.github.com/googleapis/gax-go/v2
package, so it doesn't include unneeded bloat by default when imported.Related issue #4642 .
The text was updated successfully, but these errors were encountered: