Description
No existing issues.
- There is no existing issue for my problem.
Description
As discussed here https://t.me/ioBroker_development/38316 the follwoing behavior of merging io-package.json context is not optimal.
When updating an adapter the object system.adapter.<name>
contains the common data as delivered by the actual io-package.json. This is OK and expected,
BUT common data at instance objetcs (system.adapter.<name>.0
) congtains unexpected data. This object contains still previous outdated data and the new data appended at the end.
According to @Apollon77 theres some merging logiuc implements as some fields must not be changed by an update (i.e. schedule setting, titleLang, ...). BUT I would stonly suggest to remove outdated entriy no longer available at current io-package.json. As a new instance will not provide them no code should try to access them anyway. And a co mon structire containing outdated and new data is more likely to habe sideeffects. As an example there could be a license and licensInformatio n with different content. As this will be most likely no serious problem a materialize and an adminUI Entry with differing options could cause problems in future (I know this is handled by migration code for now).
In general detectings a problem by such a configuration could be hard to detect as a new and an older instance could behave different dur to differnet content of common object. And most likely no one will assume such a situation at first glance.
So please consider cleaning up instance objects during update.
Reproduction instruction
No response
JS-controller version
up to 6.x.x
Node version
n/a (tested with node 18)