From 831be6c35601ca1229f24c0903b00766a81d5813 Mon Sep 17 00:00:00 2001 From: Michael Hall Date: Thu, 18 Jun 2020 12:21:04 -0400 Subject: [PATCH] fix: Convert onboardingRequest RetentionPeriod to a Duration, rather than time.Hour to a uint. Fixes #18547 --- CHANGELOG.md | 1 + cmd/influx/setup.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32dad0982e8..68e05342c1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ 1. [18595](https://github.com/influxdata/influxdb/pull/18595): Add ability to skip resources in a template by kind or by metadata.name 1. [18600](https://github.com/influxdata/influxdb/pull/18600): Extend influx apply with resource filter capabilities 1. [18601](https://github.com/influxdata/influxdb/pull/18601): Provide active config running influx config without args +1. [18602](https://github.com/influxdata/influxdb/pull/18602): Fix uint overflow during setup on 32bit systems ## v2.0.0-beta.12 [2020-06-12] diff --git a/cmd/influx/setup.go b/cmd/influx/setup.go index 79bcd8b6c9b..42173682e84 100644 --- a/cmd/influx/setup.go +++ b/cmd/influx/setup.go @@ -316,7 +316,7 @@ func getConfirm(ui *input.UI, or *influxdb.OnboardingRequest) bool { for { rp := "infinite" if or.RetentionPeriod > 0 { - rp = fmt.Sprintf("%d hrs", or.RetentionPeriod/uint(time.Hour)) + rp = fmt.Sprintf("%d hrs", time.Duration(or.RetentionPeriod)/time.Hour) } ui.Writer.Write(promptWithColor(fmt.Sprintf(` You have entered: