-
-
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
add base to migrate to bnd and migrate astro #5018
Conversation
Because of openhab/openhab-distro#882 (comment) we should migrate the bundles with tests first. I am willing to support you with that mirgations. WDYT is necessary to get that first migration upstream soon? |
I have no idea how that works, but would be willing to try the DMX binding (which has tests and additionally also rule actions) as a next step. There is only a small PR open for that binding which can easily be adapted if necessary. |
@J-N-K After this commit has been merged, I will come up with another PR that contains only the changes necessary to migrate one binding. |
Many thanks for your continued help on getting https://github.com/openhab/openhab2-addons/issues/5005 resolved @maggu2810. 👍
Do you mean to get this PR merged or is there something else that needs to be done first? |
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.
Can we enable the tests again for the maven builds?
Tests should be enabled for Maven + Bnd. Did you mean the SAT checks? |
Perhaps we can also create a new milestone (M2) before we start migrating everything. That way users have a fallback in case of regressions. But we would need openhab/openhab-distro#866 to be fixed before we can create a new milestone. |
I thought that |
You are right, in Travis is it disabled for Maven + Bnd, too. I don't know why it has been disabled on Travis and I don't know if it should be enabled on Travis. |
The whole mixture of POM first and Maven first is a mess. |
Do you have plans for working on and fixing openhab/openhab-distro#866 @pfink? |
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.
Looks like feature validation now fails when building this PR. I see this on a local build as well as Travis:
[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.2.1:verify (karaf-feature-verification) on project org.openhab.addons.features.karaf.openhab-addons: Feature resolution failed for [openhab-misc-neeo/2.5.0.SNAPSHOT]
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-misc-neeo; type=karaf.feature; version=2.5.0.SNAPSHOT; filter:="(&(osgi.identity=openhab-misc-neeo)(type=karaf.feature)(version>=2.5.0.SNAPSHOT))" [caused by: Unable to resolve openhab-misc-neeo/2.5.0.SNAPSHOT: missing requirement [openhab-misc-neeo/2.5.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.io.neeo; type=osgi.bundle; version="[2.5.0.201903021602,2.5.0.201903021602]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.io.neeo/2.5.0.201903021602: missing requirement [org.openhab.io.neeo/2.5.0.201903021602] osgi.wiring.package; filter:="(osgi.wiring.package=org.openhab.ui.dashboard)"]]
[ERROR] Repositories: {
[ERROR] file:/home/travis/build/openhab/openhab2-addons/features/karaf/openhab-addons/target/feature/feature.xml
[ERROR] mvn:org.apache.karaf.features/framework/4.2.1/xml/features
[ERROR] mvn:org.apache.karaf.features/standard/4.2.1/xml/features
[ERROR] mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/2.5.0-SNAPSHOT/xml/features
[ERROR] mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-tp/2.5.0-SNAPSHOT/xml/features
[ERROR] mvn:org.ops4j.pax.web/pax-web-features/7.2.3/xml/features
[ERROR] }
It has been already reported here, that neeo depends on the dashboard. I found this one:
|
features/karaf/pom.xml
Outdated
</pluginManagement> | ||
</build> | ||
|
||
<repositories> |
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.
We should not add any repos other than the JFrog release and/or snapshot repo - they aggregate all that we need and thus make us flexible if artifacts move around.
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.
You are right, the repos have not been cleaned up.
I just copied the section over to get a working solution.
If they are not necessary to get all things resolved, I will remove them.
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.
Done
|
||
<name>openHAB Add-ons :: BOM</name> | ||
|
||
<modules> |
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.
Just for my understanding: Why do we need all these indexes here in the repo? Are they specific to this repo or why can't the bundles/IDE refer to the indexes from openhab-core?
I am especially confused as web-ui seems to live happily without those, so if we can avoid it, I would not want them here either.
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.
The index needs to be used for the integration tests and so needs to be present at build time.
The index contains URLs that points to the location the dependencies are stored in the current run, so I don't know how to reuse them.
If you know a better approach, I am happy to use it.
We could create a new index on-the-fly all the time for every integration test, but I assume it slows down the things.
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.
Has my answer been detailed enough?
If we find a better way later -- perhaps bnd 4.2 or a 4.3 dev build will bring some improvements, or I learn another method to do it more efficient -- we could improve it later easily.
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.
Ok, thanks for the explanation - let's live with it then.
@@ -0,0 +1,32 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
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.
If there isn't any strong reason, I would prefer to keep the add-ons in separate folders by type (binding/transform/etc...) and not have them all as a flat list under bundles
.
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.
What's different from core here?
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.
The new location is bundles/org.openhab.binding.astro
, not bundles/binding/org.openhab.binding.astro
.
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.
Ah, sorry, you meant the difference to openhab-core?
Well, the difference is that we have a HUGE list of bundles here and that we have well defined types that can be cleanly separated. This is not really the case in openhab-core.
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.
IIRC we had a discussion on the core migration and we agreed to use a flat list there.
openhab/openhab-core#467 (comment)
Now, what's the argument to do it different here?
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.
The question is rather, what is the strong reason to change the current structure of this repo?
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.
There is nothing "strong".
We commented that four days ago:
openhab/openhab-core#589 (comment)
I invested my saturday to implemented what we talked about, just because I would like to move things forward.
Now after the work has done, you suggest to change it to another layout.
I am not strong about the layout, and I am happy to accept PRs that change the layout on my branch.
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.
In openHAB Core all integration tests are part of the itests
directory.
Every integration we use contains some configuration that is equal to all the other ones.
I managed it put all that stuff in itests/itests-common.bndrun
.
To speed up things the indices for the most bundles are not generated for every integration tests again and again on build time but we reference to a global one.
Please have a look at that file.
To reference that locations I used relative URLs and the URLs needs to be realtive to the integration test that is executed. So, the one that includes the common itests file.
If the integration tests are in separate sub-directories that depth is not always the same, that is not possible anymore.
We need to drop the itests-common and put that stuff in every itests bndrun.
If we would like to change some global stuff in future (e.g. the standalone repos, the used OSGi framework, ...), we cannot change that single file anymore but we have to change all the integration tests' bndrun files.
In the migration phase we need to use two reactors, one for bnd and one for tycho.
If we keep the bundles (not itests) at the old place, it will be very tricky to get this running) as the parents references at least one reactor. So we need also for every parent between the bundle and the main reactor POM a tycho and a bnd version.
We could keep the directory layout for the addons -- just in another base directory (e.g. bundles
instead of addons
), but then it does not really fit to use a flat layout for the integration tests in itests
and a hierachical in bundles
.
IMHO the flat layout is very simple. But the addon in bundles
and its integration test in itests
.
Suggestions?
Are the choosen GA okay? I have added addons
in the group ID as we have done it for core
in openHAB Core. I did not change the artiact ID (and so the generated BSN) so I assume it is okay.
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.
We commented that four days ago:
openhab/openhab-core#589 (comment)I invested my saturday to implemented what we talked about, just because I would like to move things forward.
Now after the work has done, you suggest to change it to another layout.
Sorry, I didn't follow the archetype discussion, thus I wasn't aware of that discussion. As you had agreed with @wborn and @davidgraeff already on the flat structure, this is all fine - I did't want to interfere here, sorry!
At least I haven't yet resolved it, so I guess it is indeed still there. As suggested somewhere else, I'd think we can live with removing this class/dependency and adapt the README (/cc @tmrobert8). |
The Travis build probably still fails because |
I forgot: Manifest first 😉 |
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
I rebased the branch (no merge conflict anymore) and squashed all but one commit. There are now two commits:
If you use "rebase and merge" instead of "squash and merge" we could keep the dashboard tile removal of Neeo separated. I would prever it because it is not only /really needed for the migration but also discussed on other topics. I assume because of the rebase, it needs again 2 approving reviews. |
No, absolutely not. Feel free to use the avmfritz binding to demonstrate how it works. |
Sorry if I am again late and ask stuff that has already been decided upon: But as we are getting rid off p2 features mid-term, all features that we will have are "karaf" features - so I wonder if we should really carry "karaf" in the group and artifact ids... Don't think this is a common scheme that others are following, is it? |
If there are karaf features only, it would make sense to remove the directory "karaf", place the Karaf features directly under features and don't add karaf to the group and artifact IDs. But can we wait for that change after we removed all p2 repositories? |
Ok to wait, I was just asking because we need to change the distro back and forth, but that should be ok as long as we remember to do so. |
I assume I remember to note it if I change it. |
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.
I'd like if we could go ahead if there's no further objection :)
Related to openhab/openhab2-addons#5018 Signed-off-by: Wouter Born <github@maindrain.net>
@kaikreuzer are you OK with the changes in this PR? |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/how-to-run-available-tests-from-ide/69542/2 |
Yes, sorry for my late response! |
Related to openhab/openhab2-addons#5018 Signed-off-by: Wouter Born <github@maindrain.net>
Two related issues:
|
It can't be added to the PDE launch config. |
Have a look at: openhab/openhab-distro#889 |
The Jenkins openHAB2-Bundles and PR-openHAB2-Addons build jobs have now been updated with some pre-build steps to use the new POMs. The only issue seems to be that the "Deploy artifacts to Artifactory" post-build action doesn't deploy the artifacts of these pre-build steps. See for instance the Artifactory build information for builds 586 and 589. After looking at the code it seems like it will only deploy artifacts of Maven projects that were build in the main build step (it uses WDYT would be a good way to fix this @maggu2810, @kaikreuzer? Maybe it can deploy these artifacts by invoking the |
I didn't follow the details, why do we require pre-build steps? Our builds are supposed to produce everything relevant by a single mvn call. If this isn't the case anymore, we are likely in huge trouble wrt the build & release pipeline as well... |
There are 2 reactors because we ran into issues when mixing bnd and tycho in the same reactor (dashboard) in openhab-webui (openhab/openhab-distro#879 (comment)). I'm checking if this is actually an issue for openhab2-addons. Maybe can use the same reactor as long as tycho artifacts don't depend on bnd build artifacts in the same reactor. |
Hm, that will happen when the "io" bundles and transports are ported, so extra care is necessary there. |
There's finally a working 2.5.0-SNAPSHOT build 1551 containing these changes! 😃
Yes it's probably best if bindings are migrated before (or simultaneously) their io/transport bundle(s). The same would apply if there were two reactors instead of one. In that case the tycho build was always executed before the bnd build. |
All changes has been made on command line, so I still need to create the Eclipse IDE project settings file. Will add a commit later this day.