Skip to content

Commit

Permalink
Rename 'installed_extensions' metric to 'compute_installed_extensions' (
Browse files Browse the repository at this point in the history
#9759)

to keep it consistent with existing compute metrics.

flux-fleet change is not needed, because it doesn't have any filter by
metric name for compute metrics.
  • Loading branch information
lubennikovaav authored Nov 22, 2024
1 parent c1937d0 commit 3245f7b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion compute_tools/src/installed_extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub fn get_installed_extensions_sync(connstr: Url) -> Result<()> {

static INSTALLED_EXTENSIONS: Lazy<UIntGaugeVec> = Lazy::new(|| {
register_uint_gauge_vec!(
"installed_extensions",
"compute_installed_extensions",
"Number of databases where the version of extension is installed",
&["extension_name", "version"]
)
Expand Down
20 changes: 14 additions & 6 deletions test_runner/regress/test_installed_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,15 @@ def test_installed_extensions(neon_simple_env: NeonEnv):
res = client.metrics()
info("Metrics: %s", res)
m = parse_metrics(res)
neon_m = m.query_all("installed_extensions", {"extension_name": "neon", "version": "1.2"})
neon_m = m.query_all(
"compute_installed_extensions", {"extension_name": "neon", "version": "1.2"}
)
assert len(neon_m) == 1
for sample in neon_m:
assert sample.value == 2
neon_m = m.query_all("installed_extensions", {"extension_name": "neon", "version": "1.3"})
neon_m = m.query_all(
"compute_installed_extensions", {"extension_name": "neon", "version": "1.3"}
)
assert len(neon_m) == 1
for sample in neon_m:
assert sample.value == 1
Expand All @@ -116,7 +120,7 @@ def test_installed_extensions(neon_simple_env: NeonEnv):
try:
res = client.metrics()
timeout = -1
if len(parse_metrics(res).query_all("installed_extensions")) < 4:
if len(parse_metrics(res).query_all("compute_installed_extensions")) < 4:
# Assume that not all metrics that are collected yet
time.sleep(1)
timeout -= 1
Expand All @@ -128,17 +132,21 @@ def test_installed_extensions(neon_simple_env: NeonEnv):
continue

assert (
len(parse_metrics(res).query_all("installed_extensions")) >= 4
len(parse_metrics(res).query_all("compute_installed_extensions")) >= 4
), "Not all metrics are collected"

info("After restart metrics: %s", res)
m = parse_metrics(res)
neon_m = m.query_all("installed_extensions", {"extension_name": "neon", "version": "1.2"})
neon_m = m.query_all(
"compute_installed_extensions", {"extension_name": "neon", "version": "1.2"}
)
assert len(neon_m) == 1
for sample in neon_m:
assert sample.value == 1

neon_m = m.query_all("installed_extensions", {"extension_name": "neon", "version": "1.3"})
neon_m = m.query_all(
"compute_installed_extensions", {"extension_name": "neon", "version": "1.3"}
)
assert len(neon_m) == 1
for sample in neon_m:
assert sample.value == 1

1 comment on commit 3245f7b

@github-actions
Copy link

Choose a reason for hiding this comment

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

5644 tests run: 5415 passed, 1 failed, 228 skipped (full report)


Failures on Postgres 16

  • test_compaction_l0_memory[github-actions-selfhosted]: release-x86-64
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_compaction_l0_memory[release-pg16-github-actions-selfhosted]"
Flaky tests (1)

Postgres 15

Code coverage* (full report)

  • functions: 31.4% (7958 of 25346 functions)
  • lines: 49.3% (63160 of 128158 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
3245f7b at 2024-11-22T21:20:25.014Z :recycle:

Please sign in to comment.