Skip to content

Commit 46d51e0

Browse files
committed
PMM-12913 fix linter warnings
1 parent c2bb30f commit 46d51e0

File tree

7 files changed

+92
-73
lines changed

7 files changed

+92
-73
lines changed

Makefile.include

+24-6
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,25 @@ gen-api: ## Generate PMM API
4848

4949
bin/buf generate -v api
5050

51-
for API in api/agentlocal/v1 api/server/v1 api/inventory/v1 api/management/v1 api/actions/v1 api/advisors/v1 api/alerting/v1 api/backup/v1 api/dump/v1 api/management/v1/azure api/role/v1 api/qan/v1 api/management/v1/agent api/management/v1/node api/management/v1/service api/platform/v1 api/user/v1; do \
51+
SPECS="\
52+
api/agentlocal/v1 \
53+
api/server/v1 \
54+
api/user/v1 \
55+
api/inventory/v1 \
56+
api/management/v1 \
57+
api/management/v1/agent \
58+
api/management/v1/node \
59+
api/management/v1/service \
60+
api/management/v1/azure \
61+
api/actions/v1 \
62+
api/advisors/v1 \
63+
api/alerting/v1 \
64+
api/backup/v1 \
65+
api/dump/v1 \
66+
api/role/v1 \
67+
api/qan/v1 \
68+
api/platform/v1"; \
69+
for API in $$SPECS; do \
5270
set -x ; \
5371
bin/swagger mixin $$API/json/header.json $$API/*.swagger.json --output=$$API/json/$$(basename $$API).json --keep-spec-order; \
5472
bin/swagger flatten --with-flatten=expand --with-flatten=remove-unused $$API/json/$$(basename $$API).json --output=$$API/json/$$(basename $$API).json ; \
@@ -78,7 +96,7 @@ gen-api: ## Generate PMM API
7896
api/backup/v1/json/v1.json \
7997
api/advisors/v1/json/v1.json \
8098
api/alerting/v1/json/v1.json \
81-
api/qan/v1/json/v1.json
99+
api/qan/v1/json/v1.json
82100
bin/swagger validate api/swagger/swagger.json
83101

84102
bin/swagger-order --output=api/swagger/swagger.json api/swagger/swagger.json
@@ -90,16 +108,16 @@ gen-api: ## Generate PMM API
90108
api/user/v1/json/v1.json \
91109
api/inventory/v1/json/v1.json \
92110
api/management/v1/json/v1.json \
111+
api/management/v1/agent/json/agent.json \
112+
api/management/v1/node/json/node.json \
113+
api/management/v1/service/json/service.json \
114+
api/management/v1/azure/json/azure.json \
93115
api/actions/v1/json/v1.json \
94116
api/alerting/v1/json/v1.json \
95117
api/advisors/v1/json/v1.json \
96118
api/backup/v1/json/v1.json \
97119
api/dump/v1/json/v1.json \
98-
api/management/v1/azure/json/azure.json \
99120
api/role/v1/json/v1.json \
100-
api/management/v1/agent/json/agent.json \
101-
api/management/v1/node/json/node.json \
102-
api/management/v1/service/json/service.json \
103121
api/qan/v1/json/v1.json \
104122
api/platform/v1/json/v1.json
105123

api/inventory/v1/agents.pb.go

+46-47
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/inventory/v1/agents_grpc.pb.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/inventory/v1/json/client/agents_service/agents_service_client.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/inventory/v1/json/v1.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5066,7 +5066,7 @@
50665066
}
50675067
},
50685068
"post": {
5069-
"description": "Adds an Agent to Inventory. Only one top-level parameter should be passed.",
5069+
"description": "Adds an Agent to Inventory. Only one agent at a time can be passed.",
50705070
"tags": [
50715071
"AgentsService"
50725072
],
@@ -9231,7 +9231,7 @@
92319231
}
92329232
},
92339233
"put": {
9234-
"description": "Updates an Agent in Inventory. Only one top-level parameter should be passed.",
9234+
"description": "Updates an Agent in Inventory. Only one agent at a time can be passed.",
92359235
"tags": [
92369236
"AgentsService"
92379237
],

api/swagger/swagger-dev.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -10328,7 +10328,7 @@
1032810328
}
1032910329
},
1033010330
"post": {
10331-
"description": "Adds an Agent to Inventory. Only one top-level parameter should be passed.",
10331+
"description": "Adds an Agent to Inventory. Only one agent at a time can be passed.",
1033210332
"tags": [
1033310333
"AgentsService"
1033410334
],
@@ -14493,7 +14493,7 @@
1449314493
}
1449414494
},
1449514495
"put": {
14496-
"description": "Updates an Agent in Inventory. Only one top-level parameter should be passed.",
14496+
"description": "Updates an Agent in Inventory. Only one agent at a time can be passed.",
1449714497
"tags": [
1449814498
"AgentsService"
1449914499
],
@@ -16369,7 +16369,7 @@
1636916369
"ManagementV1Beta1Service"
1637016370
],
1637116371
"summary": "List Agents",
16372-
"operationId": "ListAgentsMixin13",
16372+
"operationId": "ListAgentsMixin6",
1637316373
"parameters": [
1637416374
{
1637516375
"description": "Only one of the parameters below must be set.",
@@ -19230,7 +19230,7 @@
1923019230
"ManagementV1Beta1Service"
1923119231
],
1923219232
"summary": "Get Node",
19233-
"operationId": "GetNodeMixin13",
19233+
"operationId": "GetNodeMixin6",
1923419234
"parameters": [
1923519235
{
1923619236
"name": "body",
@@ -19447,7 +19447,7 @@
1944719447
"ManagementV1Beta1Service"
1944819448
],
1944919449
"summary": "List Nodes",
19450-
"operationId": "ListNodesMixin13",
19450+
"operationId": "ListNodesMixin6",
1945119451
"parameters": [
1945219452
{
1945319453
"name": "body",
@@ -22294,7 +22294,7 @@
2229422294
"ManagementV1Beta1Service"
2229522295
],
2229622296
"summary": "List Services",
22297-
"operationId": "ListServicesMixin13",
22297+
"operationId": "ListServicesMixin6",
2229822298
"parameters": [
2229922299
{
2230022300
"name": "body",
@@ -27662,6 +27662,9 @@
2766227662
{
2766327663
"name": "ManagementService"
2766427664
},
27665+
{
27666+
"name": "ManagementV1Beta1Service"
27667+
},
2766527668
{
2766627669
"name": "ActionsService"
2766727670
},
@@ -27689,9 +27692,6 @@
2768927692
{
2769027693
"name": "RoleService"
2769127694
},
27692-
{
27693-
"name": "ManagementV1Beta1Service"
27694-
},
2769527695
{
2769627696
"name": "CollectorService"
2769727697
},

managed/models/agent_helpers.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ import (
3030
"github.com/percona/pmm/version"
3131
)
3232

33-
const agentIDPrefix = "/agent_id/"
34-
const serviceIDPrefix = "/service_id/"
35-
const nodeIDPrefix = "/node_id/"
33+
const (
34+
agentIDPrefix = "/agent_id/"
35+
serviceIDPrefix = "/service_id/"
36+
nodeIDPrefix = "/node_id/"
37+
)
3638

3739
// MySQLOptionsParams contains methods to create MySQLOptions object.
3840
type MySQLOptionsParams interface {

0 commit comments

Comments
 (0)