settings: generalize user-customizable env variable names (fixes #93)#135
settings: generalize user-customizable env variable names (fixes #93)#135Kunal-Darekar wants to merge 1 commit intom-lab:mainfrom
Conversation
…evice_metadata1/device_metadata2 (issue m-lab#93) The three user-facing env variables MURAKAMI_SETTINGS_LOCATION, MURAKAMI_SETTINGS_NETWORK_TYPE, and MURAKAMI_SETTINGS_CONNECTION_TYPE were too specific for general use. This renames them to MURAKAMI_SETTINGS_DEVICE_ID, MURAKAMI_SETTINGS_DEVICE_METADATA1, and MURAKAMI_SETTINGS_DEVICE_METADATA2 so users can define them based on their own measurement context rather than being locked into the location/network/connection framing. The rename cascades from the CLI args in __main__.py through server.py, the base runner and exporter classes, all runner and exporter subclasses (which embed these values in their JSON output), the config examples, the Balena setup script, and the relevant docs. AI Assistance Disclosure: GitHub Copilot was used to assist in writing this change. All output was reviewed and verified by the contributor.
|
Hi @Kunal-Darekar, thanks for the PR and for the AI disclosure. However, there are some fundamental issues here:
Closing this PR. If you're interested in working on any issues, please start a discussion on the issue with your proposed approach (to be clear, I recommend using no AI at all for the discussion phase) before writing code. |
Fixes #93
The three env variables MURAKAMI_SETTINGS_LOCATION,
MURAKAMI_SETTINGS_NETWORK_TYPE, and MURAKAMI_SETTINGS_CONNECTION_TYPE
were named around a specific use case (physical location + ISP setup).
That made them confusing for users measuring something different, like
comparing networks across sites or tracking device-specific context.
Renamed to:
These names are neutral enough to work for any measurement scenario.
The rename starts at the CLI args in main.py (configargparse
auto-derives env var names from arg names, so renaming the arg is all
that's needed to change the env var). From there it cascades into
server.py, the base MurakamiRunner and MurakamiExporter classes, all
runner and exporter subclasses (which embed these values in their JSON
output as MurakamiDeviceID, MurakamiDeviceMetadata1,
MurakamiDeviceMetadata2), the config examples, the Balena provisioning
script, and the relevant docs.
All existing tests pass.
AI Assistance Disclosure: GitHub Copilot was used to help write
parts of this change. I've reviewed every line and understand what it
does.
This change is