Repository navigation
feat: a deployment's tables and their wiring, written down - #35
Closed
AlexeyShalaev wants to merge 1 commit into
Closed
AlexeyShalaev wants to merge 1 commit into
AlexeyShalaev wants to merge 1 commit into
Conversation
A deployment maintains several tables in one run and describes them in a file, not in Python. PartitionsDocument is that file as a model: the tables, the defaults they start from, and the runtime section that builds the collaborators -- with PartitionToolkit.from_options taking it directly. The fields a table entry takes are now one list, not two. PartitionTableSpec holds them and PartitionTableSettings reads that same model from the environment, so a field added once is available to a file and an environment alike. Unknown keys are refused wherever they appear, defaults included, where a typo would otherwise reach every table at once; so are a document with no tables and one relation described twice. Each of those is silent at 03:00 otherwise. Nothing here reads a file or opens a connection: parsing belongs to whoever owns the format.
Member
Author
|
Folded into #43, one PR for the whole epic; this branch stays for history. |
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.
Third piece of #32: the multi-table configuration the epic asks for.
PartitionsDocumentis every table a deployment maintains, plus the wiring it maintains them through, as one validated model — what a ConfigMap, a mounted YAML or a JSON blob parses into.configs()yields eachTablePartitionConfig,config_for(name)one of them, andPartitionToolkit.from_options(engine, document.runtime)builds the collaborators the file describes.The library still reads no files and opens no connections: parsing belongs to whoever owns the format.
On the "not a parallel model" requirement.
PartitionTableSettingsis aBaseSettingsfrom an optional extra, and nesting it as a list element makes env semantics strange. So the fields moved into a plainPartitionTableSpecin the core, andPartitionTableSettingsnow is that model with an environment as its source. One field list, not two — a field added once is available to a file and an environment alike. Its 24 existing tests pass untouched.ToolkitOptionsis theruntimesection, one field per keyword offrom_engine, withboundary_codecas a name resolved byto_kwargs().Refused, all for the same reason — each is silent at 03:00 otherwise:
defaults, where a typo would reach every table at once;defaultsmerges key by key and only at the top level: a table with its ownlifecyclereplaces the default one rather than half-inheriting a policy nobody can read off the file.Stacked on #34.