mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
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 https://github.com/golang/go/issues/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 ```
This commit is contained in:
commit
b96a9cc876
@ -1860,7 +1860,7 @@ type scaleUpStatus struct {
|
||||
// Try to get timestamp from status.
|
||||
// Status configmap is not parsing-friendly, so evil regexpery follows.
|
||||
func getStatusTimestamp(status string) (time.Time, error) {
|
||||
timestampMatcher, err := regexp.Compile("Cluster-autoscaler status at \\s*([0-9\\-]+ [0-9]+:[0-9]+:[0-9]+\\.[0-9]+ \\+[0-9]+ [A-Za-z]+):")
|
||||
timestampMatcher, err := regexp.Compile("Cluster-autoscaler status at \\s*([0-9\\-]+ [0-9]+:[0-9]+:[0-9]+\\.[0-9]+ \\+[0-9]+ [A-Za-z]+)")
|
||||
if err != nil {
|
||||
return time.Time{}, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user