Skip to content

RDKEMW-17483: Change Discovery.watched and Metrics methods return type#62

Merged
swethasukumarr merged 3 commits into
developfrom
feature/RDKEMW-17483
May 13, 2026
Merged

RDKEMW-17483: Change Discovery.watched and Metrics methods return type#62
swethasukumarr merged 3 commits into
developfrom
feature/RDKEMW-17483

Conversation

@swethasukumarr
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 7, 2026 14:09
Copy link
Copy Markdown

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 updates the Discovery watched() API and multiple Metrics event APIs to return Result<void> (instead of Result<bool>), aligning them with “fire-and-forget” invocation semantics rather than boolean-returning queries.

Changes:

  • Changed Discovery.watched and most Metrics.* methods to return Result<void> and switched implementations from helper_.get<...> to helper_.invoke(...).
  • Updated unit/component tests and demo apps to stop dereferencing boolean results and instead assert only success.
  • Added a unit-test helper (mockInvoke) for mocking void-returning invocations.

Reviewed changes

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

Show a summary per file
File Description
include/firebolt/metrics.h Updates Metrics interface return types to Result<void> (docs need adjustment).
include/firebolt/discovery.h Updates Discovery interface return type to Result<void> (docs need adjustment).
src/metrics_impl.h Updates MetricsImpl overrides to Result<void>.
src/metrics_impl.cpp Switches Metrics implementations from get<bool> to invoke and returns Result<void>.
src/discovery_impl.h Updates DiscoveryImpl override to Result<void>.
src/discovery_impl.cpp Switches watched() implementation to invoke and returns Result<void>.
test/unit/mock_helper.h Adds mockInvoke() helper for void invocations.
test/unit/metricsTest.cpp Updates unit tests to use mockInvoke() and stop checking boolean payloads.
test/unit/discoveryTest.cpp Updates unit tests to use invoke and stop checking boolean results.
test/component/metricsTest.cpp Updates component tests to only assert success (no expected boolean comparison).
test/component/discoveryTest.cpp Updates component test to only assert success (currently missing gtest include).
test/api_test_app/apis/metricsDemo.cpp Updates demo output to not print boolean result values.
test/api_test_app/apis/discoveryDemo.cpp Updates demo output to not print boolean result values.

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

Comment thread include/firebolt/metrics.h
Comment thread include/firebolt/discovery.h
Comment thread test/component/discoveryTest.cpp
@swethasukumarr swethasukumarr force-pushed the feature/RDKEMW-17483 branch from d742b31 to 23347bc Compare May 7, 2026 17:33
Copilot AI review requested due to automatic review settings May 7, 2026 19:26
Copy link
Copy Markdown

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 16 out of 16 changed files in this pull request and generated 4 comments.

Comment thread docs/openrpc/the-spec/firebolt-open-rpc.json Outdated
Comment thread docs/openrpc/the-spec/firebolt-open-rpc.json Outdated
Comment thread docs/openrpc/openrpc/metrics.json
Comment thread docs/openrpc/openrpc/discovery.json
@swethasukumarr swethasukumarr self-assigned this May 7, 2026
@swethasukumarr swethasukumarr force-pushed the feature/RDKEMW-17483 branch from d8d4605 to 8b531c0 Compare May 7, 2026 20:05
@swethasukumarr swethasukumarr requested a review from satlead May 7, 2026 20:27
Copilot AI review requested due to automatic review settings May 8, 2026 13:23
@swethasukumarr swethasukumarr force-pushed the feature/RDKEMW-17483 branch from 8b531c0 to bd39f0d Compare May 8, 2026 13:23
Copy link
Copy Markdown

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 16 out of 16 changed files in this pull request and generated 1 comment.

Comment thread test/component/metricsTest.cpp
satlead
satlead previously approved these changes May 8, 2026
@swethasukumarr swethasukumarr changed the base branch from main to develop May 13, 2026 15:44
@swethasukumarr swethasukumarr dismissed satlead’s stale review May 13, 2026 15:44

The base branch was changed.

@swethasukumarr swethasukumarr merged commit c8e00f2 into develop May 13, 2026
16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
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