Skip to content

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

Merged
beeme1mr merged 9 commits intoopen-feature:mainfrom
Kavindu-Dodan:refactor/sync-merge-strategy
Jan 30, 2023
Merged

refactor: introduce add, update and delete operations to sync providers#307
beeme1mr merged 9 commits intoopen-feature:mainfrom
Kavindu-Dodan:refactor/sync-merge-strategy

Conversation

@Kavindu-Dodan
Copy link
Copy Markdown
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

Comment thread pkg/eval/json_evaluator.go Outdated
Comment thread pkg/eval/json_evaluator.go Outdated
@Kavindu-Dodan Kavindu-Dodan requested review from beeme1mr and toddbaert and removed request for beeme1mr, skyerus, thomaspoignant and toddbaert January 24, 2023 18:19
Copy link
Copy Markdown
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.

Comment thread pkg/eval/json_evaluator.go
Comment thread pkg/eval/json_evaluator.go Outdated
Comment thread pkg/eval/json_evaluator.go Outdated
Comment thread pkg/eval/json_evaluator.go Outdated
Comment thread pkg/eval/json_evaluator_model.go
Comment thread pkg/eval/json_evaluator.go Outdated
Comment thread pkg/eval/json_evaluator_model.go
@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>
@Kavindu-Dodan Kavindu-Dodan force-pushed the refactor/sync-merge-strategy branch from 2e620a8 to 722db95 Compare January 30, 2023 20:50
@beeme1mr beeme1mr self-requested a review January 30, 2023 21:34
@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>
raphael-wigoutschnigg-dt pushed a commit to open-feature-forking/flagd that referenced this pull request Mar 11, 2025
…open-feature#307)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.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.

5 participants