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

More code cleanup #200

Merged
merged 8 commits into from
Oct 11, 2019
Merged

More code cleanup #200

merged 8 commits into from
Oct 11, 2019

Conversation

basil
Copy link
Member

@basil basil commented Oct 5, 2019

A series of code cleanup changes for this repository. Most of these changes fix IDE warnings from IntelliJ. I also reformatted the Javadocs and fixed several typos.

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.

@basil
Copy link
Member Author

basil commented Oct 5, 2019

Looks like this change is exposing a pre-existing permissions issue in CasC tests:

+ java -jar plugins-compat-tester-cli/target/plugins-compat-tester-cli.jar -reportFile /home/jenkins/workspace/ries_plugin-compat-tester_PR-200/out/pct-report.xml -workDirectory /home/jenkins/workspace/ries_plugin-compat-tester_PR-200/out/work -skipTestCache true -mvn /home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/mvn/bin/mvn -includePlugins configuration-as-code
Exception in thread "main" java.nio.file.AccessDeniedException/home/jenkins/workspace/ries_plugin-compat-tester_PR-200/out/work
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:385)
	at java.base/java.nio.file.Files.createDirectory(Files.java:689)
	at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:796)
	at java.base/java.nio.file.Files.createDirectories(Files.java:782)
	at org.jenkins.tools.test.PluginCompatTesterCli.main(PluginCompatTesterCli.java:65)
script returned exit code 1

This was always an issue but was being silently ignored due to the use of the legacy file API.

I'll temporarily add some ls -la statements to try and shed some more light on this.

@basil
Copy link
Member Author

basil commented Oct 5, 2019

And, of course, the error went away on a subsequent re-run. I have now removed the debugging instrumentation I added and am trying another test run. It is frustrating that these CasC tests are so flaky. I would suggest that someone with write access to this repository consider migrating to Azure Container Instances, which offer a more deterministic build environment.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Looks great, thanks+

@oleg-nenashev oleg-nenashev merged commit 37b415d into jenkinsci:master Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants