Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-12673 Protobuf linters #2612

Merged
merged 67 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
9193014
PMM-12673 Replace _INVALID suffix in enums with _UNSPECIFIED
artemgavrilov Nov 9, 2023
0467f05
PMM-12673 Remove unused imports
artemgavrilov Nov 9, 2023
0032d9d
Refactor all protobuf enums
artemgavrilov Nov 10, 2023
c963416
PMM-12673 Fix
artemgavrilov Nov 13, 2023
c9523e8
PMM-12673 Fix qan tests
artemgavrilov Nov 13, 2023
7814162
PMM-12673 Add service suffix to all grpc service names
artemgavrilov Nov 13, 2023
231998f
PMM-12673 Fix QAN GetReport request/response naming
artemgavrilov Nov 13, 2023
e840737
Merge remote-tracking branch 'origin/v3-api-breaking-changes' into PM…
artemgavrilov Nov 16, 2023
8095dd4
PMM-12673 Fix
artemgavrilov Nov 16, 2023
84ab6d3
PMM-12673 Fix
artemgavrilov Nov 17, 2023
93d0648
PMM-12673 Fix tests
artemgavrilov Nov 17, 2023
e6baeac
PMM-12673 Fix tests
artemgavrilov Nov 17, 2023
0e20bb5
PMM-12673 Fix test
artemgavrilov Nov 17, 2023
56a558d
PMM-12673 Refactor user API requests and responses
artemgavrilov Nov 17, 2023
ce8cf2f
PMM-12673 Fix tests
artemgavrilov Nov 17, 2023
1c0e15f
PMM-12673 Fix tests
artemgavrilov Nov 17, 2023
3ba4bf7
PMM-12673 Refactor requests/responses names
artemgavrilov Nov 17, 2023
6a31278
PMM-12673 Refactoring
artemgavrilov Nov 17, 2023
5818af4
PMM-12673 Fix
artemgavrilov Nov 17, 2023
e8774b7
PMM-12673 Fix
artemgavrilov Nov 17, 2023
37277a8
PMM-12673 Fix
artemgavrilov Nov 17, 2023
304965b
PMM-12673 Refactoring
artemgavrilov Nov 17, 2023
05d8148
PMM-12673 Restructure
artemgavrilov Nov 17, 2023
34151e0
PMM-12673 Restructure
artemgavrilov Nov 17, 2023
30129a1
PMM-12673 Restructure
artemgavrilov Nov 17, 2023
fd21919
PMM-12673 Restructure
artemgavrilov Nov 17, 2023
ffea84f
PMM-12673 Restructure
artemgavrilov Nov 17, 2023
ac6c1dd
PMM-12673 Fix
artemgavrilov Nov 18, 2023
33e0cfd
PMM-12673 Restructure
artemgavrilov Nov 18, 2023
abebe9f
PMM-12673 Restructure
artemgavrilov Nov 18, 2023
6dbac42
PMM-12673 Restructure
artemgavrilov Nov 18, 2023
c5ab31a
PMM-12673 Restructure
artemgavrilov Nov 18, 2023
74ca313
PMM-12673 Restructure
artemgavrilov Nov 18, 2023
86fad9c
PMM-12673 Fix
artemgavrilov Nov 18, 2023
33383d9
PMM-12673 Configure buf lint, setup CI action
artemgavrilov Nov 18, 2023
6c6a965
PMM-12673 Cleanup
artemgavrilov Nov 18, 2023
3dc7c4d
PMM-12673 Fix CI
artemgavrilov Nov 18, 2023
8a72b0a
PMM-12673 Rename
artemgavrilov Nov 18, 2023
69d84a3
PMM-12673 Trigger API lint warning
artemgavrilov Nov 18, 2023
7a8b6be
PMM-12673 Remove redundant go_package option
artemgavrilov Nov 19, 2023
dbad56a
PMM-12673 Refactoring
artemgavrilov Nov 19, 2023
49b6d44
PMM-12673 Refactoring
artemgavrilov Nov 19, 2023
4ece10f
PMM-12673 Refactoring
artemgavrilov Nov 19, 2023
1d70408
PMM-12673 Refactoring
artemgavrilov Nov 19, 2023
71e3493
PMM-12673 Refactoring
artemgavrilov Nov 19, 2023
2bdfd34
PMM-12673 Refactoring
artemgavrilov Nov 19, 2023
4dcefae
PMM-12673 Refactoring
artemgavrilov Nov 19, 2023
785a6e4
PMM-12673 Refactoring
artemgavrilov Nov 19, 2023
6514257
PMM-12673 Refactoring
artemgavrilov Nov 19, 2023
e9138e6
PMM-12673 Fix buf lint in CI
artemgavrilov Nov 20, 2023
18b6e94
PMM-12673 Fix
artemgavrilov Nov 20, 2023
4565246
PMM-12673 add debug data
artemgavrilov Nov 20, 2023
c7d1882
PMM-12673 Add debug data [skip ci]
artemgavrilov Nov 20, 2023
085d3d1
PMM-12673 Trigger CI
artemgavrilov Nov 20, 2023
8b31ebd
PMM-12673 Debug
artemgavrilov Nov 20, 2023
d762b00
PMM-12673 Remove debug data
artemgavrilov Nov 20, 2023
e75eedc
PMM-12673 Refactoring
artemgavrilov Nov 20, 2023
516595c
PMM-12673 Fix some linter warnings
artemgavrilov Nov 20, 2023
7e55fe9
PMM-12673 Fix test
artemgavrilov Nov 20, 2023
c39f75b
Update docs/managed/update-process.md
artemgavrilov Nov 22, 2023
4351929
Update api/buf.yaml
artemgavrilov Nov 22, 2023
9595a6a
Merge remote-tracking branch 'origin/v3-api-breaking-changes' into PM…
artemgavrilov Nov 22, 2023
820807b
Merge remote-tracking branch 'origin/v3-api-breaking-changes' into PM…
artemgavrilov Nov 22, 2023
3127e3f
PMM-12673 Fix API tests
artemgavrilov Nov 22, 2023
ae7f013
Merge remote-tracking branch 'origin/v3-api-breaking-changes' into PM…
artemgavrilov Nov 22, 2023
fe07621
Fix import allias
artemgavrilov Nov 22, 2023
424de4d
PMM-12673 Post-merge fix
artemgavrilov Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,25 @@ jobs:
- name: Run go-sumtype
run: bin/go-sumtype ./...

- name: Run linters
- name: Run API linter
env:
COMMAND: 'bin/buf lint -v api'
REDIRECT: "| bin/reviewdog -f=buf -reporter=github-pr-review -fail-on-error=true"
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }}
run: |
if out=$( ${{ env.COMMAND }} ); exit_code=$?; [ $exit_code -ne 0 ]; then
## buf uses exit code 100 for linter warnings
if [ $exit_code != 100 ] || ${{ github.event.pull_request == null }}; then
echo "$out"
exit $exit_code
else
echo "$out" ${{ env.REDIRECT }}
fi
else
echo "$out"
fi

- name: Run code linters
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }}
Expand Down
47 changes: 24 additions & 23 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ gen-api: ## Generate PMM API

bin/buf generate -v api

for API in api/agentlocalpb api/serverpb api/inventorypb api/managementpb api/managementpb/alerting api/managementpb/backup api/managementpb/azure api/managementpb/role api/qanpb api/managementpb/agent api/managementpb/node api/managementpb/service api/platformpb api/userpb; do \
for API in api/agentlocal/v1 api/server/v1 api/inventory/v1 api/management/v1 api/management/v1/alerting api/management/v1/backup api/management/v1/azure api/management/v1/role api/qan/v1beta1 api/management/v1/agent api/management/v1/node api/management/v1/service api/platform/v1 api/user/v1; 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 All @@ -68,36 +68,36 @@ gen-api: ## Generate PMM API
--additional-initialism=ha ; \
done

# generate public API spec, omit agentlocalpb (always private),
# generate public API spec, omit agentlocal (always private),
# as well as a number of protos that are in beta (not v1 yet, they all go to a similar call below)
bin/swagger mixin --output=api/swagger/swagger.json \
api/swagger/header.json \
api/serverpb/json/serverpb.json \
api/userpb/json/userpb.json \
api/inventorypb/json/inventorypb.json \
api/managementpb/json/managementpb.json \
api/managementpb/backup/json/backup.json \
api/managementpb/alerting/json/alerting.json
api/server/v1/json/v1.json \
api/user/v1/json/v1.json \
api/inventory/v1/json/v1.json \
api/management/v1/json/v1.json \
api/management/v1/backup/json/backup.json \
api/management/v1/alerting/json/alerting.json
bin/swagger validate api/swagger/swagger.json

bin/swagger-order --output=api/swagger/swagger.json api/swagger/swagger.json

# generate API spec with all PMM Server APIs (omit agentlocalpb)
# generate API spec with all PMM Server APIs (omit agentlocal)
bin/swagger mixin --output=api/swagger/swagger-dev.json \
api/swagger/header-dev.json \
api/serverpb/json/serverpb.json \
api/userpb/json/userpb.json \
api/inventorypb/json/inventorypb.json \
api/managementpb/json/managementpb.json \
api/managementpb/alerting/json/alerting.json \
api/managementpb/backup/json/backup.json \
api/managementpb/azure/json/azure.json \
api/managementpb/role/json/role.json \
api/managementpb/agent/json/agent.json \
api/managementpb/node/json/node.json \
api/managementpb/service/json/service.json \
api/qanpb/json/qanpb.json \
api/platformpb/json/platformpb.json
api/server/v1/json/v1.json \
api/user/v1/json/v1.json \
api/inventory/v1/json/v1.json \
api/management/v1/json/v1.json \
api/management/v1/alerting/json/alerting.json \
api/management/v1/backup/json/backup.json \
api/management/v1/azure/json/azure.json \
api/management/v1/role/json/role.json \
api/management/v1/agent/json/agent.json \
api/management/v1/node/json/node.json \
api/management/v1/service/json/service.json \
api/qan/v1beta1/json/v1beta1.json \
api/platform/v1/json/v1.json
bin/swagger validate api/swagger/swagger-dev.json

bin/swagger-order --output=api/swagger/swagger-dev.json api/swagger/swagger-dev.json
Expand Down Expand Up @@ -127,7 +127,7 @@ clean: clean_swagger ## Remove generated files
find api -name '*.pb.gw.go' -print -delete
find api -name '*.validate.go' -print -delete

for API in api/agentlocalpb api/serverpb api/inventorypb api/managementpb api/managementpb/alerting api/managementpb/backup api/managementpb/role api/managementpb/agent api/managementpb/node api/managementpb/service api/qanpb api/platformpb ; do \
for API in api/agentlocal/v1 api/server/v1 api/inventory/v1 api/management/v1 api/management/v1/alerting api/management/v1/backup api/management/v1/role api/management/v1/agent api/management/v1/node api/management/v1/service api/qan/v1beta1 api/platform/v1 api/user/v1 ; do \
rm -fr $$API/json/client $$API/json/models $$API/json/$$(basename $$API).json ; \
done
rm -f api/swagger/swagger.json api/swagger/swagger-dev.json
Expand All @@ -139,6 +139,7 @@ api-test: ## Run API tests on dev env.
go test -count=1 -race -p 1 -v ./api-tests/... -pmm.server-insecure-tls

check: ## Run required checkers and linters
bin/buf lint -v api
LOG_LEVEL=error bin/golangci-lint run ; \
bin/go-sumtype ./... ; \
bin/go-consistent -pedantic ./...
Expand Down
6 changes: 3 additions & 3 deletions admin/agentlocal/agentlocal.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
httptransport "github.com/go-openapi/runtime/client"
"github.com/sirupsen/logrus"

"github.com/percona/pmm/api/agentlocalpb/json/client"
agentlocal "github.com/percona/pmm/api/agentlocalpb/json/client/agent_local"
"github.com/percona/pmm/api/agentlocal/v1/json/client"
agentlocal "github.com/percona/pmm/api/agentlocal/v1/json/client/agent_local_service"
)

// SetTransport configures transport for accessing local pmm-agent API.
Expand Down Expand Up @@ -98,7 +98,7 @@ func GetRawStatus(ctx context.Context, requestNetworkInfo NetworkInfo) (*agentlo
Context: ctx,
}

res, err := client.Default.AgentLocal.Status(params)
res, err := client.Default.AgentLocalService.Status(params)
if err != nil {
if res == nil {
return nil, err
Expand Down
16 changes: 8 additions & 8 deletions admin/commands/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (

"github.com/percona/pmm/admin/agentlocal"
"github.com/percona/pmm/admin/helpers"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/nodes"
"github.com/percona/pmm/api/inventorypb/json/client/services"
managementClient "github.com/percona/pmm/api/managementpb/json/client"
"github.com/percona/pmm/api/managementpb/json/client/annotation"
"github.com/percona/pmm/api/inventory/v1/json/client"
nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service"
services "github.com/percona/pmm/api/inventory/v1/json/client/services_service"
managementClient "github.com/percona/pmm/api/management/v1/json/client"
annotation "github.com/percona/pmm/api/management/v1/json/client/annotation_service"
)

var annotationResultT = ParseTemplate(`
Expand Down Expand Up @@ -83,7 +83,7 @@ func (cmd *AnnotationCommand) getCurrentNode() (*nodes.GetNodeOKBody, error) {
Context: Ctx,
}

result, err := client.Default.Nodes.GetNode(params)
result, err := client.Default.NodesService.GetNode(params)
if err != nil {
return nil, errors.Wrap(err, "default get node")
}
Expand Down Expand Up @@ -115,7 +115,7 @@ func (cmd *AnnotationCommand) getCurrentNodeAllServices() ([]string, error) {
Context: Ctx,
}

result, err := client.Default.Services.ListServices(params)
result, err := client.Default.ServicesService.ListServices(params)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -156,7 +156,7 @@ func (cmd *AnnotationCommand) RunCmd() (Result, error) {
return nil, err
}

_, err = managementClient.Default.Annotation.AddAnnotation(&annotation.AddAnnotationParams{
_, err = managementClient.Default.AnnotationService.AddAnnotation(&annotation.AddAnnotationParams{
Body: annotation.AddAnnotationBody{
Text: cmd.Text,
Tags: cmd.Tags,
Expand Down
12 changes: 6 additions & 6 deletions admin/commands/base/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

"github.com/percona/pmm/admin/agentlocal"
"github.com/percona/pmm/admin/cli/flags"
inventorypb "github.com/percona/pmm/api/inventorypb/json/client"
managementpb "github.com/percona/pmm/api/managementpb/json/client"
serverpb "github.com/percona/pmm/api/serverpb/json/client"
inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client"
managementClient "github.com/percona/pmm/api/management/v1/json/client"
serverClient "github.com/percona/pmm/api/server/v1/json/client"
"github.com/percona/pmm/utils/tlsconfig"
)

Expand Down Expand Up @@ -121,7 +121,7 @@ func SetupClients(ctx context.Context, globalFlags *flags.GlobalFlags) {
httpTransport.TLSClientConfig.InsecureSkipVerify = globalFlags.SkipTLSCertificateCheck
}

inventorypb.Default.SetTransport(transport)
managementpb.Default.SetTransport(transport)
serverpb.Default.SetTransport(transport)
inventoryClient.Default.SetTransport(transport)
managementClient.Default.SetTransport(transport)
serverClient.Default.SetTransport(transport)
}
6 changes: 3 additions & 3 deletions admin/commands/inventory/add_agent_external_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"strings"

"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/agents"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

var addAgentExternalExporterResultT = commands.ParseTemplate(`
Expand Down Expand Up @@ -82,7 +82,7 @@ func (cmd *AddAgentExternalExporterCommand) RunCmd() (commands.Result, error) {
Context: commands.Ctx,
}

resp, err := client.Default.Agents.AddExternalExporter(params)
resp, err := client.Default.AgentsService.AddExternalExporter(params)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions admin/commands/inventory/add_agent_mongodb_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package inventory

import (
"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/agents"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

var addAgentMongodbExporterResultT = commands.ParseTemplate(`
Expand Down Expand Up @@ -105,7 +105,7 @@ func (cmd *AddAgentMongodbExporterCommand) RunCmd() (commands.Result, error) {
Context: commands.Ctx,
}

resp, err := client.Default.Agents.AddMongoDBExporter(params)
resp, err := client.Default.AgentsService.AddMongoDBExporter(params)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions admin/commands/inventory/add_agent_mysqld_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"strconv"

"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/agents"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

var addAgentMysqldExporterResultT = commands.ParseTemplate(`
Expand Down Expand Up @@ -146,7 +146,7 @@ func (cmd *AddAgentMysqldExporterCommand) RunCmd() (commands.Result, error) {
Context: commands.Ctx,
}

resp, err := client.Default.Agents.AddMySQLdExporter(params)
resp, err := client.Default.AgentsService.AddMySQLdExporter(params)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion admin/commands/inventory/add_agent_mysqld_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/AlekSi/pointer"
"github.com/stretchr/testify/assert"

"github.com/percona/pmm/api/inventorypb/json/client/agents"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

func TestAddAgentMysqldExporter(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions admin/commands/inventory/add_agent_node_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package inventory

import (
"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/agents"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

var addAgentNodeExporterResultT = commands.ParseTemplate(`
Expand Down Expand Up @@ -63,7 +63,7 @@ func (cmd *AddAgentNodeExporterCommand) RunCmd() (commands.Result, error) {
Context: commands.Ctx,
}

resp, err := client.Default.Agents.AddNodeExporter(params)
resp, err := client.Default.AgentsService.AddNodeExporter(params)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions admin/commands/inventory/add_agent_pmm_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package inventory

import (
"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/agents"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

var addPMMAgentResultT = commands.ParseTemplate(`
Expand Down Expand Up @@ -54,7 +54,7 @@ func (cmd *AddPMMAgentCommand) RunCmd() (commands.Result, error) {
Context: commands.Ctx,
}

resp, err := client.Default.Agents.AddPMMAgent(params)
resp, err := client.Default.AgentsService.AddPMMAgent(params)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions admin/commands/inventory/add_agent_postgres_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package inventory

import (
"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/agents"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

var addAgentPostgresExporterResultT = commands.ParseTemplate(`
Expand Down Expand Up @@ -110,7 +110,7 @@ func (cmd *AddAgentPostgresExporterCommand) RunCmd() (commands.Result, error) {
Context: commands.Ctx,
}

resp, err := client.Default.Agents.AddPostgresExporter(params)
resp, err := client.Default.AgentsService.AddPostgresExporter(params)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/AlekSi/pointer"
"github.com/stretchr/testify/assert"

"github.com/percona/pmm/api/inventorypb/json/client/agents"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

func TestAddAgentPostgresExporter(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions admin/commands/inventory/add_agent_proxysql_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package inventory

import (
"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/agents"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

var addAgentProxysqlExporterResultT = commands.ParseTemplate(`
Expand Down Expand Up @@ -81,7 +81,7 @@ func (cmd *AddAgentProxysqlExporterCommand) RunCmd() (commands.Result, error) {
Context: commands.Ctx,
}

resp, err := client.Default.Agents.AddProxySQLExporter(params)
resp, err := client.Default.AgentsService.AddProxySQLExporter(params)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package inventory

import (
"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/agents"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

var addAgentQANMongoDBProfilerAgentResultT = commands.ParseTemplate(`
Expand Down Expand Up @@ -97,7 +97,7 @@ func (cmd *AddAgentQANMongoDBProfilerAgentCommand) RunCmd() (commands.Result, er
Context: commands.Ctx,
}

resp, err := client.Default.Agents.AddQANMongoDBProfilerAgent(params)
resp, err := client.Default.AgentsService.AddQANMongoDBProfilerAgent(params)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package inventory

import (
"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventorypb/json/client"
"github.com/percona/pmm/api/inventorypb/json/client/agents"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
)

var addAgentQANMySQLPerfSchemaAgentResultT = commands.ParseTemplate(`
Expand Down Expand Up @@ -121,7 +121,7 @@ func (cmd *AddAgentQANMySQLPerfSchemaAgentCommand) RunCmd() (commands.Result, er
Context: commands.Ctx,
}

resp, err := client.Default.Agents.AddQANMySQLPerfSchemaAgent(params)
resp, err := client.Default.AgentsService.AddQANMySQLPerfSchemaAgent(params)
if err != nil {
return nil, err
}
Expand Down
Loading
Loading