Skip to content

Commit b96a9cc

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request #62466 from aleksandra-malinowska/fix-parsing-timestamp
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix parsing timestamp in test Go 1.9 changed the default string format, see golang/go#20876 As discussed there, default format is intended to be readable for humans and can change without warning, so we should probably set the format explicitly when writing status configmap. ```release-note NONE ```
2 parents 38da981 + 3eb420b commit b96a9cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e/autoscaling/cluster_size_autoscaling.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,7 @@ type scaleUpStatus struct {
18601860
// Try to get timestamp from status.
18611861
// Status configmap is not parsing-friendly, so evil regexpery follows.
18621862
func getStatusTimestamp(status string) (time.Time, error) {
1863-
timestampMatcher, err := regexp.Compile("Cluster-autoscaler status at \\s*([0-9\\-]+ [0-9]+:[0-9]+:[0-9]+\\.[0-9]+ \\+[0-9]+ [A-Za-z]+):")
1863+
timestampMatcher, err := regexp.Compile("Cluster-autoscaler status at \\s*([0-9\\-]+ [0-9]+:[0-9]+:[0-9]+\\.[0-9]+ \\+[0-9]+ [A-Za-z]+)")
18641864
if err != nil {
18651865
return time.Time{}, err
18661866
}

0 commit comments

Comments
 (0)