Bump go libraries (#11023)

* Bump go libraries

* Fix update codegen execution

* Fix errors on klog

* Fix gzip test

* Bump libraries on webhook certgen

* Fix webhook-certgen compilation
This commit is contained in:
Ricardo Katz 2024-02-27 14:52:42 -03:00 committed by GitHub
parent b4ea953cce
commit fa0bf81984
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 765 additions and 1245 deletions

View file

@ -50,7 +50,7 @@ func GatherAndCompare(_ prometheus.Collector, expected string, metricNames []str
if !reflect.DeepEqual(metrics, normalizeMetricFamilies(expectedMetrics)) {
// Encode the gathered output to the readable text format for comparison.
var buf1 bytes.Buffer
enc := expfmt.NewEncoder(&buf1, expfmt.FmtText)
enc := expfmt.NewEncoder(&buf1, expfmt.NewFormat(expfmt.TypeTextPlain))
for _, mf := range metrics {
if err := enc.Encode(mf); err != nil {
return fmt.Errorf("encoding result failed: %s", err)
@ -59,7 +59,7 @@ func GatherAndCompare(_ prometheus.Collector, expected string, metricNames []str
// Encode normalized expected metrics again to generate them in the same ordering
// the registry does to spot differences more easily.
var buf2 bytes.Buffer
enc = expfmt.NewEncoder(&buf2, expfmt.FmtText)
enc = expfmt.NewEncoder(&buf2, expfmt.NewFormat(expfmt.TypeTextPlain))
for _, mf := range normalizeMetricFamilies(expectedMetrics) {
if err := enc.Encode(mf); err != nil {
return fmt.Errorf("encoding result failed: %s", err)