Open lorenzo-stoakes opened 8 years ago
Can confirm that applicationId is still not changed in config.json
on device move, even when the target state reports the app under a different id. In the code, applicationId is set as an immutable data field.
[pdcastro] This issue has attached support thread https://jel.ly.fish/d530e774-0d99-4a90-9c6a-d8646495246b
I'm for removing it from config.json
, is not compatible with multi app, and I'm pretty sure is not used within the supervisor.
I would check with the rest of the OS team to see if they use it and remove it definitely if they don't
The field is also not documented so we should be able to remove it without problems
https://www.balena.io/docs/reference/OS/configuration/#sample-configjson
The fact that a field is not documented does not mean that balena users aren't relying on it in their applications. Documentation about config.json
hardly existed until a year or two ago, while user apps have been parsing config.json
for 5+ years based on whatever could be found in there.
balenaOS v3 is coming soon though, right? Semver major = breaking changes. It might be an opportunity or excuse :-) for making this kind of change.
I see your point @pdcastro , but I think this is another case of explicit vs implicit interfaces. If we try to consider all possible ways users are relying on observable behavior before making a change, we wouldn't be able to do anything.
Other way to see it is that, if someone is relying on a private variable on your library, I'm not sure is not your fault if their code breaks with a new version.
If the common agreement is that config.json
is an explicit interface for user apps, then we definitely will have to wait until balenaOS v3
When moving a device from one application to another, the
applicationId
andapplicationName
fields inconfig.json
remain the same. Either we should remove these fields, rename them to 'originalXXX', or update them on move, the current case is confusing at best, and at worst maybe some code relies on this (I'm not sure.)