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-13077 list versions #3033

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0e70f5d
Bump golang.org/x/tools from 0.19.0 to 0.20.0 (#2950)
dependabot[bot] Apr 8, 2024
1d73b27
Bump github.com/apache/skywalking-eyes from 0.5.0 to 0.6.0 in /tools …
dependabot[bot] Apr 8, 2024
4ffea7f
Bump @typescript-eslint/parser from 7.2.0 to 7.6.0 in /cli-tests (#2952)
dependabot[bot] Apr 9, 2024
c0ae408
Bump @typescript-eslint/eslint-plugin from 7.3.1 to 7.6.0 in /cli-tes…
dependabot[bot] Apr 9, 2024
7afd5ec
Bump eslint-plugin-playwright from 1.5.1 to 1.6.0 in /cli-tests (#2954)
dependabot[bot] Apr 12, 2024
2f7cace
Bump go.mongodb.org/mongo-driver from 1.14.0 to 1.15.0 (#2956)
dependabot[bot] Apr 15, 2024
9156736
Bump @typescript-eslint/parser from 7.6.0 to 7.7.0 in /cli-tests (#2958)
dependabot[bot] Apr 16, 2024
4daf521
Bump @typescript-eslint/eslint-plugin from 7.6.0 to 7.7.0 in /cli-tes…
dependabot[bot] Apr 16, 2024
41db807
PMM-7 Fix imports protobuf (#2964)
BupycHuk Apr 20, 2024
24ec9c2
Bump github.com/prometheus/common from 0.47.0 to 0.52.3 (#2955)
dependabot[bot] Apr 21, 2024
3545699
Bump github.com/prometheus/common from 0.52.3 to 0.53.0 (#2966)
dependabot[bot] Apr 22, 2024
c6044df
Update descriptors
Apr 23, 2024
3aed8f3
PMM-12619: Make PMM environment variables more consistent (#2857)
idoqo Apr 24, 2024
561b807
PMM-7 Service accounts length fix. (#2973)
JiriCtvrtka Apr 24, 2024
3747ab1
PMM-7 Upgrade codecov-action (#2974)
ademidoff Apr 26, 2024
1d87743
PMM-13075 Build pmm client for Ubuntu Noble (24..04) (#2977)
talhabinrizwan Apr 29, 2024
958a5a9
Merge branch 'main' into v3
ademidoff Apr 29, 2024
dc10c50
PMM-12776 Update go version for API tests (#2978)
BupycHuk Apr 30, 2024
3258363
PMM-7 Fix for service accounts tests stability. (#2976)
JiriCtvrtka Apr 30, 2024
f8ee940
Bump @typescript-eslint/eslint-plugin from 7.7.0 to 7.8.0 in /cli-tes…
dependabot[bot] May 2, 2024
0ed5396
Bump @typescript-eslint/parser from 7.7.0 to 7.8.0 in /cli-tests (#2979)
dependabot[bot] May 3, 2024
a262bf3
PMM-12741 Percona templated alerts - interval & folder uid (#2919)
matejkubinec May 3, 2024
87ab44e
PMM-3303 Monitor internal clickhouse (#2943)
BupycHuk May 7, 2024
9209769
Update descriptors
May 9, 2024
0cb2049
Bump golang.org/x/tools from 0.20.0 to 0.21.0 in /tools (#2986)
dependabot[bot] May 11, 2024
12f2022
PMM-7 upgrade go to v1.22 (#2990)
ademidoff May 14, 2024
09f8817
PMM-13095 Remove trimming of slowlog query IDs. (#2984)
JiriCtvrtka May 14, 2024
705c21f
Bump @typescript-eslint/eslint-plugin from 7.8.0 to 7.9.0 in /cli-tes…
dependabot[bot] May 14, 2024
b4a4c6d
PMM-7 fix supervisor install for EL7 (#2997)
ademidoff May 20, 2024
44362e6
--- (#2999)
dependabot[bot] May 21, 2024
6200529
--- (#2998)
dependabot[bot] May 21, 2024
09f3823
PMM-12896 Add limit for actions/jobs executed on the same DB at the s…
artemgavrilov May 22, 2024
39dce06
Merge branch 'refs/heads/main' into v3
BupycHuk May 23, 2024
4bf51d1
PMM-12895 Add metrics resolutions configuration to agents (#2882)
artemgavrilov May 27, 2024
574aa41
Update descriptors
May 27, 2024
88b60ce
Bump @typescript-eslint/parser from 7.10.0 to 7.11.0 in /cli-tests (#…
dependabot[bot] May 29, 2024
e4bf62a
Bump @typescript-eslint/eslint-plugin in /cli-tests (#3004)
dependabot[bot] May 29, 2024
1ea2627
PMM-12880 Proper skip for MySQL TLS certs. (#2909)
JiriCtvrtka May 29, 2024
6ca7cc2
PMM-12522 collect chunks metrics in low resolution (#2987)
BupycHuk May 29, 2024
8d3e0bf
PMM-12880 Proper skip for MySQL TLS certs. (#2909) (#3007)
JiriCtvrtka May 30, 2024
7221d3e
PMM-13137 Fix SHA1 deprecation in EL9 (#3009)
ademidoff May 31, 2024
77b31a6
Merge branch 'main' into v3
ademidoff May 31, 2024
744be63
Merge branch 'v3' into PMM-13077-list-versions
idoqo Jun 4, 2024
3650024
update api tests
idoqo Jun 4, 2024
24aa789
Bump @typescript-eslint/eslint-plugin in /cli-tests (#3012)
dependabot[bot] Jun 4, 2024
51f2396
Bump @typescript-eslint/parser from 7.11.0 to 7.12.0 in /cli-tests (#…
dependabot[bot] Jun 4, 2024
a7721fd
PMM-13145 Certs Fix - Backward compatibility for older clients. (#3014)
JiriCtvrtka Jun 5, 2024
8a59705
Merge branch 'main' into v3
BupycHuk Jun 5, 2024
ae7280d
Merge branch 'v3' into PMM-13077-list-versions
idoqo Jun 6, 2024
eae75bc
List version differences between installed and latest PMM versions
idoqo Jun 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,18 @@ jobs:
run: make test-cover

- name: Upload coverage results
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: cover.out
flags: admin
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run debug commands on failure
if: ${{ failure() }}
run: |
env
go version
go env
pwd
env | sort
go env | sort
git status

cli-test:
Expand Down Expand Up @@ -160,9 +159,9 @@ jobs:
- name: Run debug commands on failure
if: ${{ failure() }}
run: |
env
go version
go env
node --version
pwd
env | sort
go env | sort
git status
node --version
npx --version
npx playwright --version
3 changes: 2 additions & 1 deletion .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,13 @@ jobs:
run: make test-cover

- name: Upload coverage results
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: cover.out
flags: agent
env_vars: MYSQL_IMAGE,MONGO_IMAGE,POSTGRES_IMAGE,PMM_SERVER_IMAGE
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run debug commands on failure
if: ${{ failure() }}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ jobs:
container_name: pmm-agent_pmm-server
environment:
- PMM_DEBUG=1
- PERCONA_TEST_CHECKS_INTERVAL=10s
- PERCONA_TEST_PLATFORM_ADDRESS=https://check-dev.percona.com
- PERCONA_TEST_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
- PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check-dev.percona.com
- PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
ports:
- 80:8080
- 443:8443
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
go:
- version: 1.21.x
- version: 1.22.x
may-fail: false

continue-on-error: ${{ matrix.go.may-fail }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/managed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
PMM_SERVER_IMAGE: perconalab/pmm-server:3-dev-latest
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
OAUTH_PMM_CLIENT_ID: ${{ secrets.OAUTH_PMM_CLIENT_ID }}
OAUTH_PMM_CLIENT_SECRET: ${{ secrets.OAUTH_PMM_CLIENT_SECRET }}
PMM_DEV_OAUTH_CLIENT_ID: ${{ secrets.OAUTH_PMM_CLIENT_ID }}
PMM_DEV_OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_PMM_CLIENT_SECRET }}
DEVCONTAINER_CACHE_ENABLED: false

steps:
Expand Down Expand Up @@ -98,12 +98,13 @@ jobs:
# docker exec -i pmm-server make -C managed test-update

- name: Upload coverage results
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: managed/cover.out
flags: managed
env_vars: PMM_SERVER_IMAGE
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

- name: Cache
if: ${{ fromJSON(env.DEVCONTAINER_CACHE_ENABLED) }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ jobs:
run: docker exec pmm-update-server make -C /root/go/src/github.com/percona/pmm/update run-race-cover RUN_FLAGS='-debug -check'

- name: Upload coverage results
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: cover.out
flags: update
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

9 changes: 4 additions & 5 deletions .github/workflows/vmproxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,16 @@ jobs:
run: make test-cover

- name: Upload coverage results
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: cover.out
flags: vmproxy
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run debug commands on failure
if: ${{ failure() }}
run: |
env
go version
go env
pwd
env | sort
go env | sort
git status
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Dockerfile is used only for API tests.

FROM golang:1.21
FROM golang:1.22

RUN export GOPATH=$(go env GOPATH) && \
mkdir -p $GOPATH/src/github.com/percona/pmm
Expand Down
4 changes: 3 additions & 1 deletion agent/agents/mongodb/internal/profiler/profiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ func testProfiler(t *testing.T, url string) {
Query: findBucket.Common.Example,
}

ex := actions.NewMongoDBExplainAction(id, 5*time.Second, params, os.TempDir())
ex, err := actions.NewMongoDBExplainAction(id, 5*time.Second, params, os.TempDir())
require.NoError(t, err)

ctx, cancel := context.WithTimeout(context.Background(), ex.Timeout())
defer cancel()
res, err := ex.Run(ctx)
Expand Down
2 changes: 1 addition & 1 deletion agent/agents/mysql/perfschema/perfschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func getPerfschemaHistorySize(q reform.Querier, l *logrus.Entry) uint {
// New creates new PerfSchema QAN service.
func New(params *Params, l *logrus.Entry) (*PerfSchema, error) {
if params.TextFiles != nil {
err := tlshelpers.RegisterMySQLCerts(params.TextFiles.Files)
err := tlshelpers.RegisterMySQLCerts(params.TextFiles.Files, params.TLSSkipVerify)
if err != nil {
return nil, err
}
Expand Down
18 changes: 16 additions & 2 deletions agent/agents/mysql/slowlog/slowlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ package slowlog

import (
"context"
"crypto/md5" //nolint:gosec
"database/sql"
"encoding/hex"
"fmt"
"io"
"math"
Expand Down Expand Up @@ -82,7 +84,7 @@ type slowLogInfo struct {
// New creates new SlowLog QAN service.
func New(params *Params, l *logrus.Entry) (*SlowLog, error) {
if params.TextFiles != nil {
err := tlshelpers.RegisterMySQLCerts(params.TextFiles.Files)
err := tlshelpers.RegisterMySQLCerts(params.TextFiles.Files, params.TLSSkipVerify)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -370,7 +372,7 @@ func (s *SlowLog) processFile(ctx context.Context, file string, outlierTime floa

s.l.Tracef("Parsed slowlog event: %+v.", e)
fingerprint := query.Fingerprint(e.Query)
digest := query.Id(fingerprint)
digest := hashIntoQueryID(fingerprint)
aggregator.AddEvent(e, digest, e.User, e.Host, e.Db, e.Server, e.Query)

case <-t.C:
Expand All @@ -391,6 +393,18 @@ func (s *SlowLog) processFile(ctx context.Context, file string, outlierTime floa
}
}

// hashIntoQueryID returns slowlog query ID hashed by MD5 from given fingerprint.
func hashIntoQueryID(fingerprint string) string {
// MD5 is used only to hash fingerprint into query ID, so there is no risk.
// It is ideal due to its length (32 chars) and it corresponds to Perfschema query ID length.
id := md5.New() //nolint:gosec
_, err := io.WriteString(id, fingerprint)
if err != nil {
logrus.Debugf("cannot hash fingerprint into query ID: %s", err.Error())
}
return strings.ToUpper(hex.EncodeToString(id.Sum(nil)))
}

// makeBuckets is a pure function for easier testing.
//
//nolint:cyclop,maintidx
Expand Down
31 changes: 18 additions & 13 deletions agent/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,10 @@ func (c *Client) handleStartActionRequest(p *agentpb.StartActionRequest) error {

cfg := c.cfg.Get()
var action actions.Action
var err error
switch params := p.Params.(type) {
case *agentpb.StartActionRequest_MysqlExplainParams:
action = actions.NewMySQLExplainAction(p.ActionId, timeout, params.MysqlExplainParams)
action, err = actions.NewMySQLExplainAction(p.ActionId, timeout, params.MysqlExplainParams)

case *agentpb.StartActionRequest_MysqlShowCreateTableParams:
action = actions.NewMySQLShowCreateTableAction(p.ActionId, timeout, params.MysqlShowCreateTableParams)
Expand All @@ -468,13 +469,13 @@ func (c *Client) handleStartActionRequest(p *agentpb.StartActionRequest) error {
action = actions.NewMySQLShowIndexAction(p.ActionId, timeout, params.MysqlShowIndexParams)

case *agentpb.StartActionRequest_PostgresqlShowCreateTableParams:
action = actions.NewPostgreSQLShowCreateTableAction(p.ActionId, timeout, params.PostgresqlShowCreateTableParams, cfg.Paths.TempDir)
action, err = actions.NewPostgreSQLShowCreateTableAction(p.ActionId, timeout, params.PostgresqlShowCreateTableParams, cfg.Paths.TempDir)

case *agentpb.StartActionRequest_PostgresqlShowIndexParams:
action = actions.NewPostgreSQLShowIndexAction(p.ActionId, timeout, params.PostgresqlShowIndexParams, cfg.Paths.TempDir)
action, err = actions.NewPostgreSQLShowIndexAction(p.ActionId, timeout, params.PostgresqlShowIndexParams, cfg.Paths.TempDir)

case *agentpb.StartActionRequest_MongodbExplainParams:
action = actions.NewMongoDBExplainAction(p.ActionId, timeout, params.MongodbExplainParams, cfg.Paths.TempDir)
action, err = actions.NewMongoDBExplainAction(p.ActionId, timeout, params.MongodbExplainParams, cfg.Paths.TempDir)

case *agentpb.StartActionRequest_MysqlQueryShowParams:
action = actions.NewMySQLQueryShowAction(p.ActionId, timeout, params.MysqlQueryShowParams)
Expand All @@ -483,13 +484,13 @@ func (c *Client) handleStartActionRequest(p *agentpb.StartActionRequest) error {
action = actions.NewMySQLQuerySelectAction(p.ActionId, timeout, params.MysqlQuerySelectParams)

case *agentpb.StartActionRequest_PostgresqlQueryShowParams:
action = actions.NewPostgreSQLQueryShowAction(p.ActionId, timeout, params.PostgresqlQueryShowParams, cfg.Paths.TempDir)
action, err = actions.NewPostgreSQLQueryShowAction(p.ActionId, timeout, params.PostgresqlQueryShowParams, cfg.Paths.TempDir)

case *agentpb.StartActionRequest_PostgresqlQuerySelectParams:
action = actions.NewPostgreSQLQuerySelectAction(p.ActionId, timeout, params.PostgresqlQuerySelectParams, cfg.Paths.TempDir)
action, err = actions.NewPostgreSQLQuerySelectAction(p.ActionId, timeout, params.PostgresqlQuerySelectParams, cfg.Paths.TempDir)

case *agentpb.StartActionRequest_MongodbQueryGetparameterParams:
action = actions.NewMongoDBQueryAdmincommandAction(
action, err = actions.NewMongoDBQueryAdmincommandAction(
p.ActionId,
timeout,
params.MongodbQueryGetparameterParams.Dsn,
Expand All @@ -499,7 +500,7 @@ func (c *Client) handleStartActionRequest(p *agentpb.StartActionRequest) error {
cfg.Paths.TempDir)

case *agentpb.StartActionRequest_MongodbQueryBuildinfoParams:
action = actions.NewMongoDBQueryAdmincommandAction(
action, err = actions.NewMongoDBQueryAdmincommandAction(
p.ActionId,
timeout,
params.MongodbQueryBuildinfoParams.Dsn,
Expand All @@ -509,7 +510,7 @@ func (c *Client) handleStartActionRequest(p *agentpb.StartActionRequest) error {
cfg.Paths.TempDir)

case *agentpb.StartActionRequest_MongodbQueryGetcmdlineoptsParams:
action = actions.NewMongoDBQueryAdmincommandAction(
action, err = actions.NewMongoDBQueryAdmincommandAction(
p.ActionId,
timeout,
params.MongodbQueryGetcmdlineoptsParams.Dsn,
Expand All @@ -519,7 +520,7 @@ func (c *Client) handleStartActionRequest(p *agentpb.StartActionRequest) error {
cfg.Paths.TempDir)

case *agentpb.StartActionRequest_MongodbQueryReplsetgetstatusParams:
action = actions.NewMongoDBQueryAdmincommandAction(
action, err = actions.NewMongoDBQueryAdmincommandAction(
p.ActionId,
timeout,
params.MongodbQueryReplsetgetstatusParams.Dsn,
Expand All @@ -529,7 +530,7 @@ func (c *Client) handleStartActionRequest(p *agentpb.StartActionRequest) error {
cfg.Paths.TempDir)

case *agentpb.StartActionRequest_MongodbQueryGetdiagnosticdataParams:
action = actions.NewMongoDBQueryAdmincommandAction(
action, err = actions.NewMongoDBQueryAdmincommandAction(
p.ActionId,
timeout,
params.MongodbQueryGetdiagnosticdataParams.Dsn,
Expand Down Expand Up @@ -565,6 +566,10 @@ func (c *Client) handleStartActionRequest(p *agentpb.StartActionRequest) error {
return errors.Wrapf(agenterrors.ErrInvalidArgument, "invalid action type request: %T", params)
}

if err != nil {
return errors.Wrap(err, "failed to create action")
}

return c.runner.StartAction(action)
}

Expand Down Expand Up @@ -645,7 +650,7 @@ func (c *Client) handleStartJobRequest(p *agentpb.StartJobRequest) error {
return errors.WithStack(err)
}

job, err = jobs.NewMongoDBBackupJob(p.JobId, timeout, j.MongodbBackup.Name, &dsn, locationConfig,
job, err = jobs.NewMongoDBBackupJob(p.JobId, timeout, j.MongodbBackup.Name, dsn, locationConfig,
j.MongodbBackup.EnablePitr, j.MongodbBackup.DataModel, j.MongodbBackup.Folder)
if err != nil {
return err
Expand Down Expand Up @@ -678,7 +683,7 @@ func (c *Client) handleStartJobRequest(p *agentpb.StartJobRequest) error {
}

job = jobs.NewMongoDBRestoreJob(p.JobId, timeout, j.MongodbRestoreBackup.Name,
j.MongodbRestoreBackup.PitrTimestamp.AsTime(), &dsn, locationConfig,
j.MongodbRestoreBackup.PitrTimestamp.AsTime(), dsn, locationConfig,
c.supervisor, j.MongodbRestoreBackup.Folder, j.MongodbRestoreBackup.PbmMetadata.Name)
default:
return errors.Errorf("unknown job type: %T", j)
Expand Down
4 changes: 2 additions & 2 deletions agent/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func TestClient(t *testing.T) {
s.On("AgentsList").Return([]*agentlocalpb.AgentInfo{})
s.On("ClearChangesChannel").Return()

r := runner.New(cfgStorage.Get().RunnerCapacity)
r := runner.New(cfgStorage.Get().RunnerCapacity, cfgStorage.Get().RunnerMaxConnectionsPerService)
client := New(cfgStorage, &s, r, nil, nil, nil, connectionuptime.NewService(time.Hour), nil)
err := client.Run(context.Background())
assert.NoError(t, err)
Expand Down Expand Up @@ -281,7 +281,7 @@ func TestUnexpectedActionType(t *testing.T) {
s.On("AgentsList").Return([]*agentlocalpb.AgentInfo{})
s.On("ClearChangesChannel").Return()

r := runner.New(cfgStorage.Get().RunnerCapacity)
r := runner.New(cfgStorage.Get().RunnerCapacity, cfgStorage.Get().RunnerMaxConnectionsPerService)
client := New(cfgStorage, s, r, nil, nil, nil, connectionuptime.NewService(time.Hour), nil)
err := client.Run(context.Background())
assert.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion agent/commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func Run() {
supervisor := supervisor.NewSupervisor(ctx, v, configStorage)
connectionChecker := connectionchecker.New(configStorage)
serviceInfoBroker := serviceinfobroker.New(configStorage)
r := runner.New(cfg.RunnerCapacity)
r := runner.New(cfg.RunnerCapacity, cfg.RunnerMaxConnectionsPerService)
client := client.New(configStorage, supervisor, r, connectionChecker, v, serviceInfoBroker, prepareConnectionService(ctx, cfg), logStore)
localServer := agentlocal.NewServer(configStorage, supervisor, client, configFilepath, logStore)

Expand Down
11 changes: 7 additions & 4 deletions agent/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,11 @@ type Setup struct {
type Config struct { //nolint:musttag
// no config file there

ID string `yaml:"id"`
ListenAddress string `yaml:"listen-address"`
ListenPort uint16 `yaml:"listen-port"`
RunnerCapacity uint16 `yaml:"runner-capacity,omitempty"`
ID string `yaml:"id"`
ListenAddress string `yaml:"listen-address"`
ListenPort uint16 `yaml:"listen-port"`
RunnerCapacity uint16 `yaml:"runner-capacity,omitempty"`
RunnerMaxConnectionsPerService uint16 `yaml:"runner-max-connections-per-service,omitempty"`

Server Server `yaml:"server"`
Paths Paths `yaml:"paths"`
Expand Down Expand Up @@ -352,6 +353,8 @@ func Application(cfg *Config) (*kingpin.Application, *string) {
Envar("PMM_AGENT_LISTEN_PORT").Uint16Var(&cfg.ListenPort)
app.Flag("runner-capacity", "Agent internal actions/jobs runner capacity [PMM_AGENT_RUNNER_CAPACITY]").
Envar("PMM_AGENT_RUNNER_CAPACITY").Uint16Var(&cfg.RunnerCapacity)
app.Flag("runner-max-connections-per-service", "Agent internal action/job runner connection limit per DB instance").
Envar("PMM_AGENT_RUNNER_MAX_CONNECTIONS_PER_SERVICE").Uint16Var(&cfg.RunnerMaxConnectionsPerService)

app.Flag("server-address", "PMM Server address [PMM_AGENT_SERVER_ADDRESS]").
Envar("PMM_AGENT_SERVER_ADDRESS").PlaceHolder("<host:port>").StringVar(&cfg.Server.Address)
Expand Down
4 changes: 2 additions & 2 deletions agent/connectionchecker/connection_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ func (cc *ConnectionChecker) sqlPing(ctx context.Context, db *sql.DB) error {
return err
}

func (cc *ConnectionChecker) checkMySQLConnection(ctx context.Context, dsn string, files *agentpb.TextFiles, tlsSkipVerify bool, id uint32) *agentpb.CheckConnectionResponse { //nolint:lll,unparam,revive
func (cc *ConnectionChecker) checkMySQLConnection(ctx context.Context, dsn string, files *agentpb.TextFiles, tlsSkipVerify bool, id uint32) *agentpb.CheckConnectionResponse { //nolint:lll
var res agentpb.CheckConnectionResponse
var err error

if files != nil {
err = tlshelpers.RegisterMySQLCerts(files.Files)
err = tlshelpers.RegisterMySQLCerts(files.Files, tlsSkipVerify)
if err != nil {
cc.l.Debugf("checkMySQLConnection: failed to register cert: %s", err)
res.Error = err.Error()
Expand Down
Loading
Loading