Flux 0.163.0 (#3954)

pull/3958/head^2
Scott Anderson 2022-04-12 13:54:03 -06:00 committed by GitHub
parent 2ef4e39884
commit dd1eca3f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 158 additions and 12 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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
```

View File

@ -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
```

View File

@ -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"

View File

@ -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/).