diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f1ac33..3d98d12c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). --- +## v26.06.92 (2026-06-10) + +### Added / Fixed (config server backends — parity initiative SP-12) + +- **Git-backed config backend**: `GitConfigBackend` (new `pyfly[config-server-git]` extra, GitPython) clones a + config repo (works for local paths too), checks out a label/branch, and serves config from the working tree; + `save()` commits locally; all blocking git work runs off the event loop. Selectable via + `pyfly.config-server.backend.type=git` (+ `.git.uri`/`.git.label`), with a graceful filesystem fallback when + GitPython is absent. +- **Tiered search-locations overlay**: `FilesystemConfigBackend(root, search_locations=[...])` merges matching + config across multiple base directories (a common/core/domain convention — highest precedence first), wired + via `pyfly.config-server.backend.search-locations`. Single-root behavior is unchanged. +- **ConfigClient real e2e test**: `ConfigClient` now accepts an injectable `http_client`, enabling a true + round-trip test through `httpx.ASGITransport` → the Starlette config-server routes → backend, asserting the + reverse-merge precedence (app+profile overrides application+default; inherited keys survive). +- **Fixes**: wired the backend-selection logic into the auto-config bean (it was previously dead code, so + `backend.type`/`search-locations` were silently ignored); cleaned up the Git clone tempdir (atexit) and + guarded concurrent clone with a lock; corrected an over-promising docstring/doc that implied shipped + Consul/Vault backends. Docs updated. + ## v26.06.91 (2026-06-10) ### Added (plugins parity — parity initiative SP-11) diff --git a/README.md b/README.md index 7d5ec000..eebf9a0b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Firefly Framework Python 3.12+ License: Apache 2.0 - Version: 26.06.91 + Version: 26.06.92 Type Checked: mypy strict Code Style: Ruff Async First diff --git a/docs/modules/config-server.md b/docs/modules/config-server.md index 5061099d..52ba6a29 100644 --- a/docs/modules/config-server.md +++ b/docs/modules/config-server.md @@ -11,6 +11,11 @@ client services over HTTP. 1. [Introduction](#introduction) 2. [ConfigSource](#configsource) 3. [Backends](#backends) + - [InMemoryConfigBackend](#inmemoryconfigbackend) + - [FilesystemConfigBackend](#filesystemconfigbackend) + - [Tiered search locations](#tiered-search-locations) + - [GitConfigBackend](#gitconfigbackend) + - [Custom backends](#custom-backends) 4. [ConfigServer](#configserver) 5. [ConfigClient](#configclient) @@ -74,6 +79,12 @@ backend = InMemoryConfigBackend() # great for tests backend = FilesystemConfigBackend("/etc/pyfly") # reads/writes files ``` +### InMemoryConfigBackend + +Dict-backed, thread-safe via `asyncio.Lock`. Ideal for unit tests. + +### FilesystemConfigBackend + **`FilesystemConfigBackend`** stores each bundle as `/