PMM-9630 Use status, status_code only for some versions.#912
PMM-9630 Use status, status_code only for some versions.#912JiriCtvrtka merged 16 commits intomainfrom
Conversation
| // String returns a string representation of this struct or record. | ||
| func (s pgStatMonitor) String() string { | ||
| res := make([]string, 51) | ||
| res := make([]string, 49) |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶
mnd: Magic number: 49, in detected (gomnd)
Codecov Report
@@ Coverage Diff @@
## main #912 +/- ##
==========================================
- Coverage 45.05% 45.04% -0.02%
==========================================
Files 326 326
Lines 39147 39160 +13
==========================================
Hits 17639 17639
- Misses 19958 19972 +14
+ Partials 1550 1549 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| pgStatMonitorVersion10PG12 | ||
| pgStatMonitorVersion10PG13 | ||
| pgStatMonitorVersion10PG14 | ||
| pgStatMonitorVersion11PG12 |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶pgStatMonitorVersion11PG12 is unused (deadcode)
| pgStatMonitorVersion10PG13 | ||
| pgStatMonitorVersion10PG14 | ||
| pgStatMonitorVersion11PG12 | ||
| pgStatMonitorVersion11PG13 |
There was a problem hiding this comment.
🚫 [golangci-lint] reported by reviewdog 🐶pgStatMonitorVersion11PG13 is unused (deadcode)
| pgStatMonitorVersion10PG12 | ||
| pgStatMonitorVersion10PG13 | ||
| pgStatMonitorVersion10PG14 | ||
| pgStatMonitorVersion11PG12 |
There was a problem hiding this comment.
new variables are not added to this function https://github.com/percona/pmm/pull/912/files#diff-ae12be77883993fc7d2b5ebc501e2fb0b0078ea1d4645c2f9327095ae0661d30R153
| conditions := "WHERE queryid IS NOT NULL AND query IS NOT NULL" | ||
| if pgMonitorVersion >= pgStatMonitorVersion09 { | ||
| // only pg_stat_monitor 0.9.0 and above supports state_code. It tells what is the query's current state. | ||
| if pgMonitorVersion >= pgStatMonitorVersion09 && pgMonitorVersion <= pgStatMonitorVersion11PG14 && prerelease != "" { |
There was a problem hiding this comment.
I thought that we decided to have a check like version >= 0.9 and version <= 2.0
PMM-9630
Original PR: percona/pmm-agent#327
Build: SUBMODULES-0