[flagd] Add targeting validation and log warning #226
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
The Go/in-process, Java/in-process, and JS/in-process and standalone versions of flagd log a warning message with invalid targeting rules when they are fetched. We should implement this in the dotnet provider
Targeting rules can be validated with the flags.json schema in conjunction with the targeting.json schema. Both will have to be loaded into a validator library to fully validate. See similar examples in Go and Java
The in-process provider should be modified to use both of these schemas, and validate against them, only logging a warning if validation fails. Only a failure to parse the definition into a FeatureFlag instance should cause an abortive error.
Logging should be done with the generic
Microsoft.Extensions.Logging.Abstractions
package.The text was updated successfully, but these errors were encountered: