From 9a6a6bc966c222346839d793ffcabb4c94ec262c Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 12 Aug 2020 11:27:00 -0600 Subject: [PATCH 1/3] added flux 0.80.0 release notes --- content/v2.0/reference/release-notes/flux.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/content/v2.0/reference/release-notes/flux.md b/content/v2.0/reference/release-notes/flux.md index 7be27cda0..4e2f6c00f 100644 --- a/content/v2.0/reference/release-notes/flux.md +++ b/content/v2.0/reference/release-notes/flux.md @@ -16,6 +16,17 @@ Though newer versions of Flux may be available, they will not be included with InfluxDB until the next InfluxDB v2.0 release._ {{% /note %}} +## v0.80.0 [2020-08-12] + +### Features +- Add `nulls` parameter to `gen.tables()`. + +### Bug fixes +- Revert the timeable constraint for integer. +- Make socket/sql URL test robust. + +--- + ## v0.79.0 [2020-08-11] ### Features From ce19e4d7d8142f96211d435767af52c2c3ec5d09 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 12 Aug 2020 11:47:42 -0600 Subject: [PATCH 2/3] removed integer support from timeable function parameters --- content/v2.0/reference/flux/stdlib/date/hour.md | 12 +----------- .../reference/flux/stdlib/date/microsecond.md | 12 +----------- .../reference/flux/stdlib/date/millisecond.md | 12 +----------- .../v2.0/reference/flux/stdlib/date/minute.md | 12 +----------- .../v2.0/reference/flux/stdlib/date/month.md | 12 +----------- .../v2.0/reference/flux/stdlib/date/monthday.md | 12 +----------- .../reference/flux/stdlib/date/nanosecond.md | 12 +----------- .../v2.0/reference/flux/stdlib/date/quarter.md | 12 +----------- .../v2.0/reference/flux/stdlib/date/second.md | 12 +----------- .../v2.0/reference/flux/stdlib/date/truncate.md | 17 +---------------- content/v2.0/reference/flux/stdlib/date/week.md | 12 +----------- .../v2.0/reference/flux/stdlib/date/weekday.md | 12 +----------- content/v2.0/reference/flux/stdlib/date/year.md | 12 +----------- .../v2.0/reference/flux/stdlib/date/yearday.md | 12 +----------- content/v2.0/reference/release-notes/flux.md | 8 +++++++- 15 files changed, 21 insertions(+), 160 deletions(-) diff --git a/content/v2.0/reference/flux/stdlib/date/hour.md b/content/v2.0/reference/flux/stdlib/date/hour.md index 1475e1a1d..77c77e982 100644 --- a/content/v2.0/reference/flux/stdlib/date/hour.md +++ b/content/v2.0/reference/flux/stdlib/date/hour.md @@ -31,9 +31,8 @@ date.hour(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.hour(t: -8h) // Returns 4 ``` - -##### Return the hour of a nanosecond Unix timestamp -```js -import "date" - -date.hour(t: 1581423663293534940) - -// Returns 12 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/microsecond.md b/content/v2.0/reference/flux/stdlib/date/microsecond.md index acadd5084..696bdc81e 100644 --- a/content/v2.0/reference/flux/stdlib/date/microsecond.md +++ b/content/v2.0/reference/flux/stdlib/date/microsecond.md @@ -31,9 +31,8 @@ date.microsecond(t: 2019-07-17T12:05:21.012934584Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.microsecond(t: -1890us) // Returns 291644 ``` - -##### Return the microsecond of a nanosecond Unix timestamp -```js -import "date" - -date.microsecond(t: 1581423663293534940) - -// Returns 293534 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/millisecond.md b/content/v2.0/reference/flux/stdlib/date/millisecond.md index 0febcb59b..1e0b8f9af 100644 --- a/content/v2.0/reference/flux/stdlib/date/millisecond.md +++ b/content/v2.0/reference/flux/stdlib/date/millisecond.md @@ -31,9 +31,8 @@ date.millisecond(t: 2019-07-17T12:05:21.012934584Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.millisecond(t: -150ms) // Returns 143 ``` - -##### Return the millisecond of a nanosecond Unix timestamp -```js -import "date" - -date.millisecond(t: 1581423663293534940) - -// Returns 293 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/minute.md b/content/v2.0/reference/flux/stdlib/date/minute.md index 2706460e6..ea713716b 100644 --- a/content/v2.0/reference/flux/stdlib/date/minute.md +++ b/content/v2.0/reference/flux/stdlib/date/minute.md @@ -31,9 +31,8 @@ date.minute(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.minute(t: -45m) // Returns 36 ``` - -##### Return the minute of a nanosecond Unix timestamp -```js -import "date" - -date.minute(t: 1581423663293534940) - -// Returns 21 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/month.md b/content/v2.0/reference/flux/stdlib/date/month.md index eaa2208fc..d86744039 100644 --- a/content/v2.0/reference/flux/stdlib/date/month.md +++ b/content/v2.0/reference/flux/stdlib/date/month.md @@ -31,9 +31,8 @@ date.month(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.month(t: -3mo) // Returns 11 ``` - -##### Return the month of a nanosecond Unix timestamp -```js -import "date" - -date.month(t: 1581423663293534940) - -// Returns 2 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/monthday.md b/content/v2.0/reference/flux/stdlib/date/monthday.md index b1ac40d64..9819cdf88 100644 --- a/content/v2.0/reference/flux/stdlib/date/monthday.md +++ b/content/v2.0/reference/flux/stdlib/date/monthday.md @@ -31,9 +31,8 @@ date.monthDay(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.monthDay(t: -8d) // Returns 3 ``` - -##### Return the day of the month for a nanosecond Unix timestamp -```js -import "date" - -date.monthDay(t: 1581423663293534940) - -// Returns 11 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/nanosecond.md b/content/v2.0/reference/flux/stdlib/date/nanosecond.md index 610ced7aa..d28bc7b22 100644 --- a/content/v2.0/reference/flux/stdlib/date/nanosecond.md +++ b/content/v2.0/reference/flux/stdlib/date/nanosecond.md @@ -31,9 +31,8 @@ date.nanosecond(t: 2019-07-17T12:05:21.012934584Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.nanosecond(t: -2111984ns) // Returns 291422956 ``` - -##### Return the nanosecond for a nanosecond Unix timestamp -```js -import "date" - -date.nanosecond(t: 1581423663293534940) - -// Returns 293534940Z -``` diff --git a/content/v2.0/reference/flux/stdlib/date/quarter.md b/content/v2.0/reference/flux/stdlib/date/quarter.md index 56edb7ed7..6b7f4179e 100644 --- a/content/v2.0/reference/flux/stdlib/date/quarter.md +++ b/content/v2.0/reference/flux/stdlib/date/quarter.md @@ -31,9 +31,8 @@ date.quarter(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.quarter(t: -7mo) // Returns 3 ``` - -##### Return the quarter for a nanosecond Unix timestamp -```js -import "date" - -date.quarter(t: 1581423663293534940) - -// Returns 1 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/second.md b/content/v2.0/reference/flux/stdlib/date/second.md index 302700305..88e7de944 100644 --- a/content/v2.0/reference/flux/stdlib/date/second.md +++ b/content/v2.0/reference/flux/stdlib/date/second.md @@ -31,9 +31,8 @@ date.second(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.second(t: -50s) // Returns 13 ``` - -##### Return the second of a nanosecond Unix timestamp -```js -import "date" - -date.second(t: 1581423663293534940) - -// Returns 3 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/truncate.md b/content/v2.0/reference/flux/stdlib/date/truncate.md index 5f13e548b..c165f2eae 100644 --- a/content/v2.0/reference/flux/stdlib/date/truncate.md +++ b/content/v2.0/reference/flux/stdlib/date/truncate.md @@ -32,9 +32,8 @@ date.truncate( The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ### unit The unit of time to truncate to. @@ -77,17 +76,3 @@ date.truncate(t: -1m, unit: 1m) date.truncate(t: -1h, unit: 1h) // Returns 2019-12-31T23:00:00.000000000Z ``` - -##### Truncate time values using nanosecond Unix timestamps -```js -import "date" - -date.truncate(t: 1559570341000000000, unit: 1s) -// Returns 2019-06-03T13:59:01.000000000Z - -date.truncate(t: 1559570341000000000, unit: 1m) -// Returns 2019-06-03T13:59:00.000000000Z - -date.truncate(t: 1559570341000000000, unit: 1h) -// Returns 2019-06-03T13:00:00.000000000Z -``` diff --git a/content/v2.0/reference/flux/stdlib/date/week.md b/content/v2.0/reference/flux/stdlib/date/week.md index 0eefcef9a..2abd3d724 100644 --- a/content/v2.0/reference/flux/stdlib/date/week.md +++ b/content/v2.0/reference/flux/stdlib/date/week.md @@ -31,9 +31,8 @@ date.week(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.week(t: -12d) // Returns 5 ``` - -##### Return the week of the year using a nanosecond Unix timestamp -```js -import "date" - -date.week(t: 1581423663293534940) - -// Returns 7 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/weekday.md b/content/v2.0/reference/flux/stdlib/date/weekday.md index 437b01009..6530782ab 100644 --- a/content/v2.0/reference/flux/stdlib/date/weekday.md +++ b/content/v2.0/reference/flux/stdlib/date/weekday.md @@ -31,9 +31,8 @@ date.weekDay(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.weekDay(t: -84h) // Returns 6 ``` - -##### Return the day of the week for a nanosecond Unix timestamp -```js -import "date" - -date.weekDay(t: 1581423663293534940) - -// Returns 2 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/year.md b/content/v2.0/reference/flux/stdlib/date/year.md index 3726c1cb8..ac2caa43c 100644 --- a/content/v2.0/reference/flux/stdlib/date/year.md +++ b/content/v2.0/reference/flux/stdlib/date/year.md @@ -29,9 +29,8 @@ date.year(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -54,12 +53,3 @@ date.year(t: -14y) // Returns 2006 ``` - -##### Return the year for a nanosecond Unix timestamp -```js -import "date" - -date.year(t: 1581423663293534940) - -// Returns 2020 -``` diff --git a/content/v2.0/reference/flux/stdlib/date/yearday.md b/content/v2.0/reference/flux/stdlib/date/yearday.md index 8e46b81cb..28967f203 100644 --- a/content/v2.0/reference/flux/stdlib/date/yearday.md +++ b/content/v2.0/reference/flux/stdlib/date/yearday.md @@ -31,9 +31,8 @@ date.yearDay(t: 2019-07-17T12:05:21.012Z) The time to operate on. Use an absolute time, relative duration, or integer. Durations are relative to `now()`. -Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). -_**Data type:** Time | Duration | Integer_ +_**Data type:** Time | Duration_ ## Examples @@ -56,12 +55,3 @@ date.yearDay(t: -1mo) // Returns 11 ``` - -##### Return the day of the year for a nanosecond Unix timestamp -```js -import "date" - -date.yearDay(t: 1581423663293534940) - -// Returns 42 -``` diff --git a/content/v2.0/reference/release-notes/flux.md b/content/v2.0/reference/release-notes/flux.md index 4e2f6c00f..8cfdc7b4c 100644 --- a/content/v2.0/reference/release-notes/flux.md +++ b/content/v2.0/reference/release-notes/flux.md @@ -11,13 +11,19 @@ aliases: --- {{% note %}} -The latest release of InfluxDB v2.0 beta includes **Flux v0.71.1**. +The latest release of InfluxDB v2.0 beta includes **Flux v0.77.1**. Though newer versions of Flux may be available, they will not be included with InfluxDB until the next InfluxDB v2.0 release._ {{% /note %}} ## v0.80.0 [2020-08-12] +{{% warn %}} +#### Breaking change +`range()` and `date` package functions no longer support integer values +(nanosecond Unix timestamps). +{{% /warn %}} + ### Features - Add `nulls` parameter to `gen.tables()`. From 0fc12d9d523f9e6449162452e517f5b04cb51698 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 12 Aug 2020 13:16:54 -0600 Subject: [PATCH 3/3] added int support to range, resolves #1296 --- .../v2.0/reference/flux/stdlib/contrib/influxdb/select.md | 7 +++++-- .../reference/flux/stdlib/experimental/query/fromrange.md | 6 ++++-- .../reference/flux/stdlib/experimental/query/inbucket.md | 6 ++++-- content/v2.0/reference/flux/stdlib/monitor/from.md | 6 ++++-- content/v2.0/reference/flux/stdlib/monitor/logs.md | 6 ++++-- content/v2.0/reference/release-notes/flux.md | 6 ------ 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/content/v2.0/reference/flux/stdlib/contrib/influxdb/select.md b/content/v2.0/reference/flux/stdlib/contrib/influxdb/select.md index 46861a530..cac8ebccd 100644 --- a/content/v2.0/reference/flux/stdlib/contrib/influxdb/select.md +++ b/content/v2.0/reference/flux/stdlib/contrib/influxdb/select.md @@ -58,18 +58,21 @@ Results **include** points that match the specified start time. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. Durations are relative to `now()`. +Integers are nanosecond Unix timestamps. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ ### stop Latest time to include in results. Results **exclude** points that match the specified stop time. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. +Integers are nanosecond Unix timestamps. Durations are relative to `now()`. + Defaults to `now()`. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ ### m Required Name of the measurement to query. diff --git a/content/v2.0/reference/flux/stdlib/experimental/query/fromrange.md b/content/v2.0/reference/flux/stdlib/experimental/query/fromrange.md index e6963e9a5..c7a12881b 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/query/fromrange.md +++ b/content/v2.0/reference/flux/stdlib/experimental/query/fromrange.md @@ -38,8 +38,9 @@ Results **include** points that match the specified start time. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. Durations are relative to `now()`. +Integers are nanosecond Unix timestamps. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ ### stop The latest time to include in results. @@ -47,9 +48,10 @@ Results **exclude** points that match the specified stop time. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. Durations are relative to `now()`. +Integers are nanosecond Unix timestamps. Defaults to `now()`. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ ## Examples diff --git a/content/v2.0/reference/flux/stdlib/experimental/query/inbucket.md b/content/v2.0/reference/flux/stdlib/experimental/query/inbucket.md index 064b85e50..4690e5a4b 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/query/inbucket.md +++ b/content/v2.0/reference/flux/stdlib/experimental/query/inbucket.md @@ -41,8 +41,9 @@ Results **include** points that match the specified start time. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. Durations are relative to `now()`. +Integers are nanosecond Unix timestamps. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ ### stop The latest time to include in results. @@ -50,9 +51,10 @@ Results **exclude** points that match the specified stop time. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. Durations are relative to `now()`. +Integers are nanosecond Unix timestamps. Defaults to `now()`. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ ### measurement The name of the measurement to filter by. diff --git a/content/v2.0/reference/flux/stdlib/monitor/from.md b/content/v2.0/reference/flux/stdlib/monitor/from.md index 0dcf3c575..9186d7ac4 100644 --- a/content/v2.0/reference/flux/stdlib/monitor/from.md +++ b/content/v2.0/reference/flux/stdlib/monitor/from.md @@ -35,17 +35,19 @@ The earliest time to include in results. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. Durations are relative to `now()`. +Integers are nanosecond Unix timestamps. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ ### stop The latest time to include in results. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. Durations are relative to `now()`. +Integers are nanosecond Unix timestamps. Defaults to `now()`. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ {{% note %}} Time values in Flux must be in [RFC3339 format](/v2.0/reference/flux/language/types#timestamp-format). diff --git a/content/v2.0/reference/flux/stdlib/monitor/logs.md b/content/v2.0/reference/flux/stdlib/monitor/logs.md index bcf6c4861..35d3d0b59 100644 --- a/content/v2.0/reference/flux/stdlib/monitor/logs.md +++ b/content/v2.0/reference/flux/stdlib/monitor/logs.md @@ -34,17 +34,19 @@ The earliest time to include in results. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. Durations are relative to `now()`. +Integers are nanosecond Unix timestamps. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ ### stop The latest time to include in results. Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`. Durations are relative to `now()`. +Integers are nanosecond Unix timestamps. Defaults to `now()`. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ {{% note %}} Time values in Flux must be in [RFC3339 format](/v2.0/reference/flux/language/types#timestamp-format). diff --git a/content/v2.0/reference/release-notes/flux.md b/content/v2.0/reference/release-notes/flux.md index 8cfdc7b4c..8aef51324 100644 --- a/content/v2.0/reference/release-notes/flux.md +++ b/content/v2.0/reference/release-notes/flux.md @@ -18,12 +18,6 @@ InfluxDB until the next InfluxDB v2.0 release._ ## v0.80.0 [2020-08-12] -{{% warn %}} -#### Breaking change -`range()` and `date` package functions no longer support integer values -(nanosecond Unix timestamps). -{{% /warn %}} - ### Features - Add `nulls` parameter to `gen.tables()`.