Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Instance common object contains outdated data no longer provided by io-package.json. #2812

Open
1 task done
mcm1957 opened this issue Jun 21, 2024 · 0 comments
Open
1 task done
Labels

Comments

@mcm1957
Copy link
Contributor

mcm1957 commented Jun 21, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant