jenkinsci / lib-file-leak-detector

Java agent that detects file handle leak
http://file-leak-detector.kohsuke.org/
MIT License
238 stars 112 forks source link

Bump jenkins from 1.93 to 1.94 #126

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps jenkins from 1.93 to 1.94.

Release notes

Sourced from jenkins's releases.

1.94

🚨 Removed

🚀 New features and improvements

  • Inline Maven property incrementals.url for Maven 4 support (#372) @​basil

🐛 Bug fixes

👻 Maintenance

  • Ban javax.servlet:servlet-api version 0 (#385) @​basil
  • Define releaseProfiles in <plugins> section rather than <pluginManagement> section (#380) @​basil
  • Use a name for the Stapler plugin property that is consistent with plugin-pom (#374) @​basil
  • Consolidate maven-surefire-plugin.version and maven-surefire-report-plugin.version (#373) @​basil
  • Remove forceJavacCompilerUse workaround (#362) @​basil
  • Remove japanese mailing list from pom (#361) @​NotMyFault

📦 Dependency updates

Commits
  • 3bccfa6 [maven-release-plugin] prepare release jenkins-1.94
  • 1cef204 Remove unnecessary enforceBytecodeVersion excludes (#384)
  • dae5027 Ban javax.servlet:servlet-api version 0 (#385)
  • 423ecc8 Fix requireJavaVersion range (#383)
  • 7c247a6 Define releaseProfiles in \<plugins> section rather than `<pluginManagemen...
  • 6183532 Remove unused property (#382)
  • 2998767 Eliminate some pointless inconsistency (#381)
  • 76c6477 Remove defaultGoal (#379)
  • c4a43ce Remove unnecessary customization of remote repository update frequency (#378)
  • 4e6922e Remove unnecessary default group ID (#377)
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

Dependabot will merge this PR once CI passes on it, as requested by @NotMyFault.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 1 year ago

One of your CI runs failed on this pull request, so Dependabot won't merge it.

Dependabot will still automatically merge this pull request if you amend it and your tests pass.

timja commented 1 year ago

Could swap back to mockito-subclass if the inline mock maker is causing the issue here: https://github.com/mockito/mockito/releases/tag/v5.0.0

May be worth also trying the newer versions of mockito

basil commented 1 year ago

Who is going to do that?

basil commented 1 year ago

@timja was unresponsive.

timja commented 1 year ago

@timja was unresponsive.

@basil hello I am here.

basil commented 1 year ago

Thank you Tim, who is going to adapt this component to parent POM 1.94?

timja commented 1 year ago

Thank you Tim, who is going to adapt this component to parent POM 1.94?

I do not know, I do not have time this week, possibly next week.

timja commented 1 year ago

I've tried:

  1. Newer versions of mockito
  2. Switching to mockito-subclass

Neither worked.

I was able to fix the issue in the CI build by fixing what looks like a bug in the test.

diff --git a/src/test/java/org/kohsuke/file_leak_detector/AgentMainTest.java b/src/test/java/org/kohsuke/file_leak_detector/AgentMainTest.java
index cdfff93..e2057b6 100644
--- a/src/test/java/org/kohsuke/file_leak_detector/AgentMainTest.java
+++ b/src/test/java/org/kohsuke/file_leak_detector/AgentMainTest.java
@@ -56,7 +56,7 @@ public class AgentMainTest {
         AgentMain.premain(null, instrumentation);

         verify(instrumentation, times(1)).addTransformer(any(), anyBoolean());
-        verify(instrumentation, times(1)).retransformClasses((Class<?>) any());
+        verify(instrumentation, times(1)).retransformClasses(any(Class[].class));

It's a varargs method that is taking about 8 parameters not a single one, behaviour changed in https://github.com/mockito/mockito/issues/1593#issuecomment-1367083333.

the test fails later on with:

Failures:
[ERROR]   AgentMainTest.testPreMain:67 Had classes in the spec which were not instrumented: [java/nio/channels/spi/AbstractSelector, java/io/FileOutputStream, java/io/FileInputStream, java/util/zip/ZipFile, java/net/PlainSocketImpl, java/nio/file/Files, java/nio/channels/spi/AbstractSelectableChannel, java/io/RandomAccessFile, java/nio/channels/FileChannel, java/nio/channels/spi/AbstractInterruptibleChannel]

I'm unsure of how to fix that.

timja commented 1 year ago

@dependabot rebase

aneveux commented 1 year ago

Hello :wave:

I filled https://github.com/jenkinsci/lib-file-leak-detector/pull/129 against this PR which should fix the test issue.

Let me know if I missed something or didn't follow the right process :smile:

basil commented 1 year ago

@dependabot rebase

dependabot[bot] commented 1 year ago

Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!

If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.