Skip to content

Commit 0481187

Browse files
authored
WIP: Mixin lint fixes (#1367)
* Fix mixin lint issues * Fix zookeeper lint * Add newline * Bump mixtool * Bump go in ci
1 parent 8788838 commit 0481187

File tree

15 files changed

+128
-33
lines changed

15 files changed

+128
-33
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Go
1919
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
2020
with:
21-
go-version: 1.18
21+
go-version: 1.23
2222
- name: Install CI dependencies
2323
run: make install-ci-deps
2424
- name: Lint and Format
@@ -33,7 +33,7 @@ jobs:
3333
- name: Setup Go
3434
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
3535
with:
36-
go-version: 1.18
36+
go-version: 1.23
3737
- name: Install CI dependencies
3838
run: make install-ci-deps
3939
- name: Run Tests

.github/workflows/lint-mixins.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup Go
2626
uses: actions/setup-go@v5
2727
with:
28-
go-version: 1.18
28+
go-version: 1.23
2929

3030
- name: Install CI dependencies
3131
run: make install-ci-deps
@@ -68,7 +68,7 @@ jobs:
6868
- name: Setup Go
6969
uses: actions/setup-go@v5
7070
with:
71-
go-version: 1.18
71+
go-version: 1.23
7272

7373
- name: Install CI dependencies
7474
run: make install-ci-deps

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ install-ci-deps:
55
go install github.com/google/go-jsonnet/cmd/[email protected]
66
go install github.com/google/go-jsonnet/cmd/[email protected]
77
go install github.com/google/go-jsonnet/cmd/[email protected]
8-
go install github.com/monitoring-mixins/mixtool/cmd/mixtool@a9e78b0942a4186162bf170efde7b4b3167d31a4
8+
go install github.com/monitoring-mixins/mixtool/cmd/mixtool@a8984473edc33da685bd5f2138eab9cf6a0ff2b7
99
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected]
1010

1111
fmt:

common-lib/common/signal/utils.libsonnet

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
if unit == 'seconds' || unit == 's' then 'percent'
5454
else if unit == 'requests' then 'rps'
5555
else if unit == 'packets' then 'pps'
56-
else if unit == 'short' then '/s'
5756
else unit
5857
)
5958
else unit,

jvm-observ-lib/.lint

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
exclusions:
2-
panel-title-description-rule:
3-
reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion"
2+
panel-datasource-rule:
3+
entries:
4+
- panel: GC duration
5+
- panel: Allocated/promoted
46
panel-units-rule:
5-
reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion"
6-
template-datasource-rule:
7-
reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion"
8-
template-instance-rule:
9-
reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion"
10-
template-job-rule:
11-
reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion"
12-
template-on-time-change-reload-rule:
13-
reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion"
7+
entries:
8+
- panel: Process files open

jvm-observ-lib/panels.libsonnet

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ local commonlib = import 'common-lib/common/main.libsonnet';
7171

7272
gcDuration:
7373
g.panel.timeSeries.new('GC duration')
74+
+ g.panel.timeSeries.panelOptions.withDescription('Major and minor garbage collections')
7475
+ commonlib.panels.generic.timeSeries.base.stylize()
7576
+ g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0)
7677
+ signals.gc.collectionsTimeAvg.asPanelMixin()
@@ -79,6 +80,12 @@ local commonlib = import 'common-lib/common/main.libsonnet';
7980

8081
promotedAllocated:
8182
g.panel.timeSeries.new('Allocated/promoted')
83+
+ g.panel.timeSeries.panelOptions.withDescription(
84+
|||
85+
'Allocated' is the size increase of the young generation memory pool after one GC and before the next. It reflects minor GC.
86+
'Promoted' is the size increase of the old generation memory pool after GC. It reflects full GC.
87+
|||
88+
)
8289
+ commonlib.panels.memory.timeSeries.usageBytes.stylize()
8390
+ signals.gc.memAllocatedBytes.asPanelMixin()
8491
+ signals.gc.memAllocated.asPanelMixin()

jvm-observ-lib/signals/gc.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function(this)
2222
//gc
2323
collections: {
2424
name: 'Garbage collections',
25-
description: 'Major and minor garbage collection',
25+
description: 'Major and minor garbage collections',
2626
type: 'counter',
2727
unit: 'ops',
2828
optional: true,

kafka-observ-lib/.lint

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
exclusions:
2+
panel-units-rule:
3+
entries:
4+
- panel: Process files open
5+
6+
target-instance-rule:
7+
reason: Instance selector is intentionally dropped in these panels as they represent whole cluster.
8+
entries:
9+
- dashboard: ZooKeeper overview
10+
panel: Current zookeeper role
11+
- dashboard: Kafka overview
12+
panel: Current role
13+
- dashboard: Kafka overview
14+
panel: Active kafka controllers
15+
- dashboard: Kafka overview
16+
panel: Brokers count
17+
- dashboard: Kafka overview
18+
panel: Brokers count
19+
- dashboard: Kafka overview
20+
panel: Cluster network throughput
21+
- dashboard: Kafka overview
22+
panel: Cluster messages throughput
23+
- dashboard: Kafka topic overview
24+
panel-datasource-rule:
25+
entries:
26+
- panel: GC duration
27+
- panel: Allocated/promoted
28+
- panel: Cluster network throughput
29+
- panel: Cluster messages throughpu
30+
- panel: Broker network throughput
31+
- panel: Broker messages throughput
32+
- panel: Producer ($instance)
33+
- panel: Fetch-follower ($instance)
34+
- panel: Fetch-consumer ($instance)
35+
- panel: Cluster network throughput
36+
dashboard: Kafka overview
37+
- panel: Cluster messages throughput
38+
dashboard: Kafka overview
39+
- panel: Broker network throughput
40+
dashboard: Kafka overview
41+
- panel: Broker messages throughput
42+
dashboard: Kafka overview
43+
- panel: Consumer group overview
44+
dashboard: Kafka topic overview
45+
- panel: Topic overview
46+
dashboard: Kafka topic overview
47+
48+
panel-title-description-rule:
49+
entries:
50+
- panel: Cluster network throughput
51+
dashboard: Kafka overview
52+
- panel: Cluster messages throughput
53+
dashboard: Kafka overview
54+
- panel: Broker network throughput
55+
dashboard: Kafka overview
56+
- panel: Broker messages throughput
57+
dashboard: Kafka overview
58+
- panel: Consumer group overview
59+
dashboard: Kafka topic overview
60+
template-instance-rule:
61+
reason: kafka_cluster is used intead
62+
entries:
63+
- dashboard: Kafka topic overview
64+
65+
target-job-rule:
66+
reason: kafka_cluster is used intead
67+
template-job-rule:
68+
reason: kafka_cluster is used intead
69+
70+

kafka-observ-lib/panels/topic.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ local commonlib = import 'common-lib/common/main.libsonnet';
1515
// Requirements for this table's data
1616
topicTable:
1717
signals.topic.topicLogStartOffset.asTable(name='Topic overview', format='time_series')
18+
+ g.panel.table.panelOptions.withDescription('Kafka active topics overview. ')
1819
+ signals.topic.topicLogEndOffset.asTableColumn(format='time_series')
1920
+ signals.topic.topicMessagesPerSecByPartition.asTableColumn(format='time_series')
2021
+ signals.topic.topicLogSize.asTableColumn(format='time_series')

memcached-mixin/dashboards.libsonnet

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ local g = (import 'grafana-builder/grafana.libsonnet');
118118
'Value #B': { alias: 'Uptime', type: 'number', unit: 'dtdurations' },
119119
})
120120
)
121-
),
121+
)
122+
{ editable: false },
122123
},
123124
}

0 commit comments

Comments
 (0)