Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update compute_installed_extensions metric: #9891

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

lubennikovaav
Copy link
Contributor

@lubennikovaav lubennikovaav commented Nov 26, 2024

add owned_by_superuser field to filter out system extensions.

While on it, also correct related code:

  • fix the metric setting: use set() instead of inc() in a loop.
    inc() is not idempotent and can lead to incorrect results
    if the function called multiple times. Currently it is only called at
    compute start, but this will change soon.
  • fix the return type of the installed_extensions endpoint
    to match the metric. Currently it is only used in the test.

Copy link

github-actions bot commented Nov 26, 2024

7070 tests run: 6762 passed, 0 failed, 308 skipped (full report)


Flaky tests (7)

Postgres 17

Postgres 15

Postgres 14

Code coverage* (full report)

  • functions: 30.7% (8255 of 26897 functions)
  • lines: 47.7% (65161 of 136553 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
bd722f2 at 2024-12-04T13:05:21.653Z :recycle:

@lubennikovaav lubennikovaav force-pushed the filter_system_extensions branch from 5ac0c63 to 295ae96 Compare November 29, 2024 11:54
add owned_by_superuser field to filter out system extensions.

While on it, also correct related code:
- fix the metric setting: use set() instead of inc() in a loop.
inc() is not idempotent and can lead to incorrect results
if the function called multiple times. Currently it is only called at
compute start, but this will change soon.
- fix the return type of the installed_extensions endpoint
to match the metric. Currently it is only used in the test.
Copy link
Contributor

@myrrc myrrc left a comment

Choose a reason for hiding this comment

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

LGTM. I'd add comments to key items in extensions_map e.g.
(/*name*/String, /*version*/String, /*owned_by_superuser*/String) but that's a nitpick

@lubennikovaav lubennikovaav added this pull request to the merge queue Dec 11, 2024
Merged via the queue into main with commit ef233e9 Dec 11, 2024
83 checks passed
@lubennikovaav lubennikovaav deleted the filter_system_extensions branch December 11, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants