Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Fixes for scp plugin #8

Merged
merged 5 commits into from Feb 4, 2014
Merged

Conversation

zaro0508
Copy link
Member

Fixes issue JENKINS-21138

An exception occurs during console log upload causing only partial logs
to be copied to the remote server. The problem is that the session object
is not thread safe. To fix this problem we need to move the session
object into the ConsoleRunnable thread. Now the console upload always
runs in a completely detached thread.

Notes:

  1. Needed to update jenkins version to 1.430 because 1.403 would not build
    anymore. I think 1.430 should be conservative enought to be compatible
    with most of the existing jenkins installs.
  2. Updated com.jcraft.jsch depenency to version 1.50
  3. Needed to add sync point to fix race condition where main thread may exit
    before creating the console log file on the remote server.

Fixes issue JENKINS-21138

An exception occurs during console log upload causing only partial logs
to be copied to the remote server.  The problem is that the session object
is not thread safe.  To fix this problem we need to move the session
object into the ConsoleRunnable thread.  Now the console upload always
runs in a completely detached thread.

Notes:
1. Needed to update jenkins version to 1.430 because 1.403 would not build
   anymore.  I think 1.430 should be conservative enought to be compatible
   with most of the existing jenkins installs.
2. Updated com.jcraft.jsch depenency to version 1.50
This commit does the following:
1. fix to only create a single session if the scp plugin is configured to copy
   only the console log and no other files.
2. Give createOutStream a logger.
In certain conditions the scp plugin may run to completion before the console log file
even gets created on the remote scp site.  This commit adds a syncronization point to
make sure the console log file gets created before the main scp thread exits.
@cloudbees-pull-request-builder

plugins » scp-plugin #7 SUCCESS
This pull request looks good

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@cloudbees-pull-request-builder

plugins » scp-plugin #8 SUCCESS
This pull request looks good

@zaro0508 zaro0508 mentioned this pull request Jan 19, 2014
It is possible for child thread to hang due to exceptions occurring before a notify to
the parent thread.  To prevent execution from hanging the child thread will notify parent
thread no matter what happens.
@cloudbees-pull-request-builder

plugins » scp-plugin #9 SUCCESS
This pull request looks good

jeblair added a commit that referenced this pull request Feb 4, 2014
@jeblair jeblair merged commit 7ce951d into jenkinsci:master Feb 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants