Skip to content

Flexible runtime config handling - #3017

Merged
schaefi merged 3 commits into
mainfrom
flexible_runtime_config_handling
Sep 9, 2026
Merged

schaefi merged 3 commits into
mainfrom
flexible_runtime_config_handling

Conversation

@schaefi

@schaefi schaefi commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

This refactor is two fold

Refactor runtime config layout style

The runtime config file nested key=value settings into lists like this [{key1=value1}, {key2=value2}]. This layout style is unnecessary complex and also makes it hard to implement a straight forward merge strategy for standard data types. This commit refactors the layout to the necessary data structure.

Refactor merge strategy for runtime config files

So far the runtime config dicts after yaml.safe_load were merged together via python's dict.update() method. However, in kiwi the runtime config contains nested dictionaries and lists which always causes an overwrite and does not allow for add-on settings of the same configuration key. This commit adds a recursive merge strategy to make this more flexible. This is related to Issue #3014

@schaefi
schaefi requested a review from Conan-Kudo July 3, 2026 09:10
@schaefi schaefi self-assigned this Jul 3, 2026
@schaefi schaefi added the kiwi-11 label Jul 3, 2026
@schaefi
schaefi force-pushed the flexible_runtime_config_handling branch from c40aa3f to 31b9075 Compare July 3, 2026 09:17
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed as part of the community meeting.

@github-actions github-actions Bot added the stale label Sep 4, 2026
@schaefi schaefi removed the stale label Sep 4, 2026
@schaefi
schaefi force-pushed the flexible_runtime_config_handling branch from 31b9075 to 159660e Compare September 8, 2026 13:06
@schaefi
schaefi marked this pull request as ready for review September 8, 2026 13:06
The runtime config file nested key=value settings
into lists like this [{key1=value1}, {key2=value2}].
This layout style is unnecessary complex and also
makes it hard to implement a straight forward merge
strategy for standard data types. This commit
refactors the layout to the necessary data structure.
So far the runtime config dicts after yaml.safe_load were merged
together via python's dict.update() method. However, in kiwi the
runtime config contains nested dictionaries and lists which
always causes an overwrite and does not allow for add-on settings
of the same configuration key. This commit adds a recursive merge
strategy to make this more flexible. This is related
to Issue #3014
Several build tests uses a custom kiwi settings file. These
files needs to be adapted to the new layout
@schaefi
schaefi force-pushed the flexible_runtime_config_handling branch from 159660e to 0eb2c05 Compare September 9, 2026 09:10
@schaefi
schaefi merged commit 446e2d8 into main Sep 9, 2026
12 checks passed
@schaefi
schaefi deleted the flexible_runtime_config_handling branch September 9, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant