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-8641 PMM v3 API breaking changes #2635

Merged
merged 64 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
d221545
PMM-12624 Single inventory service add endpoint (#2591)
ademidoff Nov 22, 2023
95043ea
PMM-12681 remove deprecated node add endpoints (#2632)
ademidoff Nov 22, 2023
a2c12ca
Merge remote-tracking branch 'origin/v3' into v3-api-breaking-changes
artemgavrilov Nov 22, 2023
64fcdc3
PMM-12673 Protobuf linters (#2612)
artemgavrilov Nov 23, 2023
0e85f91
PMM-12646 Exclude inventory API from public spec (#2644)
artemgavrilov Nov 24, 2023
2ec42aa
PMM-6722 Preserve empty JSON fields in API responses (#2645)
artemgavrilov Nov 30, 2023
02edf9c
Merge remote-tracking branch 'origin/v3' into v3-api-breaking-changes
artemgavrilov Dec 5, 2023
7301908
Post-merge fixes
artemgavrilov Dec 5, 2023
3420848
Merge remote-tracking branch 'origin/v3' into v3-api-breaking-changes
artemgavrilov Dec 8, 2023
3e540bc
Cleanup
artemgavrilov Dec 8, 2023
9b87bab
Merge remote-tracking branch 'origin/v3' into v3-api-breaking-changes
artemgavrilov Dec 18, 2023
6b4b22d
Merge remote-tracking branch 'origin/v3' into v3-api-breaking-changes
artemgavrilov Dec 19, 2023
ee0f8bd
ci: trigger the build
ademidoff Dec 22, 2023
f331950
Merge remote-tracking branch 'origin/v3' into v3-api-breaking-changes
artemgavrilov Dec 25, 2023
4337c86
Fix after merge
artemgavrilov Dec 25, 2023
bac0d5f
Fix after merge
artemgavrilov Dec 25, 2023
5ee16cf
PMM-12624 single inventory agents add endpoint (#2722)
ademidoff Dec 26, 2023
32ffd53
PMM-8019 Support partial updates of settings and other entities (#2705)
artemgavrilov Dec 27, 2023
a946c50
PMM-12678 Reset protobuf field nums, remove all deprecated stuff from…
artemgavrilov Jan 15, 2024
5cb0064
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Jan 19, 2024
74e8b60
PMM-12677 remove STT naming (#2779)
idoqo Jan 25, 2024
d07c393
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Feb 6, 2024
0ba47f4
PMM-12677 fix migrations (#2812)
idoqo Feb 6, 2024
a40df07
PMM-12811 single agents change endpoint (#2777)
ademidoff Feb 6, 2024
08be0c5
PMM-12677 stt naming cleanup (#2805)
idoqo Feb 7, 2024
2689b7b
PMM-12836 restructure management API (#2814)
ademidoff Feb 14, 2024
51d5cb2
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Feb 29, 2024
dc6af76
chore: run make gen
ademidoff Feb 29, 2024
0e79848
chore: fix linter errors
ademidoff Feb 29, 2024
9a97b4e
chore: fix tests
ademidoff Feb 29, 2024
b77f829
chore: fix linter errors
ademidoff Feb 29, 2024
bee7333
chore: fix more linter errors
ademidoff Feb 29, 2024
216ceb6
chore: fix more linter errors
ademidoff Feb 29, 2024
07a64f8
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Feb 29, 2024
14e6633
PMM-12913 Use regular http verbs (#2828)
ademidoff Mar 1, 2024
0e7860c
chore: remove unused imports in proto files
ademidoff Mar 1, 2024
3756ce1
chore: run make gen
ademidoff Mar 1, 2024
da629c2
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Mar 1, 2024
3979487
test
catalinaadam Mar 5, 2024
158fd8f
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Mar 6, 2024
adb356e
Minor readibility improvements
catalinaadam Mar 6, 2024
c503044
Linguistic review
catalinaadam Mar 7, 2024
ba20927
Linguistic review
catalinaadam Mar 7, 2024
d74a2e8
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Mar 7, 2024
4b88bcf
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Mar 7, 2024
ea375d8
Merge branch 'v3-api-breaking-changes' of github.com:percona/pmm into…
ademidoff Mar 7, 2024
ef91fbb
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Mar 11, 2024
f952623
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Apr 4, 2024
ee239f8
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Apr 6, 2024
a042f6c
PMM-13090: Sync environment variables with v3-api-breaking-changes (#…
idoqo May 21, 2024
fbb6463
Merge branch 'v3' into v3-api-breaking-changes
ademidoff May 27, 2024
483ba4d
Merge branch 'v3' into v3-api-breaking-changes
ademidoff May 31, 2024
5543ab4
PMM-13020 Drop identifier prefixes (#2970)
ademidoff Jun 6, 2024
108972f
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Jun 6, 2024
0cd0ea2
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Jun 27, 2024
b6700b2
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Jun 27, 2024
f98e68d
fix: node.proto and node_test
ademidoff Jun 27, 2024
c3cef5d
fix: linter errors
ademidoff Jun 27, 2024
c4e7d3e
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Jul 3, 2024
4ae4a21
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Jul 8, 2024
fe7934d
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Jul 14, 2024
cbeb02c
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Jul 15, 2024
b0ba464
PMM-12913 Migrate api endpoints to REST (#2880)
ademidoff Jul 15, 2024
414e603
Merge branch 'v3' into v3-api-breaking-changes
ademidoff Jul 17, 2024
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 @@ -79,7 +79,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
46 changes: 23 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,35 @@ gen-api: ## Generate PMM API
--additional-initialism=ha ; \
done

# generate public API spec, omit agentlocalpb (always private),
# generate public API spec, omit agentlocal and inventory (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/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 +126,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 +138,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 @@ -148,7 +148,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
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 @@ -65,7 +65,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 @@ -116,7 +116,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 @@ -83,7 +83,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