Replace old protection settings with the new persistent config description abstraction #66
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.
When we decided to go with the config recovery in the safe mode work the-draupnir-project/planning#1, we also decided we would unify the wrappers used for all persistent config to be based on a system that leveraged TypeBox to provide us with schema. So this PR replaces
ProtectionSettings
with the newConfigDescription
system. This branch was written and linked with the work to migrate draupnir's protection's to the new system too.This slightly longer because the types are not liberal enough in what they accept when they are describing interfaces. This is a general bitch throughout the code base and I don't really know how to address it yet.
Basically we need to allow interfaces for things like the methods on the
ConfigMirror
to accept arguments liberally. But the implementation needs to be as defensive asunknown
etc. It's my fault for not really understanding variance properly.There was also an issue where the command reader from Draupnir's interface-manager produced objects that are different to the transform types in the
ConfigDescription
schema. So we had to update theConfigMirror
to accept serialized representations of values as a workaround. Not a big deal but it's a thing.Aside from that I've been at a low point these past weeks.
the-draupnir-project/planning#35