Task retry commands require All-Access token (#3172)
* added oss- and cloud-only shortcodes, added token information about task retry commands, closes influxdata/DAR#230 * added code closing tick * Update CONTRIBUTING.md Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com> Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com>pull/3181/head
parent
c54edae941
commit
80f3404626
|
@ -998,6 +998,56 @@ Use either `includeRange` argument name or provide the boolean value as the thir
|
||||||
{{% flux/sample "int" true true %}}
|
{{% flux/sample "int" true true %}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Duplicate OSS content in Cloud
|
||||||
|
Docs for InfluxDB OSS and InfluxDB Cloud share a majority of content.
|
||||||
|
To prevent duplication of content between versions, use the following shortcodes:
|
||||||
|
|
||||||
|
- `{{< duplicate-oss >}}`
|
||||||
|
- `{{% oss-only %}}`
|
||||||
|
- `{{% cloud-only %}}`
|
||||||
|
|
||||||
|
#### duplicate-oss
|
||||||
|
The `{{< duplicate-oss >}}` shortcode copies the page content of the file located
|
||||||
|
at the identical file path in the most recent InfluxDB OSS version.
|
||||||
|
The Cloud version of this markdown file should contain the frontmatter required
|
||||||
|
for all pages, but the body content should just be the `{{< duplicate-oss >}}` shortcode.
|
||||||
|
|
||||||
|
#### oss-only
|
||||||
|
Wrap content that should only appear in the OSS version of the doc with the `{{% oss-only %}}` shortcode.
|
||||||
|
Use the shortcode on both inline and content blocks:
|
||||||
|
|
||||||
|
```md
|
||||||
|
{{% oss-only %}}This is inline content that only renders in the InfluxDB OSS docs{{% /oss-only %}}
|
||||||
|
|
||||||
|
{{% oss-only %}}
|
||||||
|
|
||||||
|
This is a multi-paragraph content block that spans multiple paragraphs and will
|
||||||
|
only render in the InfluxDB OSS documentation.
|
||||||
|
|
||||||
|
**Note:** Notice the blank newline after the opening short-code tag.
|
||||||
|
This is necessary to get the first sentence/paragraph to render correctly.
|
||||||
|
|
||||||
|
{{% /oss-only %}}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### cloud-only
|
||||||
|
Wrap content that should only appear in the Cloud version of the doc with the `{{% cloud-only %}}` shortcode.
|
||||||
|
Use the shortcode on both inline and content blocks:
|
||||||
|
|
||||||
|
```md
|
||||||
|
{{% cloud-only %}}This is inline content that only renders in the InfluxDB Cloud docs{{% /cloud-only %}}
|
||||||
|
|
||||||
|
{{% cloud-only %}}
|
||||||
|
|
||||||
|
This is a multi-paragraph content block that spans multiple paragraphs and will
|
||||||
|
only render in the InfluxDB Cloud documentation.
|
||||||
|
|
||||||
|
**Note:** Notice the blank newline after the opening short-code tag.
|
||||||
|
This is necessary to get the first sentence/paragraph to render correctly.
|
||||||
|
|
||||||
|
{{% /cloud-only %}}
|
||||||
|
```
|
||||||
|
|
||||||
### Reference content
|
### Reference content
|
||||||
The InfluxDB documentation is "task-based," meaning content primarily focuses on
|
The InfluxDB documentation is "task-based," meaning content primarily focuses on
|
||||||
what a user is **doing**, not what they are **using**.
|
what a user is **doing**, not what they are **using**.
|
||||||
|
|
|
@ -39,6 +39,11 @@ influx task retry-failed [flags]
|
||||||
|
|
||||||
{{< cli/influx-creds-note >}}
|
{{< cli/influx-creds-note >}}
|
||||||
|
|
||||||
|
{{% note %}}
|
||||||
|
#### Required permissions
|
||||||
|
Use an [{{% oss-only %}}**Operator** or{{% /oss-only %}} **All-Access** token](/influxdb/v2.0/security/tokens/) to retry failed tasks.
|
||||||
|
{{% /note %}}
|
||||||
|
|
||||||
- [Retry failed task runs for a specific task ID](#retry-failed-task-runs-for-a-specific-task-id)
|
- [Retry failed task runs for a specific task ID](#retry-failed-task-runs-for-a-specific-task-id)
|
||||||
- [Retry failed task runs that occurred before a specific time](#retry-failed-task-runs-that-occurred-before-a-specific-time)
|
- [Retry failed task runs that occurred before a specific time](#retry-failed-task-runs-that-occurred-before-a-specific-time)
|
||||||
- [Retry failed task runs that occurred after a specific time](#retry-failed-task-runs-that-occurred-after-a-specific-time)
|
- [Retry failed task runs that occurred after a specific time](#retry-failed-task-runs-that-occurred-after-a-specific-time)
|
||||||
|
|
|
@ -32,6 +32,11 @@ influx task run retry [flags]
|
||||||
|
|
||||||
{{< cli/influx-creds-note >}}
|
{{< cli/influx-creds-note >}}
|
||||||
|
|
||||||
|
{{% note %}}
|
||||||
|
#### Required permissions
|
||||||
|
Use an [{{% oss-only %}}**Operator** or{{% /oss-only %}} <span>**All-Access**</span> token](/influxdb/v2.0/security/tokens/) to retry tasks.
|
||||||
|
{{% /note %}}
|
||||||
|
|
||||||
##### Retry a task run
|
##### Retry a task run
|
||||||
```sh
|
```sh
|
||||||
influx task run retry \
|
influx task run retry \
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{ partial "article/flux-experimental.html" . }}
|
{{ partial "article/flux-experimental.html" . }}
|
||||||
{{ partial "article/flux-contrib.html" . }}
|
{{ partial "article/flux-contrib.html" . }}
|
||||||
{{ partial "article/prepend.html" . }}
|
{{ partial "article/prepend.html" . }}
|
||||||
{{ .Content }}
|
{{ partial "article/content.html" . }}
|
||||||
{{ partial "article/append.html" . }}
|
{{ partial "article/append.html" . }}
|
||||||
{{ partial "article/related.html" . }}
|
{{ partial "article/related.html" . }}
|
||||||
{{ partial "article/tags.html" . }}
|
{{ partial "article/tags.html" . }}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{{ $productPathData := findRE "[^/]+.*?" .RelPermalink }}
|
||||||
|
{{ $product := index $productPathData 0 }}
|
||||||
|
{{ $version := index $productPathData 1 }}
|
||||||
|
{{ $influxdbOSS := and (eq $product "influxdb") (ne $version "cloud") }}
|
||||||
|
{{ $influxdbCloud := and (eq $product "influxdb") (eq $version "cloud") }}
|
||||||
|
|
||||||
|
{{ if $influxdbOSS }}
|
||||||
|
{{ .Content | replaceRE `(?U)(<span class=\'cloud\-only\'>.*<\/span><\!\-\- close \-\-\>)` "" | replaceRE `(?Us)(<div class=\'cloud\-only\'>.*<\/div><\!\-\- close \-\-\>)` "" | safeHTML}}
|
||||||
|
{{ else if $influxdbCloud }}
|
||||||
|
{{ .Content | replaceRE `(?U)(<span class=\'oss\-only\'>.*<\/span><\!\-\- close \-\-\>)` "" | replaceRE `(?Us)(<div class=\'oss\-only\'>.*<\/div><\!\-\- close \-\-\>)` "" | safeHTML}}
|
||||||
|
{{ else }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{{- $el := cond (gt (len (findRE `\n` .Inner)) 0) "div" "span" -}}
|
||||||
|
{{- $output := print "<" $el " class='cloud-only'>" .Inner "</" $el "><!-- close -->" | safeHTML -}}
|
||||||
|
{{ $output }}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{{- $el := cond (gt (len (findRE `\n` .Inner)) 0) "div" "span" -}}
|
||||||
|
{{- $output := print "<" $el " class='oss-only'>" .Inner "</" $el "><!-- close -->" | safeHTML -}}
|
||||||
|
{{ $output }}
|
Loading…
Reference in New Issue