Closed tsvi closed 4 years ago
How are you executing the jobs in parallel? I need to try and recreate this to see what exactly is going on.
@cstarner For some reason diddn't get notified about your comment.
The following is the code how I start parallel runs (I removed some irrelevant code):
pipeline {
agent none
stages {
stage('Parallel tests') {
steps {
script {
def parallelRuns = [:]
def numberOfRuns = 0
def maxNumberOfRuns = 100
for (int i = 0; i < 10; i++) {
parallelRuns[i] = {
waitUntil {
build job: 'TestRunner', parameters: [
string(name: 'sessionId', value: env.BUILD_ID)
], propagate: false
numberOfRuns++
return numberOfRuns > maxNumberOfRuns
}
}
}
parallel parallelRuns
}
}
}
}
}
The TestRunner
job, starts its own pipeline. The first stage
is "Select test" which is done using an in-house python tool (vroom), while trying to upgrade to the latest version we fail a lot of the times as virtualenv is not instantiated.
pipeline {
agent { label "simulation" }
stages {
stage('Select test') {
steps {
script{
withPythonEnv('python3') {
sh "pip install --upgrade --index-url=file:///home/jenkins/pip/simple/ vroom"
}
}
}
}
}
}
Some more info while debugging this issue.
capturedOutput
https://github.com/jenkinsci/pyenv-pipeline-plugin/blob/d99a4e8c65cda98468c7814ea8ad926f4e19a067/src/main/java/com/github/pyenvpipeline/jenkins/VirtualenvManager.java#L96 is an empty string.@cstarner If you can point me on how to add more debugging statements and generate my own version of the plugin, I'd be happy to continue debugging this issue.
Thanks,
To create more logging statements, at least ones that will show in the run logs, you can user the LOGGER objects (or create your own versions with Logger.getLogger()).
To build your own version of the plugin, clone the repository, and run mvn install -e , (-Dmaven.test.skip=true if you want to build without running the tests; which can take a while). This will generate a .hpi file under the target/ folder.
To use this plugin, open Jenkins and go to Manage Jenkins > Plugin Manager > Advanced. There you will see a section to upload a plugin. Upload the generated hpi file, and it will be installed. It will probably require a reboot of Jenkins to take effect.
Let me know if you have any other questions. If you manage to pin it down, and can fix it, I will take pull requests. If not, let me know your findings, and we'll go from there
I have 2 parallel jobs running with the same code. One of them creates a virtualenv, the other one doesn't Both of them run on the same node with at the same time. Both of them ran in a directory named TestRunner@X, with X = 2 failing and X =5 passing.
Directories don't have whitespaces so not #26.
I'm at a loss
Pipeline code:
Failing log:
Passing log: