Skip to content

Commit 78857d8

Browse files
authored
Merge branch 'master' into fix-lefthook-patterns
2 parents 5e4dd46 + d177f37 commit 78857d8

File tree

5 files changed

+74
-44
lines changed

5 files changed

+74
-44
lines changed

assets/js/release-toc.js

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
* release notes pages.
66
*/
77

8-
// Use jQuery filter to get an array of all the *release* h2 elements
9-
const releases = $('h2').filter(
10-
(_i, el) => !el.id.match(/checkpoint-releases/)
8+
// Get all h2 elements that are not checkpoint-releases
9+
const releases = Array.from(document.querySelectorAll('h2')).filter(
10+
el => !el.id.match(/checkpoint-releases/)
1111
);
1212

1313
// Extract data about each release from the array of releases
14-
releaseData = releases.map((_i, el) => ({
14+
const releaseData = releases.map(el => ({
1515
name: el.textContent,
1616
id: el.id,
1717
class: el.getAttribute('class'),
1818
date: el.getAttribute('date')
1919
}));
2020

2121
// Use release data to generate a list item for each release
22-
getReleaseItem = (releaseData) => {
23-
var li = document.createElement("li");
22+
function getReleaseItem(releaseData) {
23+
const li = document.createElement("li");
2424
if (releaseData.class !== null) {
2525
li.className = releaseData.class;
2626
}
@@ -29,30 +29,41 @@ getReleaseItem = (releaseData) => {
2929
return li;
3030
}
3131

32-
// Use jQuery each to build the release table of contents
33-
releaseData.each((_i, release) => {
34-
$('#release-toc ul')[0].appendChild(getReleaseItem(release));
32+
// Build the release table of contents
33+
const releaseTocUl = document.querySelector('#release-toc ul');
34+
releaseData.forEach(release => {
35+
releaseTocUl.appendChild(getReleaseItem(release));
3536
});
3637

3738
/*
3839
* This script is used to expand the release notes table of contents by the
3940
* number specified in the `show` attribute of `ul.release-list`.
4041
* Once all the release items are visible, the "Show More" button is hidden.
4142
*/
42-
$('#release-toc .show-more').click(function () {
43-
const itemHeight = 1.885; // Item height in rem
44-
const releaseNum = releaseData.length;
45-
const maxHeight = releaseNum * itemHeight;
46-
const releaseIncrement = Number($('#release-list')[0].getAttribute('show'));
47-
const currentHeight = Number(
48-
$('#release-list')[0].style.height.match(/\d+\.?\d+/)[0]
49-
);
50-
const potentialHeight = currentHeight + releaseIncrement * itemHeight;
51-
const newHeight = potentialHeight > maxHeight ? maxHeight : potentialHeight;
52-
53-
$('#release-list')[0].style.height = `${newHeight}rem`;
54-
55-
if (newHeight >= maxHeight) {
56-
$('#release-toc .show-more').fadeOut(100);
57-
}
58-
});
43+
const showMoreBtn = document.querySelector('#release-toc .show-more');
44+
if (showMoreBtn) {
45+
showMoreBtn.addEventListener('click', function () {
46+
const itemHeight = 1.885; // Item height in rem
47+
const releaseNum = releaseData.length;
48+
const maxHeight = releaseNum * itemHeight;
49+
const releaseList = document.getElementById('release-list');
50+
const releaseIncrement = Number(releaseList.getAttribute('show'));
51+
const currentHeightMatch = releaseList.style.height.match(/\d+\.?\d+/);
52+
const currentHeight = currentHeightMatch
53+
? Number(currentHeightMatch[0])
54+
: 0;
55+
const potentialHeight = currentHeight + releaseIncrement * itemHeight;
56+
const newHeight = potentialHeight > maxHeight ? maxHeight : potentialHeight;
57+
58+
releaseList.style.height = `${newHeight}rem`;
59+
60+
if (newHeight >= maxHeight) {
61+
// Simple fade out
62+
showMoreBtn.style.transition = 'opacity 0.1s';
63+
showMoreBtn.style.opacity = 0;
64+
setTimeout(() => {
65+
showMoreBtn.style.display = 'none';
66+
}, 100);
67+
}
68+
});
69+
}

assets/jsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"baseUrl": ".",
44
"paths": {
55
"*": [
6-
"*"
6+
"*",
7+
"../node_modules/*"
78
]
89
}
910
}

content/influxdb3/clustered/admin/upgrade.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Use the following command to return the image Kubernetes uses to build your
5151
InfluxDB cluster:
5252

5353
```sh
54-
kubectl get appinstances.kubecfg.dev influxdb -o jsonpath='{.spec.package.image}'
54+
kubectl get appinstances.kubecfg.dev influxdb -n influxdb -o jsonpath='{.spec.package.image}'
5555
```
5656

5757
The package version number is at the end of the returned string (after `influxdb:`):
@@ -66,8 +66,8 @@ us-docker.pkg.dev/influxdb2-artifacts/clustered/influxdb:PACKAGE_VERSION
6666

6767
### Identify the version to upgrade to
6868

69-
All available InfluxDB Clustered package versions are provided at
70-
[oci.influxdata.com](https://oci.influxdata.com).
69+
All available InfluxDB Clustered package versions are provided in the
70+
[InfluxDB Clustered release notes](/influxdb3/clustered/reference/release-notes/clustered/).
7171
Find the package version you want to upgrade to and copy the version number.
7272

7373

@@ -76,7 +76,7 @@ Find the package version you want to upgrade to and copy the version number.
7676
Some InfluxDB Clustered releases are _checkpoint releases_ that introduce a
7777
breaking change to an InfluxDB component.
7878
Checkpoint releases are only made when absolutely necessary and are clearly
79-
identified at [oci.influxdata.com](https://oci.influxdata.com).
79+
identified in the [InfluxDB Clustered release notes](/influxdb3/clustered/reference/release-notes/clustered/).
8080

8181
**When upgrading, always upgrade to each checkpoint release first, before proceeding
8282
to newer versions.**

content/kapacitor/v1/guides/anomaly_detection.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -407,15 +407,15 @@ if __name__ == '__main__':
407407
agent.handler = h
408408

409409
# Anything printed to STDERR from a UDF process gets captured into the Kapacitor logs.
410-
print >> sys.stderr, "Starting agent for TTestHandler"
410+
print("Starting agent for TTestHandler", file=sys.stderr)
411411
agent.start()
412412
agent.wait()
413-
print >> sys.stderr, "Agent finished"
413+
print("Agent finished", file=sys.stderr)
414414

415415
```
416416

417417
That was a lot, but now we are ready to configure Kapacitor to run our
418-
code. Create a scratch dir for working through the rest of this
418+
code. Make sure that `scipy` is installed (`$ pip3 install scipy`). Create a scratch dir for working through the rest of this
419419
guide:
420420

421421
```bash
@@ -434,7 +434,7 @@ Add this snippet to your Kapacitor configuration file (typically located at `/et
434434
[udf.functions]
435435
[udf.functions.tTest]
436436
# Run python
437-
prog = "/usr/bin/python2"
437+
prog = "/usr/bin/python3"
438438
# Pass args to python
439439
# -u for unbuffered STDIN and STDOUT
440440
# and the path to the script
@@ -468,8 +468,8 @@ correctly:
468468
service kapacitor restart
469469
```
470470

471-
Check the logs (`/var/log/kapacitor/`) to make sure you see a
472-
*Listening for signals* line and that no errors occurred. If you
471+
Check the logs (`/var/log/kapacitor/` or `journalctl -f -n 256 -u kapacitor.service`) to make sure you see a
472+
_Listening for signals_ line and that no errors occurred. If you
473473
don't see the line, it's because the UDF process is hung and not
474474
responding. It should be killed after a timeout, so give it a moment
475475
to stop properly. Once stopped, you can fix any errors and try again.
@@ -544,6 +544,20 @@ the Kapacitor task:
544544
kapacitor define print_temps -tick print_temps.tick
545545
```
546546

547+
Ensure that the task is enabled:
548+
549+
```bash
550+
kapacitor enable print_temps
551+
```
552+
553+
And then list the tasks:
554+
555+
```bash
556+
kapacitor list tasks
557+
ID Type Status Executing Databases and Retention Policies
558+
print_temps stream enabled true ["printer"."autogen"]
559+
```
560+
547561
### Generating test data
548562

549563
To simulate our printer for testing, we will write a simple Python
@@ -557,7 +571,7 @@ to use real data for testing our TICKscript and UDF, but this is
557571
faster (and much cheaper than a 3D printer).
558572

559573
```python
560-
#!/usr/bin/python2
574+
#!/usr/bin/env python
561575

562576
from numpy import random
563577
from datetime import timedelta, datetime
@@ -672,7 +686,11 @@ fake data so that we can easily iterate on the task:
672686
```sh
673687
# Start the recording in the background
674688
kapacitor record stream -task print_temps -duration 24h -no-wait
675-
# Grab the ID from the output and store it in a var
689+
# List recordings to find the ID
690+
kapacitor list recordings
691+
ID Type Status Size Date
692+
7bd3ced5-5e95-4a67-a0e1-f00860b1af47 stream running 0 B 04 May 16 11:34 MDT
693+
# Copy the ID and store it in a variable
676694
rid=7bd3ced5-5e95-4a67-a0e1-f00860b1af47
677695
# Run our python script to generate data
678696
chmod +x ./printer_data.py

content/telegraf/v1/release-notes.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ menu:
1111
weight: 60
1212
---
1313

14-
## v1.34.1 [2025-03-24]
14+
## v1.34.1 {date="2025-03-24"}
1515

1616
### Bugfixes
1717

@@ -40,7 +40,7 @@ menu:
4040
- [#16653](https://github.com/influxdata/telegraf/pull/16653) `deps` Bump k8s.io/api from 0.32.1 to 0.32.3
4141
- [#16659](https://github.com/influxdata/telegraf/pull/16659) `deps` Bump tj-actions/changed-files from v45 to v46.0.1
4242

43-
## v1.34.0 [2025-03-10]
43+
## v1.34.0 {date="2025-03-10"}
4444

4545
### New Plugins
4646

@@ -94,7 +94,7 @@ menu:
9494
- [#16575](https://github.com/influxdata/telegraf/pull/16575) `deps` Bump github.com/tidwall/wal from 1.1.7 to 1.1.8
9595
- [#16578](https://github.com/influxdata/telegraf/pull/16578) `deps` Bump super-linter/super-linter from 7.2.1 to 7.3.0
9696

97-
## v1.33.3 [2025-02-25]
97+
## v1.33.3 {date="2025-02-25"}
9898

9999
### Important Changes
100100

@@ -128,7 +128,7 @@ menu:
128128
- [#16504](https://github.com/influxdata/telegraf/pull/16504) `deps` Bump golang.org/x/net from 0.34.0 to 0.35.0
129129
- [#16512](https://github.com/influxdata/telegraf/pull/16512) `deps` Bump golangci-lint from v1.63.4 to v1.64.5
130130

131-
## v1.33.2 [2025-02-10]
131+
## v1.33.2 {date="2025-02-10"}
132132

133133
### Important Changes
134134

@@ -177,7 +177,7 @@ menu:
177177
- [#16482](https://github.com/influxdata/telegraf/pull/16482) `deps` Update Apache arrow from 0.0-20240716144821-cf5d7c7ec3cf to 18.1.0
178178
- [#16423](https://github.com/influxdata/telegraf/pull/16423) `deps` Update ClickHouse SQL driver from 1.5.4 to to 2.30.1
179179

180-
## v1.33.1 [2025-01-10]
180+
## v1.33.1 {date="2025-01-10"}
181181

182182
### Important Changes
183183

0 commit comments

Comments
 (0)