Skip to content

[EXT-2091] improve capabilities#36996

Merged
StekPerepolnen merged 1 commit intomainfrom
meta-capabilites-support-links
Apr 13, 2026
Merged

[EXT-2091] improve capabilities#36996
StekPerepolnen merged 1 commit intomainfrom
meta-capabilites-support-links

Conversation

@StekPerepolnen
Copy link
Copy Markdown
Collaborator

@StekPerepolnen StekPerepolnen commented Mar 31, 2026

Changelog entry

This PR enhances the MVP “meta” service capabilities reporting by tracking registered HTTP handlers (with versions) and serving them via the /capabilities endpoint, while also refactoring handler registration to go through a shared helper.

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

2026-03-31 13:15:22 UTC Pre-commit check linux-x86_64-relwithdebinfo for 865f7ad has started.
2026-03-31 13:15:42 UTC Artifacts will be uploaded here
2026-03-31 13:18:10 UTC ya make is running...
🟢 2026-03-31 13:22:32 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40 40 0 0 0 0

🟢 2026-03-31 13:22:37 UTC Build successful.

@ydbot
Copy link
Copy Markdown
Collaborator

ydbot commented Mar 31, 2026

Run Extra Tests

Run additional tests for this PR. You can customize:

  • Test Size: small, medium, large (default: all)
  • Test Targets: any directory path (default: ydb/)
  • Sanitizers: ASAN, MSAN, TSAN
  • Coredumps: enable for debugging (default: off)
  • Additional args: custom ya make arguments

▶  Run tests

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

2026-03-31 13:17:43 UTC Pre-commit check linux-x86_64-release-asan for 865f7ad has started.
2026-03-31 13:18:02 UTC Artifacts will be uploaded here
2026-03-31 13:20:27 UTC ya make is running...
🟢 2026-03-31 13:22:12 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40 33 0 0 7 0

🟢 2026-03-31 13:22:18 UTC Build successful.

@StekPerepolnen StekPerepolnen marked this pull request as ready for review March 31, 2026 13:20
Copilot AI review requested due to automatic review settings March 31, 2026 13:20
Copy link
Copy Markdown
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 enhances the MVP “meta” service capabilities reporting by tracking registered HTTP handlers (with versions) and serving them via the /capabilities endpoint, while also refactoring handler registration to go through a shared helper.

Changes:

  • Added TMetaCapabilities to collect {path -> version} and serialize it to JSON.
  • Introduced TMVP::RegisterMetaHandler() to both register HTTP handlers and record their capability/version.
  • Updated /capabilities handler to return real computed capabilities instead of a stub response.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ydb/mvp/meta/mvp.h Adds TMetaCapabilities storage to TMVP and declares RegisterMetaHandler() helper.
ydb/mvp/meta/meta.cpp Refactors handler registrations through RegisterMetaHandler() and wires /capabilities to use the collected capabilities.
ydb/mvp/meta/meta_capabilities.h Implements capabilities collection + JSON serialization and updates the /capabilities handler to return computed data.

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

@StekPerepolnen StekPerepolnen force-pushed the meta-capabilites-support-links branch from ae4921f to 9ae3678 Compare April 1, 2026 08:52
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

2026-04-01 08:54:05 UTC Pre-commit check linux-x86_64-relwithdebinfo for 8a74f13 has started.
2026-04-01 08:54:22 UTC Artifacts will be uploaded here
2026-04-01 08:56:53 UTC ya make is running...
🟢 2026-04-01 09:01:03 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40 40 0 0 0 0

🟢 2026-04-01 09:01:07 UTC Build successful.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

2026-04-01 08:56:43 UTC Pre-commit check linux-x86_64-release-asan for 8a74f13 has started.
2026-04-01 08:57:01 UTC Artifacts will be uploaded here
2026-04-01 08:59:31 UTC ya make is running...
🟢 2026-04-01 09:01:12 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40 33 0 0 7 0

🟢 2026-04-01 09:01:15 UTC Build successful.

@StekPerepolnen StekPerepolnen changed the title improve capabilities [EXT-2091] improve capabilities Apr 1, 2026
@StekPerepolnen StekPerepolnen force-pushed the meta-capabilites-support-links branch from 9ae3678 to 8696b18 Compare April 1, 2026 10:39
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

2026-04-01 10:41:31 UTC Pre-commit check linux-x86_64-relwithdebinfo for 248f6a5 has started.
2026-04-01 10:41:51 UTC Artifacts will be uploaded here
2026-04-01 10:44:13 UTC ya make is running...
🟢 2026-04-01 10:48:23 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
41 41 0 0 0 0

🟢 2026-04-01 10:48:26 UTC Build successful.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

2026-04-01 10:41:34 UTC Pre-commit check linux-x86_64-release-asan for 248f6a5 has started.
2026-04-01 10:41:53 UTC Artifacts will be uploaded here
2026-04-01 10:44:20 UTC ya make is running...
🟢 2026-04-01 10:46:01 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
41 34 0 0 7 0

🟢 2026-04-01 10:46:05 UTC Build successful.

Copy link
Copy Markdown
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

2026-04-01 20:48:32 UTC Pre-commit check linux-x86_64-release-asan for 02e74a9 has started.
2026-04-01 20:48:49 UTC Artifacts will be uploaded here
2026-04-01 20:51:03 UTC ya make is running...
🟢 2026-04-01 20:52:31 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
41 34 0 0 7 0

🟢 2026-04-01 20:52:35 UTC Build successful.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

2026-04-01 20:48:36 UTC Pre-commit check linux-x86_64-relwithdebinfo for 02e74a9 has started.
2026-04-01 20:48:55 UTC Artifacts will be uploaded here
2026-04-01 20:51:31 UTC ya make is running...
🟢 2026-04-01 20:55:50 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
41 41 0 0 0 0

🟢 2026-04-01 20:55:54 UTC Build successful.

Copy link
Copy Markdown
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

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


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

Comment on lines +35 to +43
explicit THandlerActorMetaCapabilities(std::shared_ptr<const TMetaCapabilities> capabilities)
: TBase(&THandlerActorMetaCapabilities::StateWork)
, Capabilities(std::move(capabilities))
{}

void Handle(const NHttp::TEvHttpProxy::TEvHttpIncomingRequest::TPtr& event, const NActors::TActorContext& ctx) {
// Stub endpoint for UI compatibility so clients do not receive 404 while capabilities are not implemented yet.
static constexpr TStringBuf ResponseBody = "{\n \"Capabilities\": {}\n}\n";
auto response = event->Get()->Request->CreateResponseOK(ResponseBody, "application/json; charset=utf-8");
NJson::TJsonValue responseBody(NJson::JSON_MAP);
responseBody["Capabilities"] = Capabilities->ToJson();

Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

THandlerActorMetaCapabilities dereferences Capabilities unconditionally. Since the ctor accepts a std::shared_ptr it’s possible to accidentally pass nullptr and get a crash on the first request; consider enforcing non-null in the constructor (e.g., assert/abort) or storing by value/snapshot to make the handler self-contained.

Copilot uses AI. Check for mistakes.
@StekPerepolnen StekPerepolnen merged commit c9a25a7 into main Apr 13, 2026
13 checks passed
@StekPerepolnen StekPerepolnen deleted the meta-capabilites-support-links branch April 13, 2026 08:33
@ydbot
Copy link
Copy Markdown
Collaborator

ydbot commented Apr 13, 2026

Backport

To backport this PR, click the button next to the target branch and then click "Run workflow" in the Run Actions UI.

Branch Run
stable-25-4, stable-25-4-1, stable-26-1, stable-26-1-1 ▶  Backport
stable-26-1, stable-26-1-1 ▶  Backport
stable-26-1 ▶  Backport

▶  Backport manual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants