Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixes store merge when selector is used #1322

Conversation

Kavindu-Dodan
Copy link
Contributor

@Kavindu-Dodan Kavindu-Dodan commented Jun 5, 2024

This PR

This change address open-feature/open-feature-operator#664.

Background

We allow using multiple flag source CRDs when using flagd-proxy with OFO. Internally, this converts to flagd using gRPC syncs with scopes, where scopes specify the CRD names that need to source flags from.

Bug

We had two bugs, first gRPC resyncs never contained scope. This is why we observed unable to build sync from URI for target message. Secondly, we triggered resyncs only considering source equility. This is not valid with flagd-proxy as we always go through the proxy for any CRD.

Fix

Fix here adds scope to gRPC resyncs and considers both source and selector equality when triggering a resync

How to validate the fix

Use this image with OFO sidecar image override

helm upgrade --install openfeature openfeature/open-feature-operator --set sidecarConfiguration.image.tag=1,sidecarConfiguration.image.repository=kavindudodanduwa/flagd

Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
@Kavindu-Dodan Kavindu-Dodan requested a review from a team as a code owner June 5, 2024 21:57
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 5, 2024
Copy link

netlify bot commented Jun 5, 2024

Deploy Preview for polite-licorice-3db33c canceled.

Name Link
🔨 Latest commit 32abe8c
🔍 Latest deploy log https://app.netlify.com/sites/polite-licorice-3db33c/deploys/6660df611aca5700087c594a

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.74%. Comparing base (1c530ab) to head (32abe8c).
Report is 66 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1322      +/-   ##
==========================================
+ Coverage   73.69%   78.74%   +5.05%     
==========================================
  Files          32       36       +4     
  Lines        3140     2828     -312     
==========================================
- Hits         2314     2227      -87     
+ Misses        717      466     -251     
- Partials      109      135      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

Nice catch.

@toddbaert toddbaert merged commit ed5025d into open-feature:main Jun 6, 2024
15 checks passed
@github-actions github-actions bot mentioned this pull request Jun 6, 2024
toddbaert pushed a commit that referenced this pull request Jun 6, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>flagd: 0.10.3</summary>

##
[0.10.3](flagd/v0.10.2...flagd/v0.10.3)
(2024-06-06)


### 🧹 Chore

* adapt telemetry setup error handling
([#1315](#1315))
([20bcb78](20bcb78))
* fix unit tests and ensure their execution
([#1316](#1316))
([25041c0](25041c0))
</details>

<details><summary>core: 0.9.3</summary>

##
[0.9.3](core/v0.9.2...core/v0.9.3)
(2024-06-06)


### 🐛 Bug Fixes

* fixes store merge when selector is used
([#1322](#1322))
([ed5025d](ed5025d))


### 🧹 Chore

* adapt telemetry setup error handling
([#1315](#1315))
([20bcb78](20bcb78))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants