Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

PMM-10068: fix PMMServerSTTEnabled query #1131

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ritbl
Copy link
Contributor

@ritbl ritbl commented May 24, 2022

@@ -32,14 +32,6 @@ telemetry:
- metric_name: "dbaas_enabled"
column: "dbaas_enabled"

- id: PMMServerDBaaSEnabled
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see that we have a duplicate

@@ -10,7 +10,7 @@ telemetry:

- id: PMMServerSTTEnabled
source: PMMDB_SELECT
query: stt->'stt_enabled' AS stt_enabled FROM settings s, jsonb_extract_path(s.settings, 'sass') AS stt
query: (CASE WHEN stt->'stt_disabled' = 'false' THEN 'true' ELSE 'false' END) AS stt_enabled FROM settings s, jsonb_extract_path(s.settings, 'sass') AS stt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

stt_enabled no longer exist

Copy link
Member

Choose a reason for hiding this comment

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

can it be simplified like below?

Suggested change
query: (CASE WHEN stt->'stt_disabled' = 'false' THEN 'true' ELSE 'false' END) AS stt_enabled FROM settings s, jsonb_extract_path(s.settings, 'sass') AS stt
query: stt->'stt_disabled' != 'false' AS stt_enabled FROM settings s, jsonb_extract_path(s.settings, 'sass') AS stt

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #1131 (2f87e09) into main (2050762) will increase coverage by 0.15%.
The diff coverage is n/a.

❗ Current head 2f87e09 differs from pull request most recent head 6165450. Consider uploading reports for the commit 6165450 to get more accurate results

@@            Coverage Diff             @@
##             main    #1131      +/-   ##
==========================================
+ Coverage   49.06%   49.22%   +0.15%     
==========================================
  Files         182      148      -34     
  Lines       21448    19429    -2019     
==========================================
- Hits        10524     9563     -961     
+ Misses       9747     8726    -1021     
+ Partials     1177     1140      -37     
Flag Coverage Δ
all 49.22% <ø> (+0.49%) ⬆️
cover 49.22% <ø> (-0.02%) ⬇️
crosscover ?
update ?

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

Impacted Files Coverage Δ
utils/validators/validators.go 0.00% <0.00%> (-84.62%) ⬇️
models/software_version_helpers.go 47.67% <0.00%> (-24.42%) ⬇️
services/supervisord/supervisord.go 42.81% <0.00%> (-23.86%) ⬇️
models/node_helpers.go 49.39% <0.00%> (-21.69%) ⬇️
models/kubernetes_models.go 78.57% <0.00%> (-21.43%) ⬇️
models/models.go 61.05% <0.00%> (-20.00%) ⬇️
models/service_helpers.go 45.59% <0.00%> (-19.69%) ⬇️
models/service_model_reform.go 76.34% <0.00%> (-19.36%) ⬇️
models/rule_model.go 63.82% <0.00%> (-19.15%) ⬇️
services/scheduler/task.go 52.22% <0.00%> (-18.89%) ⬇️
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2050762...6165450. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants