bottlerocket-os / bottlerocket-os/twoliter

Feature Request: Add "inheritance" mechanism between variants

Open
#645 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
34
Forks
43
Avg merge
11h 13m
Merged PRs (30d)
16

Description

**Problem Description:**
We currently maintain a large set of Variants which have the same configuration:
lib, build-dependencies and kernel-parameters are identical whereas included-packages differs slightly between variants.

Our structure is more or less as follows:
VariantA -- (+ ssh) --> Variant A Dev
VariantA -- (+ device drivers) --> Variant B
VariantB -- (+ ssh) --> Variant B Dev

It would be nice to be able to define the variant in this sort of hierarchical way to reduce code duplication and chances of things drifting apart.

**Proposal**
A new tag could be introduced to specify the parent variant.

In the simplest iteration, the behaviour could be that all non-specified sections from the parent variant are inherited as-is, while anything that gets specified gets overridden.

A more useful implementation would allow to extend lists and modify specific settings instead of entire sections.

Contributor guide

Open the contributing guide

Research direction

Start by locating the variant configuration parsing and resolution entry points; the issue names no files or tests. Define how a parent variant is selected, which sections inherit or override, and whether lists can be extended. Done means hierarchical variants reduce duplicated configuration without changing existing standalone variant behavior, with coverage for the inheritance rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.