Skip to content

Commit

Permalink
PMM-12678 Reset protobuf field nums, remove all deprecated stuff from…
Browse files Browse the repository at this point in the history
… API (#2733)

* PMM-12678 Reorder protobuf fields

* PMM-12678 Fix tests

* PMM-12678 Mark some fileds as reserved

* PMM-12678 Cleanup

* PMM-12678 Fix tests

* PMM-12678 Fix tests

* PMM-12678 Cleanup

* PMM-12678 Cleanup

* PMM-12678 Cleanup

* PMM-12678 Cleanup

* PMM-12678 Fix mocks

* PMM-12678 Fix proto fields numbering
  • Loading branch information
artemgavrilov authored Jan 15, 2024
1 parent 32ffd53 commit a946c50
Show file tree
Hide file tree
Showing 126 changed files with 8,332 additions and 12,166 deletions.
2 changes: 1 addition & 1 deletion agent/agents/mongodb/internal/profiler/profiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func testProfiler(t *testing.T, url string) {
assert.Equal(t, "INSERT people", bucket.Common.Fingerprint)
assert.Equal(t, []string{"people"}, bucket.Common.Tables)
assert.Equal(t, "test-id", bucket.Common.AgentId)
assert.Equal(t, inventoryv1.AgentType(9), bucket.Common.AgentType)
assert.Equal(t, inventoryv1.AgentType(10), bucket.Common.AgentType)
expected := &agentv1.MetricsBucket_MongoDB{
MDocsReturnedCnt: docsCount,
MResponseLengthCnt: docsCount,
Expand Down
12 changes: 6 additions & 6 deletions agent/agents/mysql/slowlog/slowlog_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"fingerprint": "select name, subsystem, type, comment, count from information_schema.innodb_metrics where status = ?",
"username": "root",
"agent_id": "/agent_id/73ee2f92-d5aa-45f0-8b09-6d3df605fd44",
"agent_type": 8,
"agent_type": 9,
"period_start_unix_secs": 1557137220,
"period_length_secs": 60,
"example": "SELECT\n\t\t name, subsystem, type, comment,\n\t\t count\n\t\t FROM information_schema.innodb_metrics\n\t\t WHERE status = 'enabled'",
Expand Down Expand Up @@ -52,7 +52,7 @@
"schema": "sbtest",
"username": "root",
"agent_id": "/agent_id/73ee2f92-d5aa-45f0-8b09-6d3df605fd44",
"agent_type": 8,
"agent_type": 9,
"period_start_unix_secs": 1557137220,
"period_length_secs": 60,
"example": "SELECT pad FROM sbtest1 WHERE id=775815",
Expand Down Expand Up @@ -95,7 +95,7 @@
"fingerprint": "ping",
"username": "root",
"agent_id": "/agent_id/73ee2f92-d5aa-45f0-8b09-6d3df605fd44",
"agent_type": 8,
"agent_type": 9,
"period_start_unix_secs": 1557137220,
"period_length_secs": 60,
"example": "Ping",
Expand Down Expand Up @@ -126,7 +126,7 @@
"fingerprint": "show global status",
"username": "root",
"agent_id": "/agent_id/73ee2f92-d5aa-45f0-8b09-6d3df605fd44",
"agent_type": 8,
"agent_type": 9,
"period_start_unix_secs": 1557137220,
"period_length_secs": 60,
"example": "SHOW GLOBAL STATUS",
Expand Down Expand Up @@ -170,7 +170,7 @@
"fingerprint": "set lock_wait_timeout=?",
"username": "root",
"agent_id": "/agent_id/73ee2f92-d5aa-45f0-8b09-6d3df605fd44",
"agent_type": 8,
"agent_type": 9,
"period_start_unix_secs": 1557137220,
"period_length_secs": 60,
"example": "SET lock_wait_timeout=2",
Expand Down Expand Up @@ -201,7 +201,7 @@
"fingerprint": "select @@version",
"username": "root",
"agent_id": "/agent_id/73ee2f92-d5aa-45f0-8b09-6d3df605fd44",
"agent_type": 8,
"agent_type": 9,
"period_start_unix_secs": 1557137220,
"period_length_secs": 60,
"example": "SELECT @@version",
Expand Down
2 changes: 0 additions & 2 deletions agent/connectionchecker/connection_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ func TestConnectionChecker(t *testing.T) {
Type: inventoryv1.ServiceType_SERVICE_TYPE_MYSQL_SERVICE,
}, 0)
require.NotNil(t, resp)
// CheckConnectionResponse_Stats are deprecated, but we can't remove them yet without breaking older clients.
assert.Equal(t, (*agentv1.CheckConnectionResponse_Stats)(nil), resp.Stats) //nolint:staticcheck
})

t.Run("MongoDBWithSSL", func(t *testing.T) {
Expand Down
2,358 changes: 1,103 additions & 1,255 deletions api/agent/v1/agent.pb.go

Large diffs are not rendered by default.

91 changes: 21 additions & 70 deletions api/agent/v1/agent.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 a946c50

Please sign in to comment.