Describe the bug
The global config file (~/.vmware-aria-operations-integration-sdk/config.json) is updated with a read-then-write pattern: the file is opened for writing (which truncates it) and then the new contents are written. If the process is interrupted (e.g. Ctrl-C) after the file is truncated but before the write finishes, the config file can be left empty or partially written. That can cause commands like mp-build to fail until the config is restored or recreated.
We should be able to address this by writing to a temp file and atomically replacing the original.
Reproduction steps
- Run mp-build
- Cancel during the config file re-write
Expected behavior
Config file should be preserved
Additional context
No response