Commit Graph

30 Commits

Author SHA1 Message Date
Florian Bacher f82c094f5c
feat: support relative weighting for fractional evaluation (#1313)
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>
2024-06-27 12:50:34 -04:00
Todd Baert 0fc2d0a683
fix: submodules and doc (#1280)
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>
2024-04-10 09:49:01 -04:00
Cole Bailey f62bc721e8
feat!: allow custom seed when using targetingKey override for fractional op (#1266)
<!-- 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>
2024-04-09 08:41:41 -07:00
Kavindu Dodanduwa 9d12fc2070
feat: OFREP support for flagd (#1247)
## 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>
2024-03-27 10:03:01 -07:00
Kavindu Dodanduwa 7afdc0cda4
feat: serve sync.proto on port 8015 (#1237)
## 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.


![image](https://github.com/open-feature/flagd/assets/8186721/871ed21f-612a-46d4-95b6-6459d43cb077)

**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>
2024-03-12 07:54:47 -07:00
Todd Baert 6b8e954f96
docs: add targeting key doc/demo/spec (#1206)
Speccing this out and providing an example for maximum clarity.

New playground entry is last in the list:
https://deploy-preview-1206--polite-licorice-3db33c.netlify.app/playground/

New section:
https://deploy-preview-1206--polite-licorice-3db33c.netlify.app/reference/flag-definitions/#targeting-key

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2024-02-13 07:59:02 -05:00
Todd Baert ec634d94fc
chore: schema docs, add to all examples (#1181)
I've added a small page about the schema, and I've added the schema to
all examples.

Preview:
https://deploy-preview-1181--polite-licorice-3db33c.netlify.app/reference/schema/

---------

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2024-02-05 15:21:27 -08:00
Michael Beemer 99da3b7c54
docs: move OFO doc references (#1174)
## 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>
2024-01-31 11:49:55 -05:00
Best Olunusi df6596634e
feat(core): support any auth scheme in HTTP-sync auth header (#1152)
## 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>
2024-01-18 15:35:06 -05:00
Michael Beemer 3efe321617
docs: add provider to the documentation (#1027)
## This PR

- adds a section on the install page that lists the available providers
- includes the readmes of the available providers

### How to test

- Install:
https://deploy-preview-1027--polite-licorice-3db33c.netlify.app/installation/
- Overview Page:
https://deploy-preview-1027--polite-licorice-3db33c.netlify.app/providers/
- Go:
https://deploy-preview-1027--polite-licorice-3db33c.netlify.app/providers/go/
- Java:
https://deploy-preview-1027--polite-licorice-3db33c.netlify.app/providers/java/
- Node.JS:
https://deploy-preview-1027--polite-licorice-3db33c.netlify.app/providers/nodejs/
- PHP:
https://deploy-preview-1027--polite-licorice-3db33c.netlify.app/providers/php/
- .NET:
https://deploy-preview-1027--polite-licorice-3db33c.netlify.app/providers/dotnet/
- Web:
https://deploy-preview-1027--polite-licorice-3db33c.netlify.app/providers/web/

---------

Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-01-12 17:26:05 -05:00
Austin Drenski a598407211
docs: Update flag-definitions.md (#1132)
Signed-off-by: Austin Drenski <austin@austindrenski.io>
2024-01-08 09:52:36 -05:00
Best Olunusi b9d30e0a52
fix: use correct link in sources flag helper text in start cmd (#1126)
Signed-off-by: Best Olunusi <olunusibest@gmail.com>
2024-01-05 14:21:23 -05:00
Florian Bacher e9728aae83
feat: support new flagd.evaluation and flagd.sync schemas (#1083)
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>
2023-12-21 10:20:01 -05:00
Michael Beemer 3385d58973
docs: fixed a type in the custom operations section
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2023-12-20 21:39:07 -05:00
Craig Pastro 49f6fe5679
chore!: remove deprecated flags (#1075)
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>
2023-12-15 11:39:44 -05:00
Henry Chen 1b56c3facc
docs: fix a typo in `docs/featureflagsource.md` (#1071)
## This PR

Fix a typo in `docs/featureflagsource.md`

Signed-off-by: Henry Chen <1474479+chenhunghan@users.noreply.github.com>
2023-12-11 11:04:48 -05:00
Michael Beemer 482bb3bda0
chore: update examples in the flag definitions doc (#1058)
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2023-12-05 17:15:07 -05:00
Todd Baert ca38c165c6
fix: various edge cases in targeting (#1041)
- 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>
2023-12-05 09:04:25 -05:00
Michael Beemer 94d697724e
docs: change ecosystem link to use the correct case (#1025)
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2023-11-20 10:59:33 -05:00
Craig Pastro 5635e38703
refactor: Rename metrics-port to management-port (#1012)
Signed-off-by: Craig Pastro <craig.pastro@gmail.com>
2023-11-16 15:08:57 -05:00
odubajDT bb6f5bf0fc
feat!: support OFO v1beta1 API (#997)
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.
2023-11-14 07:35:45 +01:00
Craig Pastro 608535a43f
docs: Add docs about $flag.properties (#965) 2023-10-14 10:10:37 -04:00
Todd Baert f3506abdf2
chore: adds meta descriptions to improve indexing/SEO/etc (#959)
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>
2023-10-10 17:42:19 -04:00
Michael Beemer 0bade57400
docs: fixed typos and linting issues (#957)
## 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>
2023-10-06 10:43:39 -04:00
Michael Beemer 4b3490837a
chore: remove invalid link
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2023-10-05 17:40:51 -04:00
Michael Beemer a281982baa
docs: fix link to provider ecosystem page (#947)
## This PR

- fix link to provider ecosystem page

Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2023-10-04 13:35:12 -04:00
Michael Beemer 0089dc3122
docs: removed RPC section and fixed grammatical issues (#945)
## 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>
2023-09-29 10:56:36 -04:00
Todd Baert 6d9aecd8ff
chore: various doc fixes (#942)
* fixes some links
* adds bit about required version for `fractional`
* adds bit about multiple fs events, symlinks
* adds blurb about HTTP2 being blocked in some environments

Fixes: https://github.com/open-feature/flagd/issues/894
Fixes: https://github.com/open-feature/flagd/issues/479
Fixes: https://github.com/open-feature/flagd/issues/362

---------

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2023-09-28 18:01:03 -04:00
Todd Baert fc0610d3c8
chore: remove snap, rename deployment (#941)
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2023-09-27 14:31:00 -04:00
Todd Baert 27b3193821
chore: docs rework (#927)
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>
2023-09-27 13:46:39 -04:00