Skip to content

Conversation

@adameat
Copy link
Member

@adameat adameat commented Nov 11, 2025

Changelog entry

fixes access check restrictions, introduced in #22513
allows for prometheus metrics to be collected without access check.
closes #28021

Changelog category

  • Bugfix

Description for reviewers

...

@adameat adameat self-assigned this Nov 11, 2025
@adameat adameat requested a review from a team as a code owner November 11, 2025 06:25
Copilot AI review requested due to automatic review settings November 11, 2025 06:25
@github-actions
Copy link

🟢 2025-11-11 06:27:47 UTC The validation of the Pull Request description is successful.

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 06:28:03 UTC Pre-commit check linux-x86_64-release-asan for 9178853 has started.
2025-11-11 06:28:21 UTC Artifacts will be uploaded here
2025-11-11 06:30:38 UTC ya make is running...
🟡 2025-11-11 08:33:58 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
15239 14724 0 182 304 29

🟢 2025-11-11 08:34:07 UTC Build successful.
🟢 2025-11-11 08:34:34 UTC ydbd size 3.8 GiB changed* by -11.9 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 4fd8389 merge: 9178853 diff diff %
ydbd size 4 081 241 880 Bytes 4 081 229 744 Bytes -11.9 KiB -0.000%
ydbd stripped size 1 515 019 848 Bytes 1 515 014 600 Bytes -5.1 KiB -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 06:28:40 UTC Pre-commit check linux-x86_64-relwithdebinfo for 9178853 has started.
2025-11-11 06:28:46 UTC Artifacts will be uploaded here
2025-11-11 06:31:00 UTC ya make is running...
🟡 2025-11-11 07:50:53 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
31395 29969 0 3 1385 38

2025-11-11 07:51:04 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-11-11 07:59:51 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
72 (only retried tests) 56 0 0 0 16

🟢 2025-11-11 07:59:58 UTC Build successful.
🟢 2025-11-11 08:00:18 UTC ydbd size 2.3 GiB changed* by -5.9 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 4fd8389 merge: 9178853 diff diff %
ydbd size 2 437 872 424 Bytes 2 437 866 344 Bytes -5.9 KiB -0.000%
ydbd stripped size 518 656 912 Bytes 518 656 528 Bytes -384 Bytes -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copilot finished reviewing on behalf of adameat November 11, 2025 06:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes access check restrictions for the healthcheck endpoint that were introduced in #22513. The main purpose is to allow Prometheus metrics collection without requiring authentication while maintaining access checks for other types of requests.

Key changes:

  • Moved authentication check from the HTTP handler registration to inside the healthcheck handler
  • Added conditional access check that bypasses authentication for Prometheus format requests
  • Refactored code to use base class members (Params, Timeout, JsonSettings, Proto2JsonConfig) instead of local/duplicate variables

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ydb/core/viewer/viewer.cpp Disabled auth at handler registration level with comment indicating auth is now checked inside the handler
ydb/core/viewer/viewer_healthcheck.h Removed duplicate member variables, added conditional access check for non-Prometheus requests, refactored to use base class functionality for parameter parsing and JSON configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adameat adameat enabled auto-merge (squash) November 12, 2025 03:42
@adameat adameat merged commit f4b35ec into ydb-platform:main Nov 12, 2025
19 checks passed
@adameat adameat deleted the healthcheck-for-everyone branch November 12, 2025 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prometheus cannot get healthcheck metric after update to 25.2

2 participants