Commit Graph

61 Commits

Author SHA1 Message Date
lea konvalinka e8fd680860
feat: Add toggle for disabling getMetadata request (#1693)
<!-- 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 -->

- adds a toggle `disable-sync-metadata` for the Sync Service to disable
or enable the deprecated `getMetadata` request

### Related Issues
[#1688 [FEATURE] Temporary Context Enrichment
toggle](https://github.com/open-feature/flagd/issues/1688)

---------

Signed-off-by: Konvalinka <lea.konvalinka@dynatrace.com>
2025-07-28 15:33:31 +02:00
Michael Beemer 81855d76f9
fix: update to latest otel semconv (#1668)
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2025-07-17 12:36:02 -04:00
alexandraoberaigner b70fa06b66
feat: add server-side deadline to sync service (#1638)
<!-- 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 -->

- adds server side deadline for sync and event streams configurable via
cmd argument `--stream-deadline`

### Related Issues

#1582

### Notes
<!-- any additional notes for this PR -->


### How to test

1. Run flagd with `--stream-deadline 3s` // 3s can be replaced with any
duration the deadline should have
2. Test Event Stream deadline: run `grpcurl -v --proto
schemas/protobuf/flagd/evaluation/v1/evaluation.proto -plaintext
localhost:8013 flagd.evaluation.v1.Service/EventStream` or similar
depending on your flagd settings to check if the deadline exceeded is
returned after the specified duration
3. Test Sync Service Stream deadline: run `grpcurl -v --proto
schemas/protobuf/flagd/sync/v1/sync.proto -plaintext localhost:8015
flagd.sync.v1.FlagSyncService/SyncFlags` or similar depending on your
flagd settings to check if the deadline exceeded is returned after the
specified duration

Signed-off-by: alexandra.oberaigner <alexandra.oberaigner@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2025-06-13 15:50:48 -04:00
Rahul Baradol ba348152b6
feat: updating context using headers (#1641)
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->

Able to update context map using headers present in 
- OFREP requests
- Connect Requests (via Flag Evaluator V2 service)

### Related Issues
Fixes #1583 

### Notes
Context values passed via headers is high priority

If same context key is updated via
- Headers
- Request Body
- Static Config

_Context via Headers will be considered_

### Usage 
```
flagd start --port 8013 --uri file:./samples/example_flags.flagd.json -H Header=contextKey
```
or
```
flagd start --port 8013 --uri file:./samples/example_flags.flagd.json --context-from-header Header=contextKey
```

---------

Signed-off-by: Rahul Baradol <rahul.baradol.14@gmail.com>
2025-06-13 10:02:35 -04:00
Michael Beemer f94ebeed3e
docs: clarify that bucketing keys are strings (#1619)
Signed-off-by: Michael Beemer <michael.beemer@dynatrace.com>
2025-04-10 11:03:31 +02:00
Michael Beemer ddfa0203ce
docs: add providerId as a configuration option (#1567)
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2025-03-27 12:28:07 -04:00
alexandraoberaigner e2203a13ca
fix: add support for unix socket connection in sync service (#1518) (#1560)
## This PR
adds support for unix sockets in sync service

### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->

Fixes #1518

### How to test
start flagd with the new option `-e /tmp/socketpath` and try to connect
with an in-process provider to the same socket path & request a flag

---------

Signed-off-by: Alexandra Oberaigner <alexandra.oberaigner@dynatrace.com>
Signed-off-by: alexandraoberaigner <82218944+alexandraoberaigner@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
2025-02-24 22:51:39 -05:00
Michael Beemer 57fcca7d92
docs: add rust provider
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2025-02-21 19:50:42 +00:00
katsumata(TK) cd3c3c6e4b
docs: fix url for flags.json (#1553)
Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
2025-02-21 08:05:41 -05:00
Todd Baert 096aae5d9d
docs: metadata conceptual doc (#1550)
Adds a bit of conceptual docs about metadata. We already have lots of
detail on how to configure it, how it's merged in the `definitions`
page, and how it's implemented in in-process providers.

---------

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2025-02-10 11:36:14 -05:00
Todd Baert b49abf9506
feat!: flagSetMetadata in OFREP/ResolveAll, core refactors (#1540)
⚠️ This PR brings a breaking change to the
[flagd-core](https://pkg.go.dev/github.com/open-feature/flagd/core)
library: the `IStore` interface now returns an additional value
representing the flag set metadata. There are no breaking changes in
flagd's behavior.

Changes in flagd:

- returns flag set metadata as metadata for error flags (best effort)
- returns flag set metadata in OFREP and RPC calls
- moves metadata merging logic to evaluator (all flags inherent flag set
metadata, but can override, as as before but now reusable in flagd core)
- removes duplicated flag set metadata keys when the same flag set
metadata key exists in multiple sources

### To Test

- requires `curl`, `grpcurl`, and `jq`

#### RPC

```shell
grpcurl -import-path  /...../schemas/protobuf/flagd/evaluation/v1  -proto evaluation.proto -plaintext  localhost:8013 flagd.evaluation.v1.Service/ResolveAll | jq
```

### OFREP

```shell
curl --location 'http://localhost:8016/ofrep/v1/evaluate/flags'  --header 'Content-Type: application/json' --data '{"context": {"color": "yellow"}}'  | jq
```

### Sync

```shell
grpcurl -import-path /...../schemas/protobuf/flagd/sync/v1/ -proto sync.proto -plaintext   localhost:8015 flagd.sync.v1.FlagSyncService/FetchAllFlags    | jq -r .flagConfiguration  | jq
```

---------

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2025-01-31 10:54:47 -05:00
Michael Beemer 76d673ae8f
feat: support yaml in blob, file, and http syncs (#1522)
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2025-01-28 12:53:53 -05:00
Simon Schrottner f298866122
feat: migrate file evaluation to own provider type (#1525)
update of spec for https://github.com/open-feature/flagd/issues/1504

---------

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
2025-01-28 08:02:28 +01:00
Todd Baert 6c78080c3c
docs: flag and flag-set metadata (#1505)
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2025-01-10 10:29:45 -05:00
Michael Beemer 9891df2d0c
chore: bump flagd-core in playground, add metadata example, fix doc links
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2025-01-07 20:52:31 +00:00
Dave Josephsen b2471b8ddb
docs: Add docs for s3 blobs (#1477)
## This PR
Intent of this PR is to add the docs that were missing from #1449 

### Notes
Happy holidays yall.

---------

Signed-off-by: Dave Josephsen <dave.josephsen@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
2024-12-31 07:59:34 -05:00
Simon Schrottner 35d286afab
feat(spec): from grace attempts to grace period, plus connection info (#1478)
updating specification based on findings in
https://github.com/open-feature/flagd/issues/1472

---------

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Co-authored-by: chrfwow <christian.lutnik@dynatrace.com>
2024-12-19 12:20:41 -05:00
Aleksei 7ca092e478
feat: add context-value flag (#1448)
- add the `--context-value` command line flag to pass arbitrary key
value pairs to the evaluation context

Signed-off-by: Aleksei Muratov <muratoff.alexey@gmail.com>
2024-12-05 11:05:46 -05:00
Todd Baert f7dd1eb630
docs: fix copy-pasted requirement
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2024-12-04 14:49:35 -05:00
Todd Baert a19cb42373
docs: update flagd provider specs (#1432)
This PR contains significant enhancements to flagd provider specs. If
merged, I will be opening a bunch of issues to implement what's
described here based on recon I've been doing with the existing
implementations

Specifically:

- adds `retryGraceAttempts` param, which defines the amount of stream
retry attempts before provider moves from `STALE` to `ERROR` state
- adds `contextEnricher` param, which defines mapping function for
sync-metadata to evaluation context for in process providers (exists
already in Java provider)
- improves consistency between in-process and RPC stream reconnect
behavior
- simplifies provider doc and spec to remove duplication and improve
readability

---------

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Guido Breitenhuber <157148191+guidobrei@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-10-30 16:51:29 -04:00
Pradeep Mishra e5007e2bcb
feat: added custom grpc resolver (#1424)
## This PR
Added custom gRPC resolver to support envoy proxy

- support gRPC custom resolver 

### Related Issues

Fixes https://github.com/open-feature/go-sdk-contrib/issues/585

### Notes

- update `.github/workflow/build.yaml` to install `envoy`
[binary](https://www.envoyproxy.io/docs/envoy/latest/start/install#install-binaries)
part of e2e test.
- this is a pre-requisite for `flagd` go [provider
update](https://github.com/open-feature/go-sdk-contrib/issues/585)

### How to test
Unit test are already added for the custom resolver for integration test
you need a working envoy proxy support or any of the supported core
resolver mentioned
[here](https://grpc.io/docs/guides/custom-name-resolution/#overview)

```shell
bin % ./flagd start -x --uri envoy://localhost:9211/test.service

                 ______   __       ________   _______    ______      
                /_____/\ /_/\     /_______/\ /______/\  /_____/\     
                \::::_\/_\:\ \    \::: _  \ \\::::__\/__\:::_ \ \    
                 \:\/___/\\:\ \    \::(_)  \ \\:\ /____/\\:\ \ \ \   
                  \:::._\/ \:\ \____\:: __  \ \\:\\_  _\/ \:\ \ \ \  
                   \:\ \    \:\/___/\\:.\ \  \ \\:\_\ \ \  \:\/.:| | 
                    \_\/     \_____\/ \__\/\__\/ \_____\/   \____/_/                                                                                                            

2024-10-14T20:19:51.411+0200    info    cmd/start.go:120        flagd version: dev (f716423), built at: 2024-10-14T20:19:34Z    {"component": "start"}
2024-10-14T20:19:51.412+0200    debug   telemetry/builder.go:81 skipping trace provider setup as collector target is not set. Traces will use NoopTracerProvider provider and propagator will use no-Op TextMapPropagator
2024-10-14T20:19:51.412+0200    info    flag-sync/sync_service.go:54    starting flag sync service on port 8015 {"component": "FlagSyncService"}
2024-10-14T20:19:51.412+0200    debug   builder/syncbuilder.go:111      using grpc sync-provider for: envoy://localhost:9211/test.service       {"component": "sync"}
2024-10-14T20:19:51.413+0200    info    flag-evaluation/connect_service.go:247  metrics and probes listening at 8014    {"component": "service"}
2024-10-14T20:19:51.413+0200    info    ofrep/ofrep_service.go:56       ofrep service listening at 8016 {"component": "OFREPService"}
2024-10-14T20:19:51.415+0200    info    flag-evaluation/connect_service.go:227  Flag IResolver listening at [::]:8013   {"component": "service"}
2024-10-14T20:19:51.428+0200    debug   grpc/grpc_sync.go:201   received full configuration payload     {"component": "sync", "sync": "grpc"}
2024-10-14T20:19:55.057+0200    debug   grpc/grpc_sync.go:201   received full configuration payload     {"component": "sync", "sync": "grpc"}
```

---------

Signed-off-by: Pradeep <pradeepbbl@gmail.com>
Signed-off-by: Matthew Wilson <54033231+wilson-matthew@users.noreply.github.com>
Co-authored-by: Matthew Wilson <54033231+wilson-matthew@users.noreply.github.com>
2024-10-28 15:34:59 -04:00
Matthew Wilson 5c39cfe30a
feat: support azure blob sync (#1428)
## This PR

- adds support for Azure Blob Storage sync

Signed-off-by: Matthew Wilson <54033231+wilson-matthew@users.noreply.github.com>
2024-10-23 16:15:31 -04:00
Matthew Wilson 8583f68893
docs: fix typo (#1419)
## This PR
Fixes a typo in `docs/reference/openfeature-operator/overview.md`

Signed-off-by: Matthew Wilson <54033231+wilson-matthew@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-10-10 11:05:55 -04:00
Pradeep Mishra f716423422
docs: update gRPC custom resolver rfc proposal (#1421)
Signed-off-by: Pradeep <pradeepbbl@gmail.com>
2024-10-09 08:39:39 -04:00
Pradeep Mishra fb76af5830
docs: added gRPC custom name resolver proposal (#1414)
## This PR
Added initial gRPC custom name resolver draft proposal


- new proposal doc to support gRPC over proxy

### Related Issues
TBD

---------

Signed-off-by: Pradeep Mishra <pradeep.mishra@booking.com>
Signed-off-by: Pradeep <pradeepbbl@gmail.com>
Signed-off-by: Pradeep Mishra <pradeepbbl@users.noreply.github.com>
Signed-off-by: Pradeep Mishra <pradeepbbl@gmail.com>
Co-authored-by: Pradeep Mishra <pradeep.mishra@booking.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-10-01 12:05:27 -04:00
Kevin Schoonover 8737f53444
feat: add mTLS support to otel exporter (#1389)
## This PR

The OpenTelemetry collectors in my production environment are configured
to use TLS for uploading metrics / traces so this PR aims to

- add the ability to use mTLS + self-signed certificates when exporting
to the opentelemetry collector

This is the 'quick and dirty' approach so wanted to make an initial PR
to make sure the high level implementation is the approach you're
looking for.

### Follow-up Tasks
- [ ] update the documentation when this approach is approved

### How to test
I am struggling to figure out how to test this with self signed
certificates to give a specific set of commands you can run because the
TLS connection is never successful (assuming this is because of my
commands)
```bash
openssl req -x509 -newkey rsa:4096 -keyout ca.key.pem -out ca.cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost"

openssl req -x509 -newkey rsa:4096 -keyout client.key.pem -out client.cert.pem -CA ca.cert.pem -CAkey ca.key.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost" -addext "subjectAltName = IP:127.0.0.1"
openssl req -x509 -newkey rsa:4096 -keyout server.key.pem -out server.cert.pem -CA ca.cert.pem -CAkey ca.key.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost" -addext "subjectAltName = IP:127.0.0.1"
```


; however, when I pull certificates from my production environment to
test this works

---------

Signed-off-by: Kevin Schoonover <me@kschoon.me>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-09-23 08:16:42 -04:00
Dave Josephsen 61fff43e28
feat: add 'watcher' interface to file sync (#1365)
Implement fsnotify and `os.Stat` based watchers

fixes: #1344

<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->

## This PR
Intent of this PR is to begin a conversation about fixing #1344. The
approach taken is to replace the current use of `fsontify.Watcher` with
a local `Watcher` interface type that describes the `fsnotify.Watcher`
interface.

My original take was to use fsnotify.Watcher directly as an
implementation of local `Watcher`, but fsnotify's Watcher directly
exposes its Error and Event channels, making it impossible to describe
with an interface, so I had to create a small wrapper for
`fsnotify.Watcher` to satisfy the new Watcher interface (this is
fsnotify_watcher.go). From there, we implement the `Watcher` interface
again, this time using `os.Stat` and `fs.FileInfo` (this is
fileinfo_watcher.go).

Then we change the filepath sync code to use an interface to Watcher,
rather than fsnotify.Watcher directly. The new fileinfo watcher plugs
right in, and nothing really needs to change in the sync.

* I have not wired up configs, so the fileinfo watcher has a hard-coded
1-second polling interval, and there is no current means of selecting
between them.
* I've added a couple tests, to demonstrate how unit tests would work in
general (we use a configurable os-stat func in the fileinfo watcher,
which can be mocked for tests)
* I don't have a way of testing this on Windows. I'm vaguely aware
there's an upstream issue in package `fs` that may require some
work-around boilerplate to make this work on windows at the moment.

If yall are favorable to this approach, I'll finish wiring up configs,
and flesh out the tests. I didn't want to go much further without some
buy-in or feedback.

### Related Issues

Fixes #1344 

### Notes
See bullet-points above

### How to test
go test -v ./...

---------

Signed-off-by: Dave Josephsen <dave.josephsen@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-08-22 14:02:31 -04:00
Michael Beemer 871c7497e9
docs: add note about metric name transformation (#1374)
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-08-19 12:38:02 -04:00
Alan Kutniewski 21f2c9a5d6
feat: Support blob type sources and GCS as an example of such source. (#1366)
Signed-off-by: Alan Kutniewski <kutniewski@google.com>
2024-07-30 12:31:44 -04:00
Kavindu Dodanduwa 1fe0eac1dc
chore: update otel example configurations (#1370)
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
2024-07-30 11:28:15 -04:00
Pradeep Mishra bed077bac9
feat: added new grpc sync config option to allow setting max receive message size. (#1358)
## This PR
Added a new config option `maxMsgSize` which will
allow users to override default message size 4Mb.

- allow override default max message size 4Mb

### Related Issues

Fixes #1357 

### How to test
To test this feature you need a flag source with large number of flags >
4Mb, e.g. below we are running with max size of 5Mb+
 
```
./flagd start --port 8013 --sync-port 8017 --sources='[{"uri": "localhost:8015", "provider": "grpc", "tls": false, "providerID": "flagd-sidecar", "selector": "all-flags", "maxMsgSize": 5728474}]'

		 ______   __       ________   _______    ______
		/_____/\ /_/\     /_______/\ /______/\  /_____/\
		\::::_\/_\:\ \    \::: _  \ \\::::__\/__\:::_ \ \
		 \:\/___/\\:\ \    \::(_)  \ \\:\ /____/\\:\ \ \ \
		  \:::._\/ \:\ \____\:: __  \ \\:\\_  _\/ \:\ \ \ \
		   \:\ \    \:\/___/\\:.\ \  \ \\:\_\ \ \  \:\/.:| |
		    \_\/     \_____\/ \__\/\__\/ \_____\/   \____/_/

2024-07-11T11:31:57.024+0200	info	cmd/start.go:107	flagd version: dev (da01e08), built at: 2024-07-11T11:14:44Z	{"component": "start"}
2024-07-11T11:31:57.026+0200	info	flag-sync/sync_service.go:54	starting flag sync service on port 8017	{"component": "FlagSyncService"}
2024-07-11T11:31:57.027+0200	info	grpc/grpc_sync.go:70	setting max receive message size 5728474 bytes default 4MB	{"component": "sync", "sync": "grpc"}

```

---------

Signed-off-by: Pradeep Mishra <pradeepbbl@gmail.com>
Signed-off-by: pradeepbbl <pradeepbbl@gmail.com>
Signed-off-by: Pradeep Mishra <pradeepbbl@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-07-12 08:16:40 -07:00
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