RDKEMW-17483: Change Discovery.watched method return type void to bool#78
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Firebolt C++ client’s Discovery module contract so Discovery.watched returns a boolean result (instead of void), and aligns implementation, tests, demo output, and OpenRPC fixtures to the new return shape.
Changes:
- Change
IDiscovery::watched/DiscoveryImpl::watchedreturn type fromResult<void>toResult<bool>and fetch a boolean result viahelper_.get(...). - Update unit/component tests to assert the returned boolean and adjust mocking from
invoketogetJson. - Update OpenRPC fixtures (
firebolt-open-rpc.jsonand Discovery module OpenRPC) soDiscovery.watchedreturns a boolean result with updated examples.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
include/firebolt/discovery.h |
Updates the public watched() API signature to Result<bool> and adjusts its doc comment. |
src/discovery_impl.h |
Updates the DiscoveryImpl::watched() override signature to match the interface. |
src/discovery_impl.cpp |
Implements watched() to call helper_.get<..., bool>(...) and return a boolean result. |
test/unit/discoveryTest.cpp |
Updates unit tests/mocking to validate boolean return and JSON payload expectations. |
test/component/discoveryTest.cpp |
Updates component test to compare returned boolean against the OpenRPC fixture value. |
test/api_test_app/apis/discoveryDemo.cpp |
Updates demo output to print the boolean result for Discovery.watched. |
docs/openrpc/the-spec/firebolt-open-rpc.json |
Updates the spec fixture for Discovery.watched to return boolean (and updates examples). |
docs/openrpc/openrpc/discovery.json |
Updates module-level OpenRPC for watched to return boolean (and updates examples). |
brendanobra
previously approved these changes
Jun 12, 2026
brendanobra
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.