Skip to content

Commit

Permalink
PMM-12913 fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Mar 22, 2024
1 parent c2bb30f commit 46d51e0
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 73 deletions.
30 changes: 24 additions & 6 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,25 @@ gen-api: ## Generate PMM API

bin/buf generate -v api

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 \
SPECS="\
api/agentlocal/v1 \
api/server/v1 \
api/user/v1 \
api/inventory/v1 \
api/management/v1 \
api/management/v1/agent \
api/management/v1/node \
api/management/v1/service \
api/management/v1/azure \
api/actions/v1 \
api/advisors/v1 \
api/alerting/v1 \
api/backup/v1 \
api/dump/v1 \
api/role/v1 \
api/qan/v1 \
api/platform/v1"; \
for API in $$SPECS; do \
set -x ; \
bin/swagger mixin $$API/json/header.json $$API/*.swagger.json --output=$$API/json/$$(basename $$API).json --keep-spec-order; \
bin/swagger flatten --with-flatten=expand --with-flatten=remove-unused $$API/json/$$(basename $$API).json --output=$$API/json/$$(basename $$API).json ; \
Expand Down Expand Up @@ -78,7 +96,7 @@ gen-api: ## Generate PMM API
api/backup/v1/json/v1.json \
api/advisors/v1/json/v1.json \
api/alerting/v1/json/v1.json \
api/qan/v1/json/v1.json
api/qan/v1/json/v1.json
bin/swagger validate api/swagger/swagger.json

bin/swagger-order --output=api/swagger/swagger.json api/swagger/swagger.json
Expand All @@ -90,16 +108,16 @@ gen-api: ## Generate PMM API
api/user/v1/json/v1.json \
api/inventory/v1/json/v1.json \
api/management/v1/json/v1.json \
api/management/v1/agent/json/agent.json \
api/management/v1/node/json/node.json \
api/management/v1/service/json/service.json \
api/management/v1/azure/json/azure.json \
api/actions/v1/json/v1.json \
api/alerting/v1/json/v1.json \
api/advisors/v1/json/v1.json \
api/backup/v1/json/v1.json \
api/dump/v1/json/v1.json \
api/management/v1/azure/json/azure.json \
api/role/v1/json/v1.json \
api/management/v1/agent/json/agent.json \
api/management/v1/node/json/node.json \
api/management/v1/service/json/service.json \
api/qan/v1/json/v1.json \
api/platform/v1/json/v1.json

Expand Down
93 changes: 46 additions & 47 deletions api/inventory/v1/agents.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions api/inventory/v1/agents_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/inventory/v1/json/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5066,7 +5066,7 @@
}
},
"post": {
"description": "Adds an Agent to Inventory. Only one top-level parameter should be passed.",
"description": "Adds an Agent to Inventory. Only one agent at a time can be passed.",
"tags": [
"AgentsService"
],
Expand Down Expand Up @@ -9231,7 +9231,7 @@
}
},
"put": {
"description": "Updates an Agent in Inventory. Only one top-level parameter should be passed.",
"description": "Updates an Agent in Inventory. Only one agent at a time can be passed.",
"tags": [
"AgentsService"
],
Expand Down
18 changes: 9 additions & 9 deletions api/swagger/swagger-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -10328,7 +10328,7 @@
}
},
"post": {
"description": "Adds an Agent to Inventory. Only one top-level parameter should be passed.",
"description": "Adds an Agent to Inventory. Only one agent at a time can be passed.",
"tags": [
"AgentsService"
],
Expand Down Expand Up @@ -14493,7 +14493,7 @@
}
},
"put": {
"description": "Updates an Agent in Inventory. Only one top-level parameter should be passed.",
"description": "Updates an Agent in Inventory. Only one agent at a time can be passed.",
"tags": [
"AgentsService"
],
Expand Down Expand Up @@ -16369,7 +16369,7 @@
"ManagementV1Beta1Service"
],
"summary": "List Agents",
"operationId": "ListAgentsMixin13",
"operationId": "ListAgentsMixin6",
"parameters": [
{
"description": "Only one of the parameters below must be set.",
Expand Down Expand Up @@ -19230,7 +19230,7 @@
"ManagementV1Beta1Service"
],
"summary": "Get Node",
"operationId": "GetNodeMixin13",
"operationId": "GetNodeMixin6",
"parameters": [
{
"name": "body",
Expand Down Expand Up @@ -19447,7 +19447,7 @@
"ManagementV1Beta1Service"
],
"summary": "List Nodes",
"operationId": "ListNodesMixin13",
"operationId": "ListNodesMixin6",
"parameters": [
{
"name": "body",
Expand Down Expand Up @@ -22294,7 +22294,7 @@
"ManagementV1Beta1Service"
],
"summary": "List Services",
"operationId": "ListServicesMixin13",
"operationId": "ListServicesMixin6",
"parameters": [
{
"name": "body",
Expand Down Expand Up @@ -27662,6 +27662,9 @@
{
"name": "ManagementService"
},
{
"name": "ManagementV1Beta1Service"
},
{
"name": "ActionsService"
},
Expand Down Expand Up @@ -27689,9 +27692,6 @@
{
"name": "RoleService"
},
{
"name": "ManagementV1Beta1Service"
},
{
"name": "CollectorService"
},
Expand Down
8 changes: 5 additions & 3 deletions managed/models/agent_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ import (
"github.com/percona/pmm/version"
)

const agentIDPrefix = "/agent_id/"
const serviceIDPrefix = "/service_id/"
const nodeIDPrefix = "/node_id/"
const (
agentIDPrefix = "/agent_id/"
serviceIDPrefix = "/service_id/"
nodeIDPrefix = "/node_id/"
)

// MySQLOptionsParams contains methods to create MySQLOptions object.
type MySQLOptionsParams interface {
Expand Down

0 comments on commit 46d51e0

Please sign in to comment.