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

config-file-provider plugin fails MavenSettingsConfigTest.freestyleWithCredentials test #2513

Closed
MarkEWaite opened this issue Sep 16, 2023 · 2 comments · Fixed by #2514
Closed
Assignees
Labels
bug Something isn't working

Comments

@MarkEWaite
Copy link
Contributor

Jenkins and plugins versions report

Environment
Profiles 2.414.x, 2.401.x, and 2.387.x all fail the `MavenSettingsConfigTest.freestyleWithCredentials`  test .

The weekly profile does not fail the `MavenSettingsConfigTest.freestyleWithCredentials1  test 

What Operating System are you using (both controller, and any agents involved in the problem)?

Linux with Java versions 11 or 21

Reproduction steps

  1. Checkout PR 2512 and run LINE=2.401.x PLUGINS=config-file-provider TEST=MavenSettingsConfigTest bash local-test.sh
  2. Confirm that the tests fail with the stack trace:
[ERROR] org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfigTest.freestyleWithCredentials -- Time elapsed: 8.398 s <<< ERROR!
java.io.IOException: Illegal base64 character -1
        at java.base/java.util.Base64$DecInputStream.read(Base64.java:1016)
        at java.base/java.io.DataInputStream.read(DataInputStream.java:149)
        at java.base/java.io.DataInputStream.readFully(DataInputStream.java:200)
        at hudson.util.IOUtils.skip(IOUtils.java:90)
        at hudson.console.ConsoleNote.skip(ConsoleNote.java:309)
        at hudson.console.PlainTextConsoleOutputStream.eol(PlainTextConsoleOutputStream.java:67)
        at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:61)
        at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:57)
        at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:75)
        at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:92)
        at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:233)
        at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:164)
        at org.jvnet.hudson.test.JenkinsRule.getLog(JenkinsRule.java:1529)
        at org.jvnet.hudson.test.JenkinsRule.assertLogNotContains(JenkinsRule.java:1518)
        at org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfigTest.freestyleWithCredentials(MavenSettingsConfigTest.java:157)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:606)
        at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
        at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.lang.Thread.run(Thread.java:829)

Expected Results

Test should pass on the older lines just as they pass on the weekly line

Actual Results

Test fails with an Illegal base64 character: -1

Anything else?

No response

@MarkEWaite MarkEWaite added the bug Something isn't working label Sep 16, 2023
@MarkEWaite
Copy link
Contributor Author

I've started a bisect to see if I can identify a commit to the bill of materials that first shows the failure. I still don't understand how the failure is happening, but maybe the bisect will guide the investigation more effectively than my guessing has.

@MarkEWaite
Copy link
Contributor Author

MarkEWaite commented Sep 16, 2023

The most recent release of the credentials binding plugin causes the config-file-provider test failure on the LTS versions (2.414.x, 2.401.x, and 2.387.x). The failure does not appear on the weekly release 2.423.

@Kevin-CB would you be willing to investigate the interaction between the base64 credentials masking and the config-file-provider plugin tests? I am reasonably confident that the change came from:

I've proposed a pull request to the plugin bill of materials to work around it so that we can release a plugin bill of materials before the end of the week, but would like to remove that workaround in the future.

I've also created a draft pull request to the config-file-provider plugin that shows the test failure. Refer to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant