You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Imported configuration values set via apply_default() are not recognized as modified, causing fallback to defaults during import #1110
When importing a Malcolm configuration file using install.py (e.g., with --import-malcolm-config-file), the configuration items present in the file are read and values are set via the apply_default() method in MalcolmConfig. However, these values are not marked as modified internally.
As a result, the import process treats these keys as missing and falls back to default values, logging warnings such as:
Configuration item not found in settings file, using default:
This behavior occurs even when importing a freshly exported default configuration file without any changes.
Steps to Reproduce:
Export the default configuration file using:
python3 ./scripts/install.py --export-malcolm-config-file default.json
Import the same file back with debug enabled:
python3 ./scripts/install.py --configure --non-interactive --import-malcolm-config-file default.json --debug
Observe warnings about configuration items not found and usage of defaults, despite the keys being present.
Expected Behavior:
Imported configuration values should be recognized as user-supplied (i.e., marked as modified) and not treated as missing or defaulted.
Root Cause (suggested):
The import code calls MalcolmConfig.apply_default(key, value) to set imported values, which does not mark the configuration items as modified. Instead, it should use a method like MalcolmConfig.set_value(key, value) that flags the keys as modified.
Suggested Fix:
Change the import logic to use set_value() (or equivalent) instead of apply_default() when applying user-imported configuration values.
I'll have to talk to you about this, I use import-malcolm-config-file constantly and it imports the keys as I'd expect. Maybe the initial state you're starting from is different than mine.
Activity
mmguero commentedon Sep 2, 2026
I'll have to talk to you about this, I use import-malcolm-config-file constantly and it imports the keys as I'd expect. Maybe the initial state you're starting from is different than mine.