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

Update all non-major dependencies #4401

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

IOhacker
Copy link
Contributor

@IOhacker IOhacker commented Mar 3, 2025

Description

Update all non-major dependencies

Ignore if these details are present on the associated Apache Fineract JIRA ticket.

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per https://github.com/apache/fineract/#pull-requests

  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.

  • Create/update unit or integration tests for verifying the changes made.

  • Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.

  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes

  • Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

@IOhacker IOhacker force-pushed the develop branch 3 times, most recently from f03ea13 to 908d5f0 Compare March 3, 2025 05:49
@jdailey
Copy link
Contributor

jdailey commented Mar 4, 2025

@adamsaghy take a look please

Copy link
Contributor

@jdailey jdailey left a comment

Choose a reason for hiding this comment

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

The changes are upgrading multiple dependencies - with point upgrades. As the release manager, I want to make sure our release 1.11 is going to pass security scans.

The key thing to verify is whether the tests pass and then trusting that the tests are sufficient coverage for functionality. I think also trusting that deprecated functions in these libraries are still supported and will throw warnings in the log when used in code rather than break the application.

A sanity check is needed on this - not sure if our automated tools can detect problems but worth trying to see what code behaviors are problematic when we do a lot of such dependency upgrades.

@IOhacker
Copy link
Contributor Author

IOhacker commented Mar 4, 2025 via email

@meonkeys
Copy link
Contributor

meonkeys commented Mar 4, 2025

First, reminder to immediately email any security findings to security at fineract.apache.org.

I understand Docker Scout / Snyk has identified issues and we need to fix these. @IOhacker, I was thinking these issues ware related to dependencies in upstream Docker images, but now I'm realizing these dependencies are Java libraries that need updating. I think we should still proceed with the v1.11.0 release and upgrade dependencies (and fix tests) on develop. I'm not certain this is the best path; we may end up having to ship a v1.11.1 hotfix / patch release depending on what we find.

dependency 'org.bouncycastle:bcpkix-jdk15to18:1.79'
dependency 'org.bouncycastle:bcprov-jdk15to18:1.79'
dependency 'org.bouncycastle:bcpkix-jdk15to18:1.80'
dependency 'org.bouncycastle:bcprov-jdk15to18:1.80'
dependency 'org.bouncycastle:bcprov-jdk15on:1.70'
dependency 'org.bouncycastle:bcpg-jdk15on:1.70'
Copy link

@pjfanning pjfanning Mar 4, 2025

Choose a reason for hiding this comment

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

why keep dependencies on jdk15on and jdk15to18 jars - don't they have the same classes (with some variations) and will therefore clash with each other?

I would recommend dropping all these and using bcpg-jdk18on, bcprov-jdk18on, bcpkix-jdk18on.

bcprov-jdk15on and bcpg-jdk15on 1.70 have security issues and no new jars are being released for jdk15on

Surely, you can accept Java 8 is a minimum these days.

@adamsaghy
Copy link
Contributor

@Ádám Sághy @.> @james Dailey @.> I have been trying to find the locations of the errors: Execution failed for task ':fineract-e2e-tests-core:test'. Execution failed for task ':fineract-e2e-tests-runner:test'. But I have been unable to detect where the issue is. Regards Victor El mar, 4 mar 2025 a las 10:16, James D @.>) escribió:

@.
* commented on this pull request. The changes are upgrading multiple dependencies - with point upgrades. As the release manager, I want to make sure our release 1.11 is going to pass security scans. The key thing to verify is whether the tests pass and then trusting that the tests are sufficient coverage for functionality. I think also trusting that deprecated functions in these libraries are still supported and will throw warnings in the log when used in code rather than break the application. A sanity check is needed on this - not sure if our automated tools can detect problems but worth trying to see what code behaviors are problematic when we do a lot of such dependency upgrades. — Reply to this email directly, view it on GitHub <#4401 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALD2ZAUG7JLUSFYY7GDS3X32SXGU7AVCNFSM6AAAAABYGAFPWGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMNJYGE4DKNBSHA . You are receiving this because you authored the thread.Message ID: @.***>

org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not complete execution for Gradle Test Executor 12.
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:65)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:569)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:92)
	at jdk.proxy2/jdk.proxy2.$Proxy6.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:200)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:132)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:103)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:63)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:121)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
	at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:165)
	at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)
	at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:105)
	at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)
	at app//org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99)
	at app//org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
	at app//org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
	at app//org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$1(InterceptingLauncher.java:39)
	at app//org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
	at app//org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:38)
	at app//org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:124)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:99)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:94)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:63)
	... 18 more
Caused by: java.lang.NoClassDefFoundError: org/junit/jupiter/api/extension/TestInstantiationAwareExtension$ExtensionContextScope
	at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:66)
	at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
	... 32 more
Caused by: java.lang.ClassNotFoundException: org.junit.jupiter.api.extension.TestInstantiationAwareExtension$ExtensionContextScope
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 34 more
	```

@pjfanning
Copy link

@Ádám Sághy @.> @james Dailey _@**._> I have been trying to find the locations of the errors: Execution failed for task ':fineract-e2e-tests-core:test'. Execution failed for task ':fineract-e2e-tests-runner:test'. But I have been unable to detect where the issue is. Regards Victor El mar, 4 mar 2025 a las 10:16, James D _@.>) escribió:

@._* commented on this pull request. The changes are upgrading multiple dependencies - with point upgrades. As the release manager, I want to make sure our release 1.11 is going to pass security scans. The key thing to verify is whether the tests pass and then trusting that the tests are sufficient coverage for functionality. I think also trusting that deprecated functions in these libraries are still supported and will throw warnings in the log when used in code rather than break the application. A sanity check is needed on this - not sure if our automated tools can detect problems but worth trying to see what code behaviors are problematic when we do a lot of such dependency upgrades. — Reply to this email directly, view it on GitHub <#4401 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALD2ZAUG7JLUSFYY7GDS3X32SXGU7AVCNFSM6AAAAABYGAFPWGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMNJYGE4DKNBSHA . You are receiving this because you authored the thread.Message ID: _@_.*>

org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not complete execution for Gradle Test Executor 12.
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:65)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:569)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:92)
	at jdk.proxy2/jdk.proxy2.$Proxy6.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:200)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:132)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:103)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:63)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:121)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
	at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:165)
	at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)
	at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:105)
	at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)
	at app//org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99)
	at app//org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
	at app//org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
	at app//org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$1(InterceptingLauncher.java:39)
	at app//org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
	at app//org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:38)
	at app//org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:124)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:99)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:94)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:63)
	... 18 more
Caused by: java.lang.NoClassDefFoundError: org/junit/jupiter/api/extension/TestInstantiationAwareExtension$ExtensionContextScope
	at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:66)
	at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
	... 32 more
Caused by: java.lang.ClassNotFoundException: org.junit.jupiter.api.extension.TestInstantiationAwareExtension$ExtensionContextScope
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 34 more

I found a similar issue in Apache POI when upgrading to junit 5.12.0. I had to add a test runtime dependency on org.junit.platform:junit-platform-launcher:1.12.0.

apache/poi@ac9d378

@adamsaghy
Copy link
Contributor

@IOhacker Please update the org.junit.jupiter:junit-jupiter-api and org.junit.jupiter:junit-jupiter dependencies as well to use the same: 5.11.3 - > 5.12.0

@raboof
Copy link
Member

raboof commented Mar 5, 2025

First, reminder to immediately email any security findings to security at fineract.apache.org.

Thanks for highlighting this! To elaborate further, security findings should always be kept private until the release with the fix is out. Luckily, in this case there's no problem: because more often than not an advisory in a dependency does not actually impact the project (because the dependency is not used in a vulnerable way), we don't consider the output of scanning tools such as Docker Scout / Snyk as sensitive in themselves. You can read more about this at https://security.apache.org/report-dependency/ .

Of course, upgrading those dependencies to remove the risk (and make the scanners happy) is still a good idea, also from a security perspective - so thanks for working on this!

I think we should still proceed with the v1.11.0 release and upgrade dependencies (and fix tests) on develop. I'm not certain this is the best path; we may end up having to ship a v1.11.1 hotfix / patch release depending on what we find.

(this makes sense to me but of course is up to you as a project)

@IOhacker
Copy link
Contributor Author

IOhacker commented Mar 5, 2025

@jdailey @adamsaghy @pjfanning @meonkeys applying the fixes now

@IOhacker IOhacker force-pushed the develop branch 5 times, most recently from b036896 to 03238dc Compare March 6, 2025 04:53
@IOhacker
Copy link
Contributor Author

IOhacker commented Mar 6, 2025

@adamsaghy @jdailey @meonkeys I will continue in few hours. Looking at the Quartz jobs failure.

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.

6 participants