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

refactor: introduce add, update and delete operations to sync providers #307

Merged

Conversation

Kavindu-Dodan
Copy link
Contributor

@Kavindu-Dodan Kavindu-Dodan commented Jan 23, 2023

This PR

Introduce and wire new strategies to sync provider state updates.

Following new mechanisms were added to be used by sync providers (ex:- file based flag configuration provider),

  • ADD: Add new flag(s) to internal state
  • UPDATE: Update existing flag(s) to internal state
  • DELETE: Remove flag(s) from internal state

These operations provide extra flexibility compared to the existing "merge" operation, which is now mapped to "ALL" (i.e - Add and replace all).

Test coverage of 100% for newly added methods.

NOTE - recommends commit by commit review to minimize confusion

Related Issues

Related to #249

@Kavindu-Dodan Kavindu-Dodan requested review from toddbaert and beeme1mr and removed request for thomaspoignant, skyerus, toddbaert and beeme1mr January 24, 2023 18:19
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.

Though I'm not sure we will anytime soon implement a sync that would take advantage of this... we might need one at some point to avoid large payloads for only small flag changes.

I think it's worth merging this to be able to easily add that support, but I would like @skyerus, @james-milligan or @AlexsJones 's opinion.

pkg/eval/json_evaluator.go Show resolved Hide resolved
pkg/eval/json_evaluator.go Outdated Show resolved Hide resolved
pkg/eval/json_evaluator.go Outdated Show resolved Hide resolved
pkg/eval/json_evaluator.go Outdated Show resolved Hide resolved
pkg/eval/json_evaluator_model.go Show resolved Hide resolved
@Kavindu-Dodan Kavindu-Dodan requested review from james-milligan and toddbaert and removed request for beeme1mr and james-milligan January 25, 2023 21:10
@Kavindu-Dodan Kavindu-Dodan force-pushed the refactor/sync-merge-strategy branch 2 times, most recently from 99a7976 to 5648dc4 Compare January 30, 2023 17:03
Kavindu-Dodan and others added 9 commits January 30, 2023 12:50
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
@beeme1mr beeme1mr merged commit 0c9a6c3 into open-feature:main Jan 30, 2023
beeme1mr pushed a commit that referenced this pull request Feb 7, 2023
@Kavindu-Dodan has contributed multiple significant changes and
proposals to flagd:

- multiple refactors: #291,
#307
- ci/security improvements:
#338,
#337
- architectural proposals (some of which got some attention from outside
parties!): open-feature/ofep#45,
open-feature/flagd-schemas#78,
#249 (comment)
- load testing: #225
- documentation improvements

For these reasons, I believe he should be made a CODEOWNER in this
repository.

NOTE: before this is merged, @Kavindu-Dodan should be added with at
least `maintainer` permissions to the repo.

Signed-off-by: Todd Baert <toddbaert@gmail.com>
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.

None yet

5 participants