feat: add tenant-rooted storage layout behind a setting #1863 - #1867
Closed
DmytroZaichenkoDev wants to merge 1 commit into
Closed
DmytroZaichenkoDev wants to merge 1 commit into
DmytroZaichenkoDev wants to merge 1 commit into
Conversation
Adds the tenant-rooted StorageLayout and selects the layout at start-up from storageLayout.tenantRooted, which defaults to false, so physical paths are unchanged unless a deployment opts in. The active layout is process-wide: ResourceDescriptor is constructed everywhere and carries no configuration of its own. AiDial sets it unconditionally on every start so the layout is fully determined by settings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Folded into #1866 — the layout change now arrives complete (conversion, seam, implementation, setting) rather than split across two PRs where the first had no caller. |
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.
Part 2 of 4 for #1863. Stack: layout seam → this → secret AAD → end-to-end test.
What
Adds the tenant-rooted layout and selects the active layout at start-up.
TenantRootedStorageLayout— the first consumer of part 1's conversion.StorageLayouts— holds the layout in force.AiDialchooses it from the newstorageLayoutsettings section.Invariant
Off by default, so physical paths are unchanged unless a deployment opts in. Documented in
README.mdalongside the otherstorage.*settings.Notes for review
ResourceDescriptoris constructed in ~63 files and carries no configuration, so there is nowhere else to put it without changing every construction site. Open to alternatives.AiDialsets the layout unconditionally on every start, including the legacy case, so the layout is always determined by settings rather than inherited from a previousstart()in the same JVM —start()is@VisibleForTestingand runs repeatedly under test.storageLayoutis a new top-level section rather than a field onstorage:Storageis jclouds provider configuration, this is a logical concern. It is deliberately static settings, not hot-reloaded config.defaultTenantdefaults to"default". That string becomes a physical path segment, so it is worth an explicit decision.Not included
There is no migration behind this flag. Enabling it against populated storage re-addresses everything and the existing data is not reachable at the new paths. The README says so; a start-up guard that refuses to enable it when legacy data is present would be a reasonable follow-up.