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

Filter duplicate resolver messages #3225

Merged

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented Dec 11, 2023

Currently a warning of the resolver might be printed multiple times to the log because we call the resolver for each registered environment.

This adds a duplication filtering on the log message that each message is only printed once per project.

@laeubi laeubi added the backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change label Dec 11, 2023
@laeubi
Copy link
Member Author

laeubi commented Dec 11, 2023

FYI @akurtakov @jukzi this should reduce some of the maven warnings we currently see multiple times in the log (and improve formatting them as well).

Currently a warning of the resolver might be printed multiple times to
the log because we call the resolver for each registered environment.

This adds a duplication filtering on the log message that each message
is only printed once per project.
@laeubi laeubi force-pushed the filter_duplicate_resolver_messages branch from 8b60985 to 7780923 Compare December 11, 2023 07:42
@laeubi
Copy link
Member Author

laeubi commented Dec 11, 2023

Old format (printed multiple times):

[WARNING] Problems resolving provisioning plan.: [Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet.http [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http.whiteboard 1.1.1.202109301733 to osgi.contract; (&(osgi.contract=JavaServlet)(version=3.1.0)).]
[WARNING] Problems resolving provisioning plan.: [Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet.http [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http.whiteboard 1.1.1.202109301733 to osgi.contract; (&(osgi.contract=JavaServlet)(version=3.1.0)).]
[WARNING] Problems resolving provisioning plan.: [Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet.http [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http.whiteboard 1.1.1.202109301733 to osgi.contract; (&(osgi.contract=JavaServlet)(version=3.1.0)).]
[WARNING] Problems resolving provisioning plan.: [Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet.http [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http.whiteboard 1.1.1.202109301733 to osgi.contract; (&(osgi.contract=JavaServlet)(version=3.1.0)).]
[WARNING] Problems resolving provisioning plan.: [Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet.http [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http.whiteboard 1.1.1.202109301733 to osgi.contract; (&(osgi.contract=JavaServlet)(version=3.1.0)).]

new format (only printed once)

[WARNING] Problems resolving provisioning plan.:
   Unable to satisfy dependency from org.eclipse.e4.core.di 1.8.300.v20220817-1539 to osgi.bundle; javax.annotation [1.3.5,2.0.0).
   Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet [2.1.0,3.0.0).
   Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet.http [2.1.0,3.0.0).
   Unable to satisfy dependency from org.osgi.service.http.whiteboard 1.1.1.202109301733 to osgi.contract; (&(osgi.contract=JavaServlet)(version=3.1.0)).

@akurtakov
Copy link
Member

That would be so much nicer!

Copy link

Test Results

   573 files  ±0     573 suites  ±0   4h 0m 0s ⏱️ + 31m 56s
   377 tests ±0     370 ✔️  - 1    6 💤 ±0  1 +1 
1 131 runs  ±0  1 111 ✔️  - 1  19 💤 ±0  1 +1 

For more details on these failures, see this check.

Results for commit 7780923. ± Comparison against base commit 7cd82de.

@jukzi
Copy link

jukzi commented Dec 11, 2023

new format (only printed once)

yes, please!

@laeubi
Copy link
Member Author

laeubi commented Dec 11, 2023

@merks after all P2 updates I now see regular fail of

org.eclipse.tycho.test.pgp.TestPGPSigning on windows with:

Unexpected unsigned IUs. ==> expected: <[org.eclipse.equinox.common, org.eclipse.equinox.common.source, org.eclipse.osgi, org.eclipse.osgi.source]> but was: <[org.eclipse.equinox.common.source, org.eclipse.osgi, org.eclipse.osgi.source]>
org.opentest4j.AssertionFailedError: Unexpected unsigned IUs. ==> expected: <[org.eclipse.equinox.common, org.eclipse.equinox.common.source, org.eclipse.osgi, org.eclipse.osgi.source]> but was: <[org.eclipse.equinox.common.source, org.eclipse.osgi, org.eclipse.osgi.source]>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1156)
	at org.eclipse.tycho.test.pgp.TestPGPSigning.testSigningBinaries(TestPGPSigning.java:251)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)

any clue what could have changed here it is only failing on windows?

@laeubi laeubi merged commit 697dc92 into eclipse-tycho:master Dec 11, 2023
8 of 10 checks passed
Copy link

💚 All backports created successfully

Status Branch Result
tycho-4.0.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@merks
Copy link
Contributor

merks commented Dec 11, 2023

@merks after all P2 updates I now see regular fail of

org.eclipse.tycho.test.pgp.TestPGPSigning on windows with:

Unexpected unsigned IUs. ==> expected: <[org.eclipse.equinox.common, org.eclipse.equinox.common.source, org.eclipse.osgi, org.eclipse.osgi.source]> but was: <[org.eclipse.equinox.common.source, org.eclipse.osgi, org.eclipse.osgi.source]>
org.opentest4j.AssertionFailedError: Unexpected unsigned IUs. ==> expected: <[org.eclipse.equinox.common, org.eclipse.equinox.common.source, org.eclipse.osgi, org.eclipse.osgi.source]> but was: <[org.eclipse.equinox.common.source, org.eclipse.osgi, org.eclipse.osgi.source]>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1156)
	at org.eclipse.tycho.test.pgp.TestPGPSigning.testSigningBinaries(TestPGPSigning.java:251)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)

any clue what could have changed here it is only failing on windows?

One theory would be that the cacerts being used on Windows is not recognizing org.eclipse.equinox.common's jar signature and is therefore adding a pgp signature, which is not expected. Is a different version of the JVM being used for Windows?

@laeubi
Copy link
Member Author

laeubi commented Dec 11, 2023

We usually setup JVMs here:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Java
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
java-version: |
8
11
19
17
distribution: 'temurin'

but of course it can't be the same JVM as on linux. DO you think it might be worth to make the test less "strict" or have an asumeThat(....) for the cacerts required? Can we probably for test purpose install the certificate as trusted somehow and use a custom ca-store?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants