-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Attempts to fetch workspace from Master if all slaves are offline #140
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the idea.
I added a comment about the NPE fix, which is redundant.
I'd like a comment in the readme about this feature.
LOGGER.info("Workspace exists ? " + workspace.exists()); | ||
if (workspace.exists()) { | ||
return new FilePath(workspace); | ||
if(job != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add a null check before an instanceof
.
http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.20.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense. I'll change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where should I add the comment about this in readme? I am not sure about the proper location; I was thinking at the end of the file with header 'Workspace support from Master' and details in the body?
LOGGER.info("Nodes went offline. Hence fetching it through master"); | ||
if (job instanceof AbstractProject) { | ||
String assignedLabel = ((AbstractProject) job).getAssignedLabelString(); | ||
KubernetesCloud kubernetesCloud = Hudson.getInstance().clouds.get(KubernetesCloud.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can have multiple KubernetesClouds, each with a different id
String workspacePath = filePath.toString(); | ||
LOGGER.info("Workspace Path: " + workspacePath); | ||
File workspace = new File(workspacePath); | ||
LOGGER.info("Workspace exists ? " + workspace.exists()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These logging statements should be level FINE
Closing this PR as I messed up part of the code. Will create a new one. |
No description provided.