Git Configuration store component ( v1.19)#5159
Conversation
Signed-off-by: Casper Nielsen <casper@diagrid.io>
sicoyle
left a comment
There was a problem hiding this comment.
few comments so far - thank you!!
| since: "1.18" No newline at end of file | ||
| since: "1.18" | ||
| - component: Git | ||
| link: git-configuration-store |
There was a problem hiding this comment.
pls update the configuration table too with this new comp
There was a problem hiding this comment.
I'm not sure which table that is?
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
sicoyle
left a comment
There was a problem hiding this comment.
few questions/comments from me :)
| | `path` | N | Subdirectory inside the repository to treat as the configuration root. Files outside this directory are not surfaced. Must be repo-relative (no leading `/`, no `..` components, no segment equal to `.git`). | `"agents/weather"`, `"."` (default) | | ||
| | `depth` | N | Clone depth. `0` (default) performs a full clone. `go-git`'s shallow incremental fetch has known limitations; full clones are the safe choice for anything but trivial config repos. | `"0"` (default) | | ||
| | `pollInterval` | N | How often to poll the upstream for changes. Hard floor is `1s` for remote URLs; `file://` URLs may go down to `100ms`. Intervals below `5s` log a warning at startup. At the default `5m`, a single instance issues 12 requests/h — well below GitHub's 5000/h PAT and 15000/h GitHub App limits, with plenty of headroom for multi-replica deployments. | `"5m"` (default) | | ||
| | `rateLimitRetryAfter` | N | How long the poll loop pauses before its next tick after the upstream responds with a rate-limit error and no `Retry-After` header was supplied. Tune this if you're hitting secondary rate limits on a busy multi-replica deployment. | `"5m"` (default) | |
There was a problem hiding this comment.
| | `rateLimitRetryAfter` | N | How long the poll loop pauses before its next tick after the upstream responds with a rate-limit error and no `Retry-After` header was supplied. Tune this if you're hitting secondary rate limits on a busy multi-replica deployment. | `"5m"` (default) | | |
| | `rateLimitRetryAfterInterval` | N | How long the poll loop pauses before its next tick after the upstream responds with a rate-limit error and no `Retry-After` header was supplied. Tune this if you're hitting secondary rate limits on a busy multi-replica deployment. | `"5m"` (default) | |
There was a problem hiding this comment.
pls update contrib with this too 🙏
| | `maxFileSize` | N | Maximum per-file size in bytes that the walker will read into memory. Files larger than this are skipped with a warning. Protects the sidecar from OOM if a large blob is accidentally committed. | `"1048576"` (1 MiB default) | | ||
| | `snapshotCacheSize` | N | Number of past snapshots to retain in the LRU cache used as diff bases when computing per-subscriber update events. Higher values reduce over-emit churn when many subscribers are at slightly different commit positions. | `"4"` (default) | | ||
| | `emitInitialState` | N | When `true` (default), `Subscribe` synchronously delivers the current snapshot to the handler before returning — callers don't need a separate `Get` + `Subscribe` pair. Set to `false` if the caller already has fresh state and would receive a duplicate. | `"true"` (default) | | ||
| | `mappingMode` | N | Strategy for mapping repository files to configuration items. Matching is case-insensitive. See [Mapping modes](#mapping-modes). | `"file"` (default), `"agentYaml"`, `"prompty"` | |
There was a problem hiding this comment.
how does this work if someone changes their mappingMode with an update?
|
|
||
| ## Mapping modes | ||
|
|
||
| The `mappingMode` field selects how files in the repository become configuration items. Matching is case-insensitive. Under `agentYaml` and `prompty`, **any file in scope with an unrecognised extension causes `Init` to fail** — narrow `path` to a homogeneous subdirectory or use `mappingMode: file` for mixed content. |
There was a problem hiding this comment.
I think the rest of the dapr docs take the American spelling on things, so organisations above should be organizations pls and same for unrecognised to unrecognized 😅 🙃 🙏
| ### `agentYaml` | ||
|
|
||
| Accepted file extensions: `*.yaml`, `*.yml`, `*.json`. Any other file in scope (including `*.toml`) causes `Init` to fail. | ||
|
|
||
| Each accepted file is parsed as a flat top-level map. Each top-level field becomes a key prefixed by the filename stem with directory separators replaced by `_`. | ||
|
|
||
| ```yaml | ||
| # repo/agents/weather.yaml | ||
| agent_role: Weather expert | ||
| agent_goal: Help users plan trips | ||
| agent_instructions: | ||
| - be concise | ||
| - cite sources | ||
| ``` |
There was a problem hiding this comment.
is there a way to exclude files too? Like if someone has their agent yaml config in the same repo as deploy config files that they dont want to wait for to be downloaded, etc? Or if they use a monorepo with some agents from one team in a certain directory, and so forth.
Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:
In addition, please fill out the following to help reviewers understand this pull request:
Description
Document
gitasconfiguration-store as per dapr/components-contrib#4380Issue reference
N/A