Changed UpdateFlags function to return absl::Status#114
Conversation
Signed-off-by: Marcin Olko <molko@google.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the flag synchronization and validation logic in the flagd provider to return absl::Status instead of boolean or void, allowing for better error propagation. Callers and test suites have been updated to handle and assert on these statuses. The reviewer's feedback focuses on performance and safety improvements, suggesting the use of [[nodiscard]] to prevent ignoring returned statuses, passing JSON objects by value to enable move semantics and avoid expensive copies, and using auto for clearly deduced types.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
This PR
Update the
FlagSync:UpdateFlagsinterface to returnabsl::Statusand return errors on validation problems. The change also includes updating all the tests to support that.Related Issues
Fixes #113