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-11341 Auto discovery limit. #2568

Merged
merged 62 commits into from
Nov 16, 2023
Merged

Conversation

JiriCtvrtka
Copy link
Contributor

@JiriCtvrtka JiriCtvrtka commented Oct 23, 2023

PMM-11341

Link to the Feature Build:
Percona-Lab/pmm-submodules#3424

PostgreSQL exporter PR: percona/postgres_exporter#162

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 36 lines in your changes are missing coverage. Please review.

Comparison is base (21d018b) 42.75% compared to head (221ab29) 42.77%.

Files Patch % Lines
managed/services/agents/service_info_broker.go 0.00% 20 Missing ⚠️
managed/services/management/postgresql.go 0.00% 5 Missing ⚠️
agent/serviceinfobroker/service_info_broker.go 78.94% 3 Missing and 1 partial ⚠️
managed/models/agent_helpers.go 62.50% 3 Missing ⚠️
managed/services/management/rds.go 75.00% 2 Missing ⚠️
.../commands/inventory/add_agent_postgres_exporter.go 0.00% 1 Missing ⚠️
admin/commands/management/add_postgresql.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2568      +/-   ##
==========================================
+ Coverage   42.75%   42.77%   +0.01%     
==========================================
  Files         391      391              
  Lines       49168    49241      +73     
==========================================
+ Hits        21020    21061      +41     
- Misses      26170    26199      +29     
- Partials     1978     1981       +3     
Flag Coverage Δ
admin 10.49% <50.00%> (+0.04%) ⬆️
agent 53.60% <78.94%> (-0.01%) ⬇️
vmproxy 68.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@it-percona-cla
Copy link

it-percona-cla commented Oct 25, 2023

CLA assistant check
All committers have signed the CLA.

@JiriCtvrtka JiriCtvrtka force-pushed the PMM-11341-autodiscovery-control branch from c010c78 to 55d5655 Compare October 26, 2023 09:44
@JiriCtvrtka JiriCtvrtka marked this pull request as ready for review October 26, 2023 11:29
@JiriCtvrtka JiriCtvrtka requested review from BupycHuk and a team as code owners October 26, 2023 11:29
@JiriCtvrtka JiriCtvrtka requested review from idoqo and removed request for a team October 26, 2023 11:29
Copy link
Member

@BupycHuk BupycHuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me.
Just few comments to improve it

managed/services/agents/connection_checker.go Outdated Show resolved Hide resolved
api/agentpb/agent.proto Outdated Show resolved Hide resolved
Comment on lines +59 to +62
// PostgreSQLExtendedOptionsParams contains extended parameters for PostgreSQL exporter.
type PostgreSQLExtendedOptionsParams interface {
GetAutoDiscoveryLimit() int32
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's include it to PostgreSQLOptionsParams

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included. Originally I separated it since we dont need such field for QAN agents.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, let's revert it then, keep it separated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw why do we pass service parameters to agent in inventory API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BupycHuk Reverted. It is passed to have limit exposed in inventory UI. It is aligned with MySQL implementation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, let's create task for V3 to standardize it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

managed/models/agent_model.go Outdated Show resolved Hide resolved
@percona percona deleted a comment from percona-robot Nov 9, 2023
@@ -94,7 +94,7 @@ type AddAgentMysqldExporterCommand struct {
TLSCAFile string `name:"tls-ca" help:"Path to certificate authority certificate file"`
TLSCertFile string `name:"tls-cert" help:"Path to client certificate file"`
TLSKeyFile string `name:"tls-key" help:"Path to client key file"`
TablestatsGroupTableLimit int32 `placeholder:"number" help:"Tablestats group collectors will be disabled if there are more than that number of tables (default: 0 - always enabled; negative value - always disabled)"`
TablestatsGroupTableLimit int32 `placeholder:"number" help:"Tablestats group collectors will be disabled if there are more than that number of tables (default: server-defined)"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, what about negative value? was it disabling or not?

@@ -27,6 +27,10 @@ import (
"github.com/percona/pmm/managed/services"
)

const (
defaultAutoDiscoveryDatabaseLimit = 1000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's have it low like 10 or 15

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BupycHuk Should Matěj change this also on FE? Default 1000 is also there (like in case of MySQL).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@JiriCtvrtka JiriCtvrtka force-pushed the PMM-11341-autodiscovery-control branch from 10affb2 to c045ca7 Compare November 16, 2023 09:41
@JiriCtvrtka JiriCtvrtka merged commit 6c37873 into main Nov 16, 2023
33 checks passed
@JiriCtvrtka JiriCtvrtka deleted the PMM-11341-autodiscovery-control branch November 16, 2023 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants