feat(domain-config): Add resolution layer - #1199
Merged
Merged
Conversation
Add the layer that builds a domain's effective stored configuration by merging the two sources with precedence: the per-domain files (the "fs" driver) first, then the database (the "sql" driver), which wins option by option. The layer is gated by two new [identity] switches, matching python-keystone: domain_specific_drivers_enabled (default false) consults the file source, domain_configurations_from_database (default true) consults the database source. DomainConfig::overlay merges one configuration onto another at the option level. DomainConfigResolver consults each enabled backend and stacks the results; it returns the raw, still-serializable DomainConfig the config API serves, leaving %(option)s substitution and the global-section overlay to the caller. The resolver is wired into Provider (built in Provider::new, exposed via get_domain_config_resolver) and PluginManager gains a domain_config_backends registry, but nothing consumes it at runtime yet. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
The plugin-manager test built a full PluginManager from the default config, which fails in CI because that path loads on-disk fernet keys that a default config does not provide. Exercise register_backends directly on a domain-config-typed map instead: it proves both the fs and sql sources register, without pulling in the token drivers. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
gtema
enabled auto-merge
September 3, 2026 17:31
|
| Project | keystone |
| Branch | feat/domain-config-resolution |
| Testbed | ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) |
|---|---|---|---|
| Command_Serde/apply/remove | 📈 view plot 🚷 view threshold | 135,370.00 ns(-53.06%)Baseline: 288,385.55 ns | 1,535,950.07 ns (8.81%) |
| Command_Serde/apply/set | 📈 view plot 🚷 view threshold | 148,660.00 ns(-58.04%)Baseline: 354,253.34 ns | 2,361,901.08 ns (6.29%) |
| Command_Serde/pack/delete | 📈 view plot 🚷 view threshold | 128.93 ns(+8.86%)Baseline: 118.43 ns | 155.30 ns (83.02%) |
| Command_Serde/pack/delete_index | 📈 view plot 🚷 view threshold | 108.61 ns(+2.80%)Baseline: 105.65 ns | 139.02 ns (78.13%) |
| Command_Serde/pack/set | 📈 view plot 🚷 view threshold | 204.10 ns(+7.63%)Baseline: 189.62 ns | 244.75 ns (83.39%) |
| Command_Serde/pack/set_index | 📈 view plot 🚷 view threshold | 108.92 ns(+3.08%)Baseline: 105.67 ns | 139.28 ns (78.20%) |
| Command_Serde/unpack/delete | 📈 view plot 🚷 view threshold | 196.53 ns(+4.40%)Baseline: 188.25 ns | 268.72 ns (73.14%) |
| Command_Serde/unpack/delete_index | 📈 view plot 🚷 view threshold | 158.62 ns(+1.31%)Baseline: 156.56 ns | 217.54 ns (72.92%) |
| Command_Serde/unpack/set | 📈 view plot 🚷 view threshold | 294.76 ns(+13.09%)Baseline: 260.65 ns | 354.56 ns (83.13%) |
| Command_Serde/unpack/set_index | 📈 view plot 🚷 view threshold | 159.53 ns(+3.51%)Baseline: 154.12 ns | 211.72 ns (75.35%) |
| Payload_encryption/pack/remove_cmd | 📈 view plot 🚷 view threshold | 116.36 ns(+2.80%)Baseline: 113.19 ns | 149.23 ns (77.98%) |
| Payload_encryption/pack/set_cmd | 📈 view plot 🚷 view threshold | 195.17 ns(-1.08%)Baseline: 197.30 ns | 262.81 ns (74.26%) |
| Payload_encryption/unpack/remove_cmd | 📈 view plot 🚷 view threshold | 200.60 ns(+1.92%)Baseline: 196.83 ns | 282.07 ns (71.12%) |
| Payload_encryption/unpack/set_cmd | 📈 view plot 🚷 view threshold | 302.43 ns(+11.70%)Baseline: 270.76 ns | 373.05 ns (81.07%) |
| Raft_1Node_Latency/prefix/1node | 📈 view plot 🚷 view threshold | 2,570,700.00 ns(-15.66%)Baseline: 3,048,191.41 ns | 7,901,872.76 ns (32.53%) |
| Raft_1Node_Latency/read/1node | 📈 view plot 🚷 view threshold | 41,827.00 ns(+12.22%)Baseline: 37,271.61 ns | 51,541.38 ns (81.15%) |
| Raft_1Node_Latency/remove/1node | 📈 view plot 🚷 view threshold | 390,980.00 ns(-67.47%)Baseline: 1,201,849.53 ns | 11,516,328.35 ns (3.40%) |
| Raft_1Node_Latency/write/1node | 📈 view plot 🚷 view threshold | 412,460.00 ns(-52.43%)Baseline: 867,033.44 ns | 6,200,668.52 ns (6.65%) |
| build_snapshot/default | 📈 view plot 🚷 view threshold | 114,400.00 ns(-10.20%)Baseline: 127,399.11 ns | 289,922.30 ns (39.46%) |
| fernet token/project | 📈 view plot 🚷 view threshold | 1,509.20 ns(+5.50%)Baseline: 1,430.58 ns | 1,801.97 ns (83.75%) |
| get_data_keyspace | 📈 view plot 🚷 view threshold | 0.31 ns(-1.57%)Baseline: 0.32 ns | 0.39 ns (80.18%) |
| get_db | 📈 view plot 🚷 view threshold | 0.31 ns(-1.68%)Baseline: 0.32 ns | 0.39 ns (80.11%) |
| get_fernet_token_timestamp/project | 📈 view plot 🚷 view threshold | 153.15 ns(+9.60%)Baseline: 139.73 ns | 179.63 ns (85.26%) |
| get_keyspace | 📈 view plot 🚷 view threshold | 4.37 ns(-24.47%)Baseline: 5.78 ns | 13.45 ns (32.49%) |
|
🦢 Load Test Results Goose Attack ReportPlan Overview
Request Metrics
Response Time Metrics
Status Code Metrics
Transaction Metrics
Scenario Metrics
Error Metrics
|
|
🧪 Tempest Identity Compatibility Results (advisory, non-blocking) rust Failed test IDs |
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Phase 3 of #954 (tracked as #958): the layer in
crates/core/that builds adomain's effective stored configuration by merging the two sources with
precedence.
DomainConfig::overlay/overlaid_with(core-types) — merge oneconfiguration onto another option by option: an option the overlay sets wins,
an option only the base sets is kept, a group on one side only is taken whole.
DomainConfigResolver(core/src/domain_config/resolver.rs) — consultsthe
fsdriver first, then thesqldriver (which overrides option byoption), each gated by a switch. Returns the raw, still-serializable
DomainConfigthe config API serves;%(option)ssubstitution and theglobal
[identity]/[ldap]overlay are left to the caller (Phase 5, Phase 5: Wire domain config into identity driver selection #960),since those steps inline secrets.
[identity]switches, matching python-keystone:domain_specific_drivers_enabled(defaultfalse) — consult the file sourcedomain_configurations_from_database(defaulttrue) — consult the DB sourcePluginManagergains adomain_config_backendsregistry and aget_domain_config_backend(name)accessor;Providerbuilds the resolver inProvider::newand exposes it viaget_domain_config_resolver.Not in scope
Nothing consumes the resolver at runtime yet — same posture as the #956/#957
drivers. API handlers are #959; identity-driver dispatch is #960.
Tests
core-types—overlaymodule: DB-wins-per-option, file-only-option-kept,single-side-group-whole, sensitive option, empty overlay. Anti-drift
every_configurable_option_is_an_option_of_the_config_sectionstays green.core—domain_config::resolver: no source, disabled, file-only, db-only,db-overrides-file,
Ok(None)contributes nothing, error propagates.keystone—plugin_manager: bothfsandsqlregister; unknown name →UnsupportedDriver.cargo fmt --all -- --check,cargo build -p openstack-keystone,cargo clippyoncore-types/configclean.