bottlerocket-os / bottlerocket-os/bottlerocket-settings-sdk

Expand `GenerateResult` type to include more context

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
5
Forks
36
Avg merge
4d 12h
Merged PRs (30d)
2

Description

When we generate settings in a settings extension, we provide two pieces of information:
* Any data that is already specified for the setting
* Any data that exists for other settings that this setting depends on for generation

The `GenerateResult` type returned from `SettingsModel::generate` provides back two pieces of information:
* Whether or not generation is complete
* The partial or complete data that has been set so far

Using this interface, the settings API repeatedly invokes settings generators until they are all complete. This works in most cases, but it does not provide a clear picture of what is wrong if something fails. It could also be more efficient.

DoD:
Change the settings generation interface such that:
* The generator knows whether or not its dependencies have completed their own generation
* If the generation is not complete, it can return "hints" pointing to specific settings that need to be generated first (this can direct the settings system to try and run these dependencies first, though it does not guarantee it).

Contributor guide

Open the contributing guide

Research direction

Start by reading the SettingsModel::generate interface and the GenerateResult type, then trace how the settings API repeatedly invokes generators. Define completion information for dependencies and the hint mechanism in the generation interface. Done means generators can report dependency status and point to settings that should be generated first.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.