mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
chore: upgrade tailscale to v1.46.1 (#8913)
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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")
|
||||
|
Reference in New Issue
Block a user