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

Removed repos as they are now inherited from the parent pom #1011

Merged
merged 2 commits into from
Aug 30, 2019

Conversation

kaikreuzer
Copy link
Member

Signed-off-by: Kai Kreuzer kai@openhab.org

Signed-off-by: Kai Kreuzer <kai@openhab.org>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
@kaikreuzer kaikreuzer requested a review from a team August 30, 2019 09:09
@kaikreuzer
Copy link
Member Author

This should help speeding up our openhab-core builds, I hope.

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's speed it up. :-)

@wborn wborn merged commit 8df8229 into master Aug 30, 2019
@cweitkamp cweitkamp deleted the kaikreuzer-patch-1 branch August 30, 2019 11:12
@cweitkamp cweitkamp added this to the 2.5 milestone Aug 30, 2019
@cweitkamp
Copy link
Contributor

That's impressive. It nearly hurts ... 🚀

> mvn clean install -DskipChecks -DskiptTests
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:06 min
[INFO] Finished at: 2019-08-30T13:34:04+02:00
[INFO] Final Memory: 244M/1693M
[INFO] ------------------------------------------------------------------------

@kaikreuzer
Copy link
Member Author

You're cheating, -DskiptTests wouldn't have been so quick with that typo 😛.
But yeah, the local build isn't too bad now. I'd just would love to get SAT a bit quicker, it makes the addons PR build extremely slow...

@kaikreuzer
Copy link
Member Author

Do you have any idea why https://ci.openhab.org/job/openHAB-Core/265/ fails? It seems it isn't taking the repos from the super-pom into consideration. It does it when I build it locally, though...

@cweitkamp
Copy link
Contributor

I'd just would love to get SAT a bit quicker

What can be done to archive that? Any ideas?

@wborn
Copy link
Member

wborn commented Aug 30, 2019

There's already an issue for that (openhab/static-code-analysis#232).

Measuring what takes long would also help so we know where the biggest improvements can be made (openhab/static-code-analysis#319).

If the new Jenkins setup with agents provide enough memory/CPUs fixing parallel SAT execution might also help (openhab/static-code-analysis#200).

@kaikreuzer
Copy link
Member Author

If the new Jenkins setup with agents

Just fyi: I am currently experimenting with that. I have rented a VM with 32GB RAM and installed 4 Jenkins agents in separate docker containers à 8GB RAM. Memory thus should be no issue. I didn't remember the discussion about parallel builds anymore, that's a good idea. I have added -T 1C to the addons (PR) build for a try - let's see what happens...

@kaikreuzer
Copy link
Member Author

Not too bad, https://ci.openhab.org/view/Pull%20Request%20Builds/job/openHAB2-Bundles/742/ took just half as long than the previous builds!

@kaikreuzer
Copy link
Member Author

But https://ci.openhab.org/job/openHAB-Core/ worries me - why isn't it looking for the repos from the super-pom? @cweitkamp or @wborn, would you have any good idea?

@wborn
Copy link
Member

wborn commented Aug 30, 2019

Does it store the super POM in the local Maven repository? It doesn't seem to be downloaded at all. A local build with an empty Maven repo works for me. But the first downloaded artifact during that build is the super POM:

$ mvn clean install 
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/openhab/openhab-super-pom/1.0.1/openhab-super-pom-1.0.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/openhab/openhab-super-pom/1.0.1/openhab-super-pom-1.0.1.pom (5.5 kB at 25 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/karaf/tooling/karaf-maven-plugin/4.2.6/karaf-maven-plugin-4.2.6.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/karaf/tooling/karaf-maven-plugin/4.2.6/karaf-maven-plugin-4.2.6.pom (18 kB at 163 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/karaf/tooling/tooling/4.2.6/tooling-4.2.6.pom

It seems to be completely missing from the Jenkins logging. If it were using the super POM it would also download most artifacts using bintray.

@kaikreuzer
Copy link
Member Author

Hm, the parallel build still seems to be an issue for SAT, see https://ci.openhab.org/job/PR-openHAB2-Addons/15005/.

I'll deactivate it again on the PR builds...

@kaikreuzer
Copy link
Member Author

It doesn't seem to be downloaded at all.

Yes, I was wondering about that as well. But as we reference a dedicated version of the super pom, the locally cached version should be completely identical to any remote one, so even if it is cached, it should not matter.

@wborn
Copy link
Member

wborn commented Aug 31, 2019

If you have access to the machine you could see if it builds if you run Maven manually on that workspace using the same local Maven repo.

Executing mvn help:effective-pom -N should also show the inherited repos from the super pom. It might be another bug in the Jenkins Maven build plugin.

Using a free style build or pipeline build instead might also fix it. Most people use these nowadays so they don't notice or fix these bugs.

@wborn
Copy link
Member

wborn commented Aug 31, 2019

When I build openhab-core using my own Jenkins Docker container using a "Maven project" it builds just fine. It also downloads the super POM with an empty repo while parsing POMs:

Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Parsing POMs
Downloaded artifact https://repo.maven.apache.org/maven2/org/openhab/openhab-super-pom/1.0.1/openhab-super-pom-1.0.1.pom
Discovered a new module org.openhab.core:org.openhab.core.reactor openHAB Core
Discovered a new module org.openhab.core.bom:org.openhab.core.reactor.bom openHAB Core :: BOM
Discovered a new module org.openhab.core.bom:org.openhab.core.bom.compile openHAB Core :: BOM :: Compile
Discovered a new module org.openhab.core.bom:org.openhab.core.bom.compile-model openHAB Core :: BOM :: Compile Model
Discovered a new module org.openhab.core.bom:org.openhab.core.bom.runtime openHAB Core :: BOM :: Runtime
Discovered a new module org.openhab.core.bom:org.openhab.core.bom.runtime-index openHAB Core :: BOM :: Runtime Index
Discovered a new module org.openhab.core.bom:org.openhab.core.bom.test openHAB Core :: BOM :: Test
Discovered a new module org.openhab.core.bom:org.openhab.core.bom.test-index openHAB Core :: BOM :: Test Index
Discovered a new module org.openhab.core.bom:org.openhab.core.bom.openhab-core openHAB Core :: BOM :: openHAB Core

Maybe it helps if it rebuilds all module info? I tested removing the modules dir /var/jenkins_home/jobs/openhab-core/modules and it regenerates all module info on the next build. That might also be an easy way to remove all those no longer existing modules from the add-ons builds.

@kaikreuzer
Copy link
Member Author

Thanks @wborn. I've completely removed the workspaces from the agents and it seems to have helped - the build is green again 👍.

Rosi2143 pushed a commit to Rosi2143/openhab-core that referenced this pull request Dec 26, 2020
Fixed typo

Signed-off-by: Peter Schraffl <p.schraffl@gmx.at>
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
…1011)

Signed-off-by: Kai Kreuzer <kai@openhab.org>
GitOrigin-RevId: 8df8229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants