-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Change mDNS add-on discovery syntax #16060
Conversation
Signed-off-by: Mark Herwege <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Is the new scheme a requirement for existing bindings or is this just a future proofing? Will anything break having it in the old configuration? I have marketplace users who are on 4.0 who are complaining about errors at startup now with this in place. Changes like this, while I do understand moving forward, make it very hard for those of us who maintain marketplace builds to do so. |
This should not affect marketplace bindings. This functionality is for proposing add-ons to be installed. Marketplace bindings are not included in that search at all. Unless you have added add-on disocery information in the marketplace add-on it does not change anything. |
I think you're misunderstanding. There are many bindings which maintain a marketplace presence for both beta features as well as older releases. AndroidTV for example does both. In general I compile against the most recent main branch and add on the new features. Unfortunately, since we have people on slightly older versions of OH including OH4.0 they are now getting an error because of this. It makes it very hard for those of us who try to maintain support for the part of the community that isn't looking to be on snapshot releases for breaking changes to be introduced unnecessarily. While I understand the reason for this PR, if there wasn't a specific need for the old/existing bindings to be changed, then IMHO they should have been left alone. Users on 4.0 now get this at startup:
|
I don’t think this is related to this PR. The functionality concerned by this PR was introduced in a commit on Dec 7th. This commit changed the syntax on Dec 16th, one week later. There were only snapshots in between. |
Marketplace jars should have the |
The existing previously defined elements in the xml schema have not changed. So they should work as before. The discovery methods are new elements added to the xml schema. So I would assume that older code that did not know about such elements would simply ignore them. Or?? => Can you give an example of the errors that you see? |
@andrewfg see above error that a 4.0 release is throwing on this. So again, while I don't disagree with change and progress, my problem is when that change and progress introduces breaking compatibility changes unnecessarily. For example, if a "discovery.xml" was created for this purpose it would have accomplished the exact same goal, allowed for the new functionality, and not caused this issue. If there is an intent to have a marketplace then it needs to be understood that the marketplace has many bindings that span releases. |
But those elements did not exist in 4.0.0. So if they are present in a marketplace jar, the addon.xml will fail to parse if the user is using 4.0.0 I believe @morph166955's message above shows what that error looks like. Also prior to 4.0.0, addon.xml did not even exist, so a marketplace jar that supports 3.X.0 will need to include binding.xml alongside of addons.xml. |
Just remove the entire |
This is a PERFECT point. There was no harm done when moving binding.xml to addons.xml. For those which provide backwards support we simply just add the extra files and the others are ignored. In the case of this feature, modifying the xml with a breaking change caused an issue. As I stated above, this could have been done with a discovery.xml just as easily and not been breaking to prior releases. |
I still don’t see the point. I understand the issue if you use a 4.1 binding on a 4.0 or before core. But you do not have to put that new section in your addons.xml. It will work without in 4.1. If it is to support multiple versions in the marketplace, you can just leave the section out. It has no value for marketplace bindings anyway. |
The point is that this was an unnecessary breaking change to the xml schema which causes issues with backwards compatibility. Breaking changes should always be avoided if there is a non breaking alternative. This should be changed to move this information to a new xml file (discovery.xml or something similar) and removed from addons.xml. Additionally, that change should be cherry picked back in to the next 4.1.x release. |
I understand your concern. We might have made other choices if we had foreseen this. I don't see an easy way to solve it now though. This PR is just the top of a series of PR's, done by myself, mainly @andrewfg and others in this repo, the core repo and the distro repo. This has been reviewed extensively by multiple people and approved. To change this now would require:
Doing all this, while possible, is a major effort and may not make it to even 4.2 before everything is developed, tested and approved. And I think the solution is more complex and makes maintaining this harder. Now, this is my personal opinion on the matter and if anyone wants to step up and do all this to create a backfix to allow current version bindings to run on old core versions, please do so. I will not do the investment, especially as there are easy work-arounds. |
^ |
Agree with @mherwege |
Signed-off-by: Mark Herwege <[email protected]> Signed-off-by: Jørgen Austvik <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Depends on openhab/openhab-core#3924
This PR modifies all mDNS discovery configurations in all addon.xml files that define mDNS discovery to an adapted format.
For this PR to build, the modified addon.xml schema file needs to be uploaded first.