Skip to content

Changed UpdateFlags function to return absl::Status#114

Merged
m-olko merged 2 commits into
mainfrom
updateflags_returns_status
Jun 17, 2026
Merged

Changed UpdateFlags function to return absl::Status#114
m-olko merged 2 commits into
mainfrom
updateflags_returns_status

Conversation

@m-olko

@m-olko m-olko commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

This PR

Update the FlagSync:UpdateFlags interface to return absl::Status and return errors on validation problems. The change also includes updating all the tests to support that.

Related Issues

Fixes #113

Signed-off-by: Marcin Olko <molko@google.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread providers/flagd/src/sync/sync.h
Comment thread providers/flagd/src/sync/sync.cpp
Comment thread providers/flagd/src/sync/sync.cpp
Comment thread providers/flagd/src/sync/grpc/grpc_sync.cpp
Comment thread providers/flagd/tests/evaluator/evaluator_test.cpp
Comment thread providers/flagd/tests/smoke/openfeature.cpp
Comment thread providers/flagd/tests/smoke/sync.cpp
Comment thread providers/flagd/tests/sync_test.cpp
@m-olko m-olko requested a review from oxddr June 16, 2026 07:59
@m-olko m-olko merged commit 8fa8ae8 into main Jun 17, 2026
3 checks passed
@m-olko m-olko deleted the updateflags_returns_status branch June 17, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flagd] The flagUpdate in FlagSync should return absl::Status

2 participants