eclipse-opendut / opendut

Test Electronic Control Units around the world in a transparent network.
https://opendut.eclipse.dev
Apache License 2.0
23 stars 13 forks source link

EDGAR: Write configuration prevents EDGAR to start if there are other properties already configured. #220

Open mtwardawski opened 4 months ago

mtwardawski commented 4 months ago

Right now we are setting some configuration in the edgar.toml when we provide a setup string. (opendut-edgar/src/setup/tasks/write_configuration.rs)

If there is already an edgar.toml at that location, we cannot start EDGAR without getting a hint for a merged toml file, but as far we could observe, this toml file does not contain other variables which were already in that existing toml file and we might need to get EDGAR properly running.

AC:

mbfm commented 4 months ago

We use the toml_edit crate during Setup to make as minimal changes to the existing configuration on disk as possible. If no changes had to be made to the existing configuration, then it should match verbatim to what's on disk, which we detect and then EDGAR should continue the Setup:

https://github.com/eclipse-opendut/opendut/blob/4bbccce16e5136f2e6cc8401bec5810a5f92f9a1/opendut-edgar/src/setup/tasks/write_configuration.rs#L94-L97

It's possible that toml_edit isn't quite as precise here. Do you have the error message from when this happened, or steps to reproduce it?