chore: upgrade tailscale to v1.46.1 (#8913)

This commit is contained in:
Colin Adler
2023-08-09 14:50:26 -05:00
committed by GitHub
parent 5b9dc2ee8b
commit bc862fa493
25 changed files with 467 additions and 297 deletions

View File

@ -12,6 +12,8 @@ import (
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
"github.com/coder/coder/coderd/util/slice"
)
func main() {
@ -161,9 +163,8 @@ func parseCIReport(report GotestsumReport) (CIReport, error) {
}
timeouts = timeoutsNorm
sortAZ := func(a, b string) bool { return a < b }
slices.SortFunc(packagesSortedByName, sortAZ)
slices.SortFunc(testSortedByName, sortAZ)
slices.SortFunc(packagesSortedByName, slice.Ascending[string])
slices.SortFunc(testSortedByName, slice.Ascending[string])
var rep CIReport

View File

@ -56,13 +56,13 @@ func main() {
}
}
func readMetrics() ([]dto.MetricFamily, error) {
func readMetrics() ([]*dto.MetricFamily, error) {
f, err := os.Open(metricsFile)
if err != nil {
return nil, xerrors.New("can't open metrics file")
}
var metrics []dto.MetricFamily
var metrics []*dto.MetricFamily
decoder := expfmt.NewDecoder(f, expfmt.FmtProtoText)
for {
@ -73,7 +73,7 @@ func readMetrics() ([]dto.MetricFamily, error) {
} else if err != nil {
return nil, err
}
metrics = append(metrics, m)
metrics = append(metrics, &m)
}
sort.Slice(metrics, func(i, j int) bool {
@ -90,7 +90,7 @@ func readPrometheusDoc() ([]byte, error) {
return doc, nil
}
func updatePrometheusDoc(doc []byte, metricFamilies []dto.MetricFamily) ([]byte, error) {
func updatePrometheusDoc(doc []byte, metricFamilies []*dto.MetricFamily) ([]byte, error) {
i := bytes.Index(doc, generatorPrefix)
if i < 0 {
return nil, xerrors.New("generator prefix tag not found")