jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-61793] Pytest execution freeze in docker node

Open
#477 1 comment 0 reactions 0 assignees View on GitHub
component:durable-task-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
30
Forks
101
PR merge metrics
No merged PRs in 30d

Description

Hi,

The sh command are freezes during execution of pytest in tox environment.

The tox file content:

[tox]

envlist = py36[testenv]
install_command = pip install {opts} {packages}
deps =
pytest
pytest-cov
pytest-flask
chardet
commands = pytest --cov=sweep_tools --cov-report term-missing --cov-report xml:tests/results/coverage.xml --junitxml tests/results/results.xml

The Jenkinsfile content:

docker_img_version='0.17'

launch_container_with_user='jenkins'
parser_name='sweep_tools'
github_cred_id='xxxxxx'
github_url='git@​github.com:xxx.git'
pipeline {
agent {
docker {
image 'xxxxx/analytics/ci_process:'+docker_img_version
label 'slaves_host'
args '-u jenkins -e POSTGRESQL_USER=xxxx -e POSTGRESQL_PASSWORD=xxxx -e POSTGRESQL_DATABASE=xxxxx'
customWorkspace "/home/jenkins/workspace/${env.JOB_NAME}"
}
}
stages {
stage('Delete tox cache') {
steps {
dir("${env.WORKSPACE}/.tox") {
deleteDir()
}
}
}
stage('Test execution') {
steps {
sh 'tox'
junit 'tests/results/results.xml'
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'tests/results/coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
}
}
}
}

The execution are freeze just after pytest execution.

I can see the complete log of pytest execution but the task is never end.

I can use the same configuration with durable task plugin 1.26 and it work

 

Best regards

---
Originally reported by laurent1, imported from: Pytest execution freeze in docker node


  • status: Open
  • priority: Major
  • component(s): durable-task-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-09

Raw content of original issue

Hi,

The sh command are freezes during execution of pytest in tox environment.

The tox file content:



[tox]

envlist = py36[testenv]
install_command = pip install {opts} {packages}
deps =
pytest
pytest-cov
pytest-flask
chardet
commands = pytest --cov=sweep_tools --cov-report term-missing --cov-report xml:tests/results/coverage.xml --junitxml tests/results/results.xml


The Jenkinsfile content:



docker_img_version='0.17'

launch_container_with_user='jenkins'
parser_name='sweep_tools'
github_cred_id='xxxxxx'
github_url='git@github.com:xxx.git'
pipeline {
agent {
docker {
image 'xxxxx/analytics/ci_process:'+docker_img_version
label 'slaves_host'
args '-u jenkins -e POSTGRESQL_USER=xxxx -e POSTGRESQL_PASSWORD=xxxx -e POSTGRESQL_DATABASE=xxxxx'
customWorkspace "/home/jenkins/workspace/${env.JOB_NAME}"
}
}
stages {
stage('Delete tox cache') {
steps {
dir("${env.WORKSPACE}/.tox") {
deleteDir()
}
}
}
stage('Test execution') {
steps {
sh 'tox'
junit 'tests/results/results.xml'
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'tests/results/coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
}
}
}
}


The execution are freeze just after pytest execution.

I can see the complete log of pytest execution but the task is never end.

I can use the same configuration with durable task plugin 1.26 and it work

 

Best regards

environment

```
Jenkins 2.222.1

Durable Task Plugin 1.34

Pipeline: Nodes and Processes 2.35
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.