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

Code cleanup #109

Merged
merged 28 commits into from
Nov 19, 2019
Merged

Code cleanup #109

merged 28 commits into from
Nov 19, 2019

Conversation

basil
Copy link
Member

@basil basil commented Oct 11, 2019

A series of code cleanup changes for this repository. Most of these changes fix IntelliJ or Error Prone warnings. I kept each commit separate. Each commit message should be self-explanatory, but if anything is unclear I am happy to provide further explanation. Also, feel free to revert any specific cleanup commits that are unwanted.

CC: @jenkinsci/hacktoberfest

@basil
Copy link
Member Author

basil commented Oct 11, 2019

Error was:

{noformat}
[2019-10-11T19:51:04.148Z] [ERROR] org.jenkinsci.plugins.workflow.ArtifactManagerTest Time elapsed: 1.661 s <<< ERROR!
[2019-10-11T19:51:04.148Z] java.lang.Error: Failed to build image (1): 32edfdd58111
[2019-10-11T19:51:04.148Z] at org.jenkinsci.test.acceptance.docker.Docker.build(Docker.java:131)
[2019-10-11T19:51:04.148Z] at org.jenkinsci.test.acceptance.docker.Docker.build(Docker.java:174)
[2019-10-11T19:51:04.148Z] at org.jenkinsci.test.acceptance.docker.Docker.build(Docker.java:160)
[2019-10-11T19:51:04.148Z] at org.jenkinsci.test.acceptance.docker.Docker.build(Docker.java:140)
[2019-10-11T19:51:04.148Z] at org.jenkinsci.plugins.workflow.ArtifactManagerTest.prepareImage(ArtifactManagerTest.java:91)
[2019-10-11T19:51:04.148Z] at org.jenkinsci.plugins.workflow.ArtifactManagerTest.doPrepareImage(ArtifactManagerTest.java:81)
[2019-10-11T19:51:04.148Z] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2019-10-11T19:51:04.148Z] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2019-10-11T19:51:04.148Z] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2019-10-11T19:51:04.148Z] at java.lang.reflect.Method.invoke(Method.java:498)
[2019-10-11T19:51:04.148Z] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
[2019-10-11T19:51:04.148Z] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[2019-10-11T19:51:04.148Z] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
[2019-10-11T19:51:04.148Z] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
[2019-10-11T19:51:04.148Z] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
[2019-10-11T19:51:04.148Z] at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
[2019-10-11T19:51:04.148Z] at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
[2019-10-11T19:51:04.148Z] at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
[2019-10-11T19:51:04.148Z] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
[2019-10-11T19:51:04.148Z] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
[2019-10-11T19:51:04.148Z] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
[2019-10-11T19:51:04.148Z] at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
[2019-10-11T19:51:04.148Z] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
{noformat}

This doesn't seem related to my changes. Trying another build.

@basil basil closed this Oct 11, 2019
@basil basil reopened this Oct 11, 2019
@basil
Copy link
Member Author

basil commented Oct 14, 2019

Trying another build.

@basil basil closed this Oct 14, 2019
@basil basil reopened this Oct 14, 2019
@dwnusbaum dwnusbaum requested a review from car-roll October 15, 2019 13:35
@basil
Copy link
Member Author

basil commented Oct 16, 2019

The most recent run passed the Docker portion, but failed in Javadoc generation. I can't reproduce the error on my local machine with OpenJDK 1.8.0_222 running mvn javadoc:jar. Since the Javadoc error on ci.jenkins.io is related to a missing reference, I'll first try reverting 0303bc1 (the only commit where I added a reference) as a shot in the dark. If that doesn't help, I'll try digging further to reproduce the problem on my local machine.

@basil
Copy link
Member Author

basil commented Oct 16, 2019

I think I figured it out. Some imports I removed in package-info.java were actually needed by the Javadoc. Thanks, IntelliJ (not). Anyway, I added them back and am hopefully this will fix the problem. Of course, now I am running into Remoting problems on the Windows agent, so I will close and reopen to get yet another build.

@basil basil closed this Oct 16, 2019
@basil basil reopened this Oct 16, 2019
@basil
Copy link
Member Author

basil commented Oct 16, 2019

Windows agent is still broken, will try again tomorrow.

@halkeye
Copy link
Member

halkeye commented Oct 16, 2019

I believe for java 11 it'll actually fail if the javadoc is there but isn't correct. It'll be fine if not there. Or is correct.

@basil basil closed this Oct 16, 2019
@basil basil reopened this Oct 16, 2019
@dwnusbaum dwnusbaum merged commit a56f81e into jenkinsci:master Nov 19, 2019
@basil basil deleted the improvements branch November 23, 2021 17:51
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.

5 participants