diff --git a/config.staging.toml b/config.staging.toml index dca5748bd..927cbdd71 100644 --- a/config.staging.toml +++ b/config.staging.toml @@ -25,6 +25,7 @@ hrefTargetBlank = true smartDashes = false [taxonomies] + "influxdb/v2.2/tag" = "influxdb/v2.1/tags" "influxdb/v2.1/tag" = "influxdb/v2.1/tags" "influxdb/v2.0/tag" = "influxdb/v2.0/tags" "influxdb/cloud/tag" = "influxdb/cloud/tags" diff --git a/config.toml b/config.toml index 0867ca62f..49cd97863 100644 --- a/config.toml +++ b/config.toml @@ -21,6 +21,7 @@ hrefTargetBlank = true smartDashes = false [taxonomies] + "influxdb/v2.2/tag" = "influxdb/v2.1/tags" "influxdb/v2.1/tag" = "influxdb/v2.1/tags" "influxdb/v2.0/tag" = "influxdb/v2.0/tags" "influxdb/cloud/tag" = "influxdb/cloud/tags" diff --git a/content/flux/v0.x/release-notes.md b/content/flux/v0.x/release-notes.md index 3825e6d18..42c2adfe4 100644 --- a/content/flux/v0.x/release-notes.md +++ b/content/flux/v0.x/release-notes.md @@ -10,6 +10,38 @@ aliases: - /influxdb/cloud/reference/release-notes/flux/ --- +## v0.163.0 [2022-04-07] + +### Features +- Report skipped tests. + +### Bug fixes +- Update transformation transport adapter to always invoke `finish`. +- Add support for "soft paragraphs" (paragraphs that contain single newline + characters) in inline Flux documentation. + +--- + +## v0.162.0 [2022-04-05] + +### Features +- Add [OpenTracing spans](https://opentracing.io/docs/overview/spans/) to the Flux runtime. +- Add the `cffi` feature to reduce WASM binary size. +- Replace the main `flux` CLI with a new `flux` CLI that starts a Flux REPL by + default or executes a Flux script via stdin. +- Track freed memory with `SetFinalizer`. +- Move [`addDuration()`](/flux/v0.x/stdlib/date/addduration/) and + [`subDuration()`](/flux/v0.x/stdlib/date/subduration/) from the `experimental` + package to the `date` package. + +### Bug fixes +- Improve error messages for column conflicts in pivot operations. +- Create OpenTracing spans for transformations using the proper context. +- Add errors to OpenTracing spans created for transformations. +- Restore required features hidden behind the `cffi` feature. + +--- + ## v0.161.0 [2022-03-24] ### Features diff --git a/content/flux/v0.x/stdlib/date/addduration.md b/content/flux/v0.x/stdlib/date/addduration.md new file mode 100644 index 000000000..35d99e8d3 --- /dev/null +++ b/content/flux/v0.x/stdlib/date/addduration.md @@ -0,0 +1,54 @@ +--- +title: date.addDuration() function +description: > + `date.addDuration()` adds a duration to a time value and returns the resulting time. +menu: + flux_0_x_ref: + name: date.addDuration + parent: date +weight: 302 +flux/v0.x/tags: [date/time] +related: + - /flux/v0.x/stdlib/date/subduration/ +introduced: 0.162.0 +--- + +`date.addDuration()` adds a duration to a time value and returns the resulting time. + +```js +import "date" + +date.addDuration(d: 12h, to: now()) +``` + +## Parameters + +### d {data-type="duration"} +Duration to add. + +### to {data-type="time, duration"} +Time to add the [duration](#d) to. +Use an absolute time or a relative duration. +Durations are relative to [`now()`](/flux/v0.x/stdlib/universe/now/). + +## Examples + +### Add six hours to a timestamp +```js +import "date" + +date.addDuration(d: 6h, to: 2019-09-16T12:00:00Z) + +// Returns 2019-09-16T18:00:00.000000000Z +``` + +### Add six hours to a relative duration +```js +import "date" + +option now = () => 2022-01-01T12:00:00Z + +date.addDuration(d: 6h, to: 3h) + +// Returns 2022-01-01T21:00:00.000000000Z +``` diff --git a/content/flux/v0.x/stdlib/date/subduration.md b/content/flux/v0.x/stdlib/date/subduration.md new file mode 100644 index 000000000..354314131 --- /dev/null +++ b/content/flux/v0.x/stdlib/date/subduration.md @@ -0,0 +1,56 @@ +--- +title: date.subDuration() function +description: > + `date.subDuration()` subtracts a duration from a time value and returns the + resulting time value. +menu: + flux_0_x_ref: + name: date.subDuration + parent: date +weight: 302 +flux/v0.x/tags: [date/time] +related: + - /flux/v0.x/stdlib/date/addduration/ +introduced: 0.162.0 +--- + +`date.subDuration()` subtracts a duration from a time value and returns the +resulting time value. + +```js +import "date" + +date.subDuration(d: 12h, from: now()) +``` + +## Parameters + +### d {data-type="duration"} +Duration to subtract. + +### from {data-type="time, duration"} +Time to subtract the [duration](#d) from. +Use an absolute time or a relative duration. +Durations are relative to [`now()`](/flux/v0.x/stdlib/universe/now/). + +## Examples + +### Subtract six hours from a timestamp +```js +import "date" + +date.subDuration(d: 6h, from: 2019-09-16T12:00:00Z) + +// Returns 2019-09-16T06:00:00.000000000Z +``` + +### Subtract six hours from a relative duration +```js +import "date" + +option now = () => 2022-01-01T12:00:00Z + +date.subDuration(d: 6h, from: -3h) + +// Returns 2022-01-01T03:00:00.000000000Z +``` diff --git a/content/flux/v0.x/stdlib/experimental/addduration.md b/content/flux/v0.x/stdlib/experimental/addduration.md index 3d038ca9c..694198952 100644 --- a/content/flux/v0.x/stdlib/experimental/addduration.md +++ b/content/flux/v0.x/stdlib/experimental/addduration.md @@ -15,16 +15,17 @@ flux/v0.x/tags: [date/time] related: - /flux/v0.x/stdlib/experimental/subduration/ introduced: 0.39.0 +deprecated: 0.162.0 --- +{{% warn %}} +This function was promoted to the [`date` package](/flux/v0.x/stdlib/date/addduration/) +in **Flux v0.162.0**. This experimental version has been deprecated. +{{% /warn %}} + The `experimental.addDuration()` function adds a duration to a time value and returns the resulting time value. -{{% warn %}} -This function will be removed once duration vectors are implemented. -See [influxdata/flux#413](https://github.com/influxdata/flux/issues/413). -{{% /warn %}} - ```js import "experimental" diff --git a/content/flux/v0.x/stdlib/experimental/subduration.md b/content/flux/v0.x/stdlib/experimental/subduration.md index 6d53bf5ed..74fda166b 100644 --- a/content/flux/v0.x/stdlib/experimental/subduration.md +++ b/content/flux/v0.x/stdlib/experimental/subduration.md @@ -15,16 +15,17 @@ flux/v0.x/tags: [date/time] related: - /flux/v0.x/stdlib/experimental/addduration/ introduced: 0.39.0 +deprecated: 0.162.0 --- +{{% warn %}} +This function was promoted to the [`date` package](/flux/v0.x/stdlib/date/subduration/) +in **Flux v0.162.0**. This experimental version has been deprecated. +{{% /warn %}} + The `experimental.subDuration()` function subtracts a duration from a time value and returns the resulting time value. -{{% warn %}} -This function will be removed once duration vectors are implemented. -See [influxdata/flux#413](https://github.com/influxdata/flux/issues/413). -{{% /warn %}} - ```js import "experimental" @@ -37,10 +38,10 @@ experimental.subDuration( ## Parameters ### d {data-type="duration"} -The duration to subtract. +Duration to subtract. ### from {data-type="time, duration"} -The time to subtract the [duration](#d) from. +Time to subtract the [duration](#d) from. Use an absolute time or a relative duration. Durations are relative to [`now()`](/flux/v0.x/stdlib/universe/now/).