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

[flagd] Add targeting validation and log warning #226

Open
toddbaert opened this issue Jul 4, 2024 · 0 comments
Open

[flagd] Add targeting validation and log warning #226

toddbaert opened this issue Jul 4, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@toddbaert
Copy link
Member

toddbaert commented Jul 4, 2024

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.

@toddbaert toddbaert added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jul 4, 2024
@toddbaert toddbaert changed the title [flagd] [flagd] Add targeting validation and log warning Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant