-
Notifications
You must be signed in to change notification settings - Fork 197
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
The 4.0.0-SNAPSHOT builds not working #1765
Comments
Can you provide an integration-test to demonstrate the issue in a smaller context? |
It took rather long to get by environment working again this morning. It seems one now requires maven 3.8.6 but the build machine's maven latest is 3.8.5.
Could that cause such failures? |
I'm doubtful this can be reproduce with an integration test given that the failures are very fundamental such that the existing tests would fail when doing the same thing:
Something changed between the version that work yesterday evening about 5:30PM and about two hows later. Both |
Maven 3.8.6 is an official requirement a long time because 3.8.5 has a bug that might cause problems.
The most basic test is that the maven run completes without errors, so I don't see any issues here how early the build fails.
But there must be something missing then, each build is verified on three platforms + running the platform aggregator build on linux, so I think we are quite safe for catching general problems and cover a wide range of cases. |
I can reproduce a problem locally if I use the actual 4.0.0-SNAPSHOT repository as the Tycho source rather than the locally-built-and-deployed versions:
In this case the failure is just trying to resolve the target platform:
So something appears broken but only in the https://repo.eclipse.org/content/repositories/snapshots version. So maybe a new Tycho build will just fix the problem. But all the line numbers appear to match what I have in the workspace and for this test I used Maven 3.8.6. |
When it's working locally with the local Tycho version, I can see the org.eclipse.equinox.internal.p2.repository.Activator is started like this:
But that start doesn't happen remote debugging the non-working version. |
If you have a small test-project can you upload it here (or any other place)?
Keep in mind that Tycho might be affected by other snapshot dependencies as well! And because of the open version ranges in platform up to the last release it might pull in unwanted stuff here.
If you pass |
I think it will happen with any project that does anything with p2. Remote debugging the failure, here's what I see as the reason for the org.eclipse.equinox.p2.repository "module" not starting:
It seems these failures are not surfaced anywhere visible.... |
By the way, it might be that this is causing this: because here we try to filter out unrelated stuff, but if maven pulls in newer ones they might be tagged as "please ignore that"... |
Here is a more detailed error report on the resolution failure:
And when I compare the two lists these are diffference:
Note the missing |
Note that the guard on org.eclipse.sisu.osgi.connect.PlexusConnectFramework.frameworkEvent(FrameworkEvent) prevents seeing what are the in the end catastrophic failures from being more visible: |
@merks the resolution error does not really matter as it is just a consequence of messed up dependencies. So the question is why are wrong items pulled in, so Lines 155 to 157 in ef6b338
would be more interesting place to look at. |
One thing I notice is bcpg 1.72.2 while platform is at 1.72 , it might be red herring but still worth checking out. |
@akurtakov I think in the one case it's including two versions, but I doubt this causes failures. @laeubi Indeed they are being filtered out: 10:13:42 [DEBUG] [4c439da1-5624-4f5f-9827-fe1950e4d06e][extension>org.eclipse.tycho:tycho-maven-plugin:4.0.0-SNAPSHOT] Skip D:\Users\test19.m2\repository\org\eclipse\tycho\tycho-maven-plugin\4.0.0-SNAPSHOT\tycho-maven-plugin-4.0.0-SNAPSHOT.jar as it is not part of the dependency jars... 10:14:30 [DEBUG] [4c439da1-5624-4f5f-9827-fe1950e4d06e][extension>org.eclipse.tycho:tycho-maven-plugin:4.0.0-SNAPSHOT] Skip D:\Users\test19.m2\repository\org\eclipse\platform\org.eclipse.equinox.common\3.17.0-SNAPSHOT\org.eclipse.equinox.common-3.17.0-SNAPSHOT.jar as it is not part of the dependency jars... 10:14:30 [DEBUG] [4c439da1-5624-4f5f-9827-fe1950e4d06e][extension>org.eclipse.tycho:tycho-maven-plugin:4.0.0-SNAPSHOT] Skip D:\Users\test19.m2\repository\org\eclipse\platform\org.eclipse.core.jobs\3.13.200-SNAPSHOT\org.eclipse.core.jobs-3.13.200-SNAPSHOT.jar as it is not part of the dependency jars.. |
I think because of the "open ranges" maven pulls in here the snapshots and as these are potentially incompatible Tycho (now) filter them out :-\ I see two options:
|
Are you saying this is happening because these two versions are wrong?
In these two places: So we could fix these versions... But then the problem will recur in the future as versions change? And we won't notice that in the build itself but only when we actually use the results of the build elsewhere? |
No the versions are correct, but currently the build gets 3.17.0-SNAPSHOT version I assume because of the open ranges of some of the dependencies. |
I really need something to do PGP signing for the SimRel build so we should at least for now something that will not filter out jars. It seems dangerously error prone to filter a jar just because its version isn't exactly as expected, and even more so because mistakes cause problem not revealed by the build. It would seem better, if we're to do filtering, to consider the specified version a lower bound... |
Why? It is the other way round, Tycho is build and tested with this versions and should use exactly those. Anything else is an error.
The problem is caused by the faulty version ranges of platform artifacts and now you see why I always said it is a bad idea to have those ;-) |
If Tycho expects exactly a certain version of something, then it is indeed responsible to ensure exactly and only that version is resolved. As for faulty version ranges, it's not clear exactly which artifact's version range is faulty nor what exactly that fault is. Something somewhere should have excluded org.eclipse.equinox.common version 3.17.0 from its range? |
Tycho does, but transitive dependencies of platform artifacts just absorb "anything equal or higher", that's why the snapshots are pulled in here, where you most probably not want them to be used as part of the maven build...
See |
It's never quite clear to me whether specifying just a version number is a range or not. It seems the semantics is context dependent: https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402 Everything seems to suggest its really only a lower bound (mostly)... |
If you specify a version you say:
If you specify a range you say
So lets say you have a range of |
@merks I disabled the check for now, this should now be fixed. |
Yes, it works now. Thanks. |
This build that worked the other day is no longer working:
https://ci.eclipse.org/oomph/job/jetty/job/jetty-mirror-4.0/
Fails like this:
[ERROR] Failed to execute goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:4.0.0-SNAPSHOT:mirror (default) on project org.eclipse.oomph.jetty.mirror: Execution default of goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:4.0.0-SNAPSHOT:mirror failed: Cannot invoke "org.osgi.framework.BundleContext.getServiceReference(java.lang.Class)" because the return value of "org.eclipse.equinox.p2.internal.repository.tools.Activator.getBundleContext()" is null -> [Help 1]
Also this one stopped working overnight:
https://ci.eclipse.org/simrel/job/simrel.runaggregator.pipeline/
It fails rather quietly like this:
Both appear to be some problem related to starting Equinox...
The text was updated successfully, but these errors were encountered: