Skip to content

Commit

Permalink
chore: bump flagd-core in playground, add metadata example, fix doc l…
Browse files Browse the repository at this point in the history
…inks

Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
  • Loading branch information
beeme1mr committed Jan 7, 2025
1 parent b2471b8 commit 9891df2
Show file tree
Hide file tree
Showing 16 changed files with 1,079 additions and 3,359 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
url = https://github.com/open-feature/spec.git
[submodule "schemas"]
path = schemas
url = https://github.com/open-feature/schemas.git
url = https://github.com/open-feature/flagd-schemas.git
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ update-public-schema: pull-schemas-submodule

.PHONY: run-web-docs
run-web-docs: generate-docs generate-proto-docs
docker build -t squidfunk/mkdocs-material . \
&& docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
docker build -t flag-docs:latest . --load \
&& docker run --rm -it -p 8000:8000 -v ${PWD}:/docs flag-docs:latest

# Run the playground app in dev mode
# See the readme in the playground-app folder for more details
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ erDiagram

### In-Process evaluation

In-process deployments embed the flagd evaluation engine directly into the client application through the use of an [in-process provider](./installation.md#in-process).
In-process deployments embed the flagd evaluation engine directly into the client application through the use of an [in-process provider](./providers/index.md).
The in-process provider is connected via the sync protocol to an implementing [gRPC service](./concepts/syncs.md#grpc-sync) that provides the flag definitions.
You can use flagd as a [gRPC sync service](./reference/grpc-sync-service.md).
In this mode, the flag sync stream will expose aggregated flag configurations currently configured through [syncs](./concepts/syncs.md).
Expand Down
75 changes: 42 additions & 33 deletions docs/playground/playground.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/providers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ The following table lists all the available flagd providers.
| :simple-python: [Python](./python.md) | :material-check: | :material-close: |
| :material-web: [Web](./web.md) | :material-check: | :material-close: |

For information on implementing a flagd provider, see the specifications for [RPC](../reference/specifications/rpc-providers.md) and [in-process](../reference/specifications/in-process-providers.md) providers.
For information on implementing a flagd provider, see the [specification](../reference/specifications/providers.md).
1 change: 1 addition & 0 deletions docs/providers/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
{%
include "https://raw.githubusercontent.com/open-feature/python-sdk-contrib/main/providers/openfeature-provider-flagd/README.md"
start="## Installation"
end="## License"
%}
2 changes: 1 addition & 1 deletion docs/reference/flag-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Example of an invalid configuration:
`targeting` is an **optional** property.
A targeting rule **must** be valid JSON.
Flagd uses a modified version of [JsonLogic](https://jsonlogic.com/), as well as some custom pre-processing, to evaluate these rules.
If no targeting rules are defined, the response reason will always be `STATIC`, this allows for the flag values to be cached, this behavior is described [here](specifications/rpc-providers.md#caching).
If no targeting rules are defined, the response reason will always be `STATIC`, this allows for the flag values to be cached, this behavior is described [here](specifications/providers.md#flag-evaluation-caching).

#### Variants Returned From Targeting Rules

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/specifications/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Consistent with our [naming conventions](../naming.md), the flagd provider name

There are two modes of operation (`resolvers`) for flagd providers; _in-process_ and _RPC_.
Both modes have their advantages and disadvantages.
For more information on the architectural implications of these different modes, see the [RPC vs In-Process Evaluation](/architecture/#rpc-vs-in-process-evaluation) page.
For more information on the architectural implications of these different modes, see the [RPC vs In-Process Evaluation](../../architecture.md#rpc-vs-in-process-evaluation) page.

## flagd Provider Lifecycle

Expand Down
32 changes: 32 additions & 0 deletions docs/schema/v0/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@
"$ref": "./targeting.json"
}
}
},
"metadata": {
"title": "Flag Set Metadata",
"description": "Metadata about the flag set, with keys of type string, and values of type boolean, string, or number.",
"properties": {
"flagSetId": {
"description": "The unique identifier for the flag set.",
"type": "string"
},
"version": {
"description": "The version of the flag set.",
"type": "string"
}
},
"$ref": "#/definitions/metadata"
}
},
"definitions": {
Expand All @@ -72,6 +87,11 @@
},
"targeting": {
"$ref": "./targeting.json"
},
"metadata": {
"title": "Flag Metadata",
"description": "Metadata about an individual feature flag, with keys of type string, and values of type boolean, string, or number.",
"$ref": "#/definitions/metadata"
}
},
"required": [
Expand Down Expand Up @@ -179,6 +199,18 @@
"$ref": "#/definitions/objectVariants"
}
]
},
"metadata": {
"type": "object",
"additionalProperties": {
"description": "Any additional key/value pair with value of type boolean, string, or number.",
"type": [
"string",
"number",
"boolean"
]
},
"required": []
}
}
}
5 changes: 2 additions & 3 deletions docs/schema/v0/targeting.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,7 @@
}
},
"fractionalWeightArg": {
"$comment": "if we remove the \"sum to 100\" restriction, update the descriptions below!",
"description": "Distribution for all possible variants, with their associated weighting out of 100.",
"description": "Distribution for all possible variants, with their associated weighting.",
"type": "array",
"minItems": 1,
"maxItems": 2,
Expand All @@ -466,7 +465,7 @@
"type": "string"
},
{
"description": "Weighted distribution for this variant key (must sum to 100).",
"description": "Weighted distribution for this variant key.",
"type": "number"
}
]
Expand Down
Loading

0 comments on commit 9891df2

Please sign in to comment.