Skip to content

Commit

Permalink
PMM-12811 make custom_labels map optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Feb 1, 2024
1 parent 1555a22 commit 050b741
Show file tree
Hide file tree
Showing 22 changed files with 4,184 additions and 2,570 deletions.
6 changes: 4 additions & 2 deletions api-tests/inventory/agents_azure_database_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ func TestAzureDatabaseExporter(t *testing.T) { //nolint:tparallel
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyAzureDatabaseExporterCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "azure_database_exporter",
CustomLabels: &agents.ChangeAgentParamsBodyAzureDatabaseExporterCommonCustomLabels{
Values: map[string]string{
"new_label": "azure_database_exporter",
},
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions api-tests/inventory/agents_external_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@ func TestExternalExporter(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyExternalExporterCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "external_exporter",
CustomLabels: &agents.ChangeAgentParamsBodyExternalExporterCommonCustomLabels{
Values: map[string]string{
"new_label": "external_exporter",
},
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions api-tests/inventory/agents_mongodb_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ func TestMongoDBExporter(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyMongodbExporterCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "mongodb_exporter",
CustomLabels: &agents.ChangeAgentParamsBodyMongodbExporterCommonCustomLabels{
Values: map[string]string{
"new_label": "mongodb_exporter",
},
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions api-tests/inventory/agents_mysqld_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ func TestMySQLdExporter(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyMysqldExporterCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "mysql_exporter",
CustomLabels: &agents.ChangeAgentParamsBodyMysqldExporterCommonCustomLabels{
Values: map[string]string{
"new_label": "mysql_exporter",
},
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions api-tests/inventory/agents_node_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ func TestNodeExporter(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyNodeExporterCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "node_exporter",
CustomLabels: &agents.ChangeAgentParamsBodyNodeExporterCommonCustomLabels{
Values: map[string]string{
"new_label": "node_exporter",
},
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions api-tests/inventory/agents_postgres_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ func TestPostgresExporter(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyPostgresExporterCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "postgres_exporter",
CustomLabels: &agents.ChangeAgentParamsBodyPostgresExporterCommonCustomLabels{
Values: map[string]string{
"new_label": "postgres_exporter",
},
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions api-tests/inventory/agents_proxysql_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ func TestProxySQLExporter(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyProxysqlExporterCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "proxysql_exporter",
CustomLabels: &agents.ChangeAgentParamsBodyProxysqlExporterCommonCustomLabels{
Values: map[string]string{
"new_label": "proxysql_exporter",
},
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions api-tests/inventory/agents_rds_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ func TestRDSExporter(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyRDSExporterCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "rds_exporter",
CustomLabels: &agents.ChangeAgentParamsBodyRDSExporterCommonCustomLabels{
Values: map[string]string{
"new_label": "rds_exporter",
},
},
},
},
Expand Down
18 changes: 12 additions & 6 deletions api-tests/inventory/agents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,10 @@ func TestQanAgentExporter(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyQANMysqlPerfschemaAgentCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "QANMysqlPerfschemaAgent",
CustomLabels: &agents.ChangeAgentParamsBodyQANMysqlPerfschemaAgentCommonCustomLabels{
Values: map[string]string{
"new_label": "QANMysqlPerfschemaAgent",
},
},
},
},
Expand Down Expand Up @@ -851,8 +853,10 @@ func TestPGStatStatementsQanAgent(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "QANPostgreSQLPgStatementsAgent",
CustomLabels: &agents.ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCommonCustomLabels{
Values: map[string]string{
"new_label": "QANPostgreSQLPgStatementsAgent",
},
},
},
},
Expand Down Expand Up @@ -1112,8 +1116,10 @@ func TestPGStatMonitorQanAgent(t *testing.T) {
AgentID: agentID,
Common: &agents.ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCommon{
Enable: pointer.ToBool(true),
CustomLabels: map[string]string{
"new_label": "QANPostgreSQLPgStatMonitorAgent",
CustomLabels: &agents.ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCommonCustomLabels{
Values: map[string]string{
"new_label": "QANPostgreSQLPgStatMonitorAgent",
},
},
},
},
Expand Down
103 changes: 87 additions & 16 deletions api/common/common.pb.go

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

101 changes: 101 additions & 0 deletions api/common/common.pb.validate.go

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

Loading

0 comments on commit 050b741

Please sign in to comment.