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: updated merge functionality #182

Merged
merged 2 commits into from
Oct 3, 2022
Merged

fix: updated merge functionality #182

merged 2 commits into from
Oct 3, 2022

Conversation

james-milligan
Copy link
Contributor

Signed-off-by: James-Milligan [email protected]

This PR

  • flag updates are handled on a per source basis, allowing deletions to be recognised
  • adds the Source method to the sync provider interface, returning a string

Related Issues

Fixes #181

How to test

make build
./flagd start -f config/samples/example_flags.json --sync-provider filepath
curl -X POST "localhost:8013/schema.v1.Service/ResolveInt" -d '{"flagKey":"myIntFlag","context":{"color":"yellow"}}' -H "Content-Type: application/json"

returns

{"value":"1", "reason":"DEFAULT", "variant":"one"}

Now change the name of the myIntFlag in config/samples/example_flags.json to notMyIntFlag

curl -X POST "localhost:8013/schema.v1.Service/ResolveInt" -d '{"flagKey":"myIntFlag","context":{"color":"yellow"}}' -H "Content-Type: application/json"

returns

{"code":"not_found","message":"FlagdError:, FLAG_NOT_FOUND"}

Signed-off-by: James-Milligan <[email protected]>
Signed-off-by: James-Milligan <[email protected]>
@james-milligan james-milligan changed the title updated merge functionality fix: updated merge functionality Oct 3, 2022
@beeme1mr
Copy link
Member

beeme1mr commented Oct 3, 2022

Ran it locally and it worked great.

@james-milligan james-milligan merged commit 94d7697 into open-feature:main Oct 3, 2022
@james-milligan james-milligan deleted the bug-fix branch October 3, 2022 15:20
AlexsJones pushed a commit that referenced this pull request Oct 4, 2022
🤖 I have created a release *beep* *boop*
---


##
[0.2.2](v0.2.1...v0.2.2)
(2022-10-03)


### Bug Fixes

* updated merge functionality
([#182](#182))
([94d7697](94d7697))

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

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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] flagd doesn't reindex flags on delete
3 participants