kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Environment variables and configuration flags for Kolibri options are persisted to the `options.ini` file by `generate_empty_options_file`

Open rtibbles opened this issue 3 years ago • 0 comments

Observed behavior

When using either environment variables or configuration flags like --port or --debug on the first run of a Kolibri device, these will be written to the empty options.ini file generated by generate_empty_options_file - this means that settings chosen on the first run by ephemeral configuration like environment variables and runtime flags will be persisted for subsequent runs of the server.

Expected behavior

Ephemeral configuration should not be persisted to disk.

User-facing consequences

The main place this could be problematic is if someone is using a base Kolibri to generate a KOLIBRI_HOME image and they do not intend their configuration flags to be persisted.

Additionally, Kolibri developers might be confused why flags are being persisted when they shouldn't.

Steps to reproduce

Run kolibri with a new KOLIBRI_HOME directory. Run with the --debug flag.

See that options.ini contains an uncommented line DEBUG = True

Context

Tell us about your environment, including:

  • Kolibri version: 0.15.5
  • Operating system: Ubuntu

rtibbles avatar Jul 06 '22 17:07 rtibbles