Closes#1282
This PR adds support for using relative weights instead of percentages
that need to add up to 100.
The behavior for existing flag configs does not change with this PR, so
those will continue to work as they did previously
---------
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Remove references to old protos, update `/schemas` submodule.
The old protos were still being used to generate the doc. I've updated
them. Also, the `schemas` submodule was set to some very old version, I
couldn't even run the live docs for that reason. I've updated it to the
latest release of that module.
---------
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->
## This PR
<!-- add the description of the PR here -->
- no longer injects flagKey as seed for fractional op when user has
provided custom targeting
- updates schema to allow `cat` and other operations so that custom
targeting can be properly seeded
### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->
https://github.com/open-feature/flagd/issues/1264
### Notes
<!-- any additional notes for this PR -->
### Follow-up Tasks
<!-- anything that is related to this PR but not done here should be
noted under this section -->
<!-- if there is a need for a new issue, please link it here -->
### How to test
<!-- if applicable, add testing instructions under this section -->
```bash
# unit tests
make test
# gherkin tests
./bin/flagd start -f file:test-harness/flags/testing-flags.json -f file:test-harness/flags/custom-ops.json -f file:test-harness/flags/evaluator-refs.json -f file:test-harness/flags/zero-flags.json
make flagd-integration-test
```
---------
Signed-off-by: Cole Bailey <cole.bailey@deliveryhero.com>
Signed-off-by: Cole Bailey <cole.bailey.one@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Co-authored-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
## This PR
Fixes#1245 and introduce OFREP support for flagd
OFREP service runs on 8016 by default and can simply use curl for flag
evaluations,
```shell
curl -X POST 'http://localhost:8016/ofrep/v1/evaluate/flags/myBoolFlag'
```
NOTE - This PR touch several files as I had to migrate from
`github.com/golang/mock/gomock` to `go.uber.org/mock/gomock`. This is
because https://github.com/golang/mock is no longer maintained.
---------
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
## This PR
Introduce flag sync capability to flagd as discussed at [1] and fixes
https://github.com/open-feature/flagd/issues/1230 .
**What's changed ?**
The change included with this PR introduces the gRPC sync contract [2].
This allows flagd to expose its store to in-process provider which
consumes gRPC flag stream.

**How to use ?**
flagd will start sync service on port `8015`. You can alter the default
sync port by providing desired port to the startup flag `syncPort`
(`--sync-port=8686`)
**Implementation details**
- Sync service startup is delayed to allow configured flag sources to
complete their initial loading (dealy is 5 seconds)
- Sync request's `selector` can be used to specify the specific flag
source. If unset, all flags will be sent
- A new stream response will be created whenever there are updates from
flag sources
[1] - https://github.com/open-feature/flagd/discussions/1153
[2] -
https://github.com/open-feature/flagd-schemas/blob/main/protobuf/flagd/sync/v1/sync.proto
---------
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
## This PR
- adds redirects to appropriate OFO docs
- adds an OFO overview page
### Related Issues
Fixes#1055
### Notes
This PR removes most of the OFO docs so that we only have to maintain
content in a single location. In the future, it would be ideal if we
could include relative content automatically in the flagd docs, but that
was out of scope of this PR.
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
## This PR
- adds support for any auth scheme in HTTP-sync auth header
### Related Issues
Closes#1150
---------
Signed-off-by: Best Olunusi <olunusibest@gmail.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Closes#1029
This PR introduces support for the newly introduced evaluation and sync
schemas.
Supporting both the old and new schemas involves some duplication, but I
tried to keep it as minimal as possible. I'm of course open for
suggestions for any ideas on how to make this simpler :)
See reasoning for new naming
[here](https://github.com/open-feature/flagd/issues/948).
---------
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Remove deprecated flags in flagd and flagd-proxy. Slight clean up of the
code by removing `getPortValueOrDefault`. Setting the default value in
the definition of the flag accomplishes the same thing.
Signed-off-by: Craig Pastro <craig.pastro@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
- returning variants from targeting which are not in the variants list is now an error
- minor spec changes
---------
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
BREAKING CHANGE: OFO APIs were updated to version v1beta1, since they are more stable now. Resources of the alpha versions are no longer supported in flagd or flagd-proxy.
I was looking into what we could do to improve our indexing and social
object graph. I don't think there's much except adding
meta-descriptions. These aren't as important as they used to be, but
they can still improve indexing and increase likelihood of sharing on
social media, etc.
Adding a markdown metadata section with `description` in mkdocs results
in it being used in the description meta tag for the page, so I've done
that for some pages that are likely to be searched.
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
## This PR
- reworked to autogenerated docs to resolve a relative path issue
- fixed invalid links
- fixed various typos
### How to test
Run `make run-web-docs` and look at the squeaky clean output.
---------
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
## This PR
- remove RPC section from the in-process docs
- addressed various grammatical issues
---------
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Total web-docs overhaul:
- puts a helpful intro at the start, with a demo on the next page
- adds an "architecture" page which discusses in-process vs rpc
- adds a deployment page with mentions how to install/run
- adds a "reference" section which includes:
- specs
- protos (in the form of autogenerated markdown for easy navigation)
- autogenerated CLI docs
- adds FAQ
---------
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>