jenkinsci / jenkinsci/matrix-project-plugin
[JENKINS-26141] Failed to mkdirs IOException if Configuration Matrix's Name is empty
- Dominant language
- Java
- Stars
- 17
- Forks
- 85
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 5
Description
If the Configuration Matrix's Name field is empty, the build will immediately fail with:
java.io.IOException: Failed to mkdirs: /ubuntu-x86_64
at hudson.FilePath.mkdirs(FilePath.java:1154)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1258)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
at hudson.model.Run.execute(Run.java:1759)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
The line right before makes it seem like it's trying to build in the root directory (probably creating an invalid path somehow):
Building remotely on ubuntu-x86_64 (linux) in workspace /ubuntu-x86_64
When I set the Name to "slaves" (why do I need to set a name anyways?), the line will be:
Building remotely on ubuntu-x86_64 (linux) in workspace /home/jenkins/workspace/myproject/slaves/ubuntu-x86_64
---
Originally reported by
kainjow, imported from: Failed to mkdirs IOException if Configuration Matrix's Name is empty
kohsuke
Raw content of original issue
If the Configuration Matrix's Name field is empty, the build will immediately fail with:
java.io.IOException: Failed to mkdirs: /ubuntu-x86_64
at hudson.FilePath.mkdirs(FilePath.java:1154)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1258)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
at hudson.model.Run.execute(Run.java:1759)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)The line right before makes it seem like it's trying to build in the root directory (probably creating an invalid path somehow):
Building remotely on ubuntu-x86_64 (linux) in workspace /ubuntu-x86_64When I set the Name to "slaves" (why do I need to set a name anyways?), the line will be:
Building remotely on ubuntu-x86_64 (linux) in workspace /home/jenkins/workspace/myproject/slaves/ubuntu-x86_64
- environment:
OS X 10.10.1, Ubuntu 14.04.1
Contributor guide
Research direction
Start with the workspace and checkout paths shown in the stack trace, especially MatrixRun.run and AbstractProject.checkout, and reproduce a build with an empty Configuration Matrix Name. Trace how the workspace path is formed; done means the build no longer attempts /ubuntu-x86_64 or fails to create its workspace when the Name is empty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100