jenkinsci / jenkinsci/git-client-plugin

[JENKINS-23727] Timeout on initial submodule update did not fail the build

Open
#1,447 0 comments 0 reactions 0 assignees View on GitHub
component:git-client-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
152
Forks
402
Avg merge
6h 47m
Merged PRs (30d)
4

Description

I defined a Jenkins job to checkout the boost repository and its submodules. During the checkout, the submodule init --recursive failed, but the job was marked as a success. The job should have failed because the submodule init reported an error.

Steps I took:


  1. Define a new Jenkins job "job-does-not-fail-on-submodule-timeout"

  2. Use Git as the SCM, with git://github.com/boostorg/boost.git as repo

  3. Add "Additional behaviours" "Advanced sub-module behaviours", and check the "Recursively update submodules" checkbox

  4. Build that job

It will timeout in 10 minutes because the submodule update cannot complete in 10 minutes. However, the job will be marked as "Successful", even though the submodule update failed.

Job output looked like this:

```
Started by user anonymous
Building remotely on jessie64a (Debian amd64-Debian linux testing Debian-testing amd64-Debian-testing amd64) in workspace /var/lib/jenkins/wheezy64b-slave/workspace/JENKINS-23694-clean-fails-with-submodules-present
Cloning the remote Git repository
Cloning repository git://github.com/boostorg/boost.git
> git init /var/lib/jenkins/wheezy64b-slave/workspace/JENKINS-23694-clean-fails-with-submodules-present
Fetching upstream changes from git://github.com/boostorg/boost.git
> git --version
> git fetch --tags --progress git://github.com/boostorg/boost.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url git://github.com/boostorg/boost.git
> git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url git://github.com/boostorg/boost.git
Cleaning workspace
> git rev-parse --verify HEAD
No valid HEAD. Skipping the resetting
> git clean -fdx
Fetching upstream changes from git://github.com/boostorg/boost.git
> git fetch --tags --progress git://github.com/boostorg/boost.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse origin/master^{commit}
Checking out Revision 85b8813a1cf348ea84a0f99ed5319f39c140900f (origin/master)
> git config core.sparsecheckout
> git checkout -f 85b8813a1cf348ea84a0f99ed5319f39c140900f
First time build. Skipping changelog.
> git remote
> git submodule init
> git submodule sync
> git config --get remote.origin.url
> git submodule update --init --recursive
ERROR: Timeout after 10 minutes
Finished: SUCCESS

```

---
Originally reported by markewaite, imported from: Timeout on initial submodule update did not fail the build


  • status: Open
  • priority: Minor
  • component(s): git-client-plugin
  • resolution: Unresolved
  • votes: 3
  • watchers: 4
  • imported: 20251211-071809

Raw content of original issue

I defined a Jenkins job to checkout the boost repository and its submodules. During the checkout, the submodule init --recursive failed, but the job was marked as a success. The job should have failed because the submodule init reported an error.

Steps I took:


  1. Define a new Jenkins job "job-does-not-fail-on-submodule-timeout"

  2. Use Git as the SCM, with git://github.com/boostorg/boost.git as repo

  3. Add "Additional behaviours" "Advanced sub-module behaviours", and check the "Recursively update submodules" checkbox

  4. Build that job

It will timeout in 10 minutes because the submodule update cannot complete in 10 minutes. However, the job will be marked as "Successful", even though the submodule update failed.

Job output looked like this:


Started by user anonymous

Building remotely on jessie64a (Debian amd64-Debian linux testing Debian-testing amd64-Debian-testing amd64) in workspace /var/lib/jenkins/wheezy64b-slave/workspace/JENKINS-23694-clean-fails-with-submodules-present
Cloning the remote Git repository
Cloning repository git://github.com/boostorg/boost.git
> git init /var/lib/jenkins/wheezy64b-slave/workspace/JENKINS-23694-clean-fails-with-submodules-present
Fetching upstream changes from git://github.com/boostorg/boost.git
> git --version
> git fetch --tags --progress git://github.com/boostorg/boost.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url git://github.com/boostorg/boost.git
> git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url git://github.com/boostorg/boost.git
Cleaning workspace
> git rev-parse --verify HEAD
No valid HEAD. Skipping the resetting
> git clean -fdx
Fetching upstream changes from git://github.com/boostorg/boost.git
> git fetch --tags --progress git://github.com/boostorg/boost.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse origin/master^{commit}
Checking out Revision 85b8813a1cf348ea84a0f99ed5319f39c140900f (origin/master)
> git config core.sparsecheckout
> git checkout -f 85b8813a1cf348ea84a0f99ed5319f39c140900f
First time build. Skipping changelog.
> git remote
> git submodule init
> git submodule sync
> git config --get remote.origin.url
> git submodule update --init --recursive
ERROR: Timeout after 10 minutes
Finished: SUCCESS

environment

```
Jenkins 1.554.3

Git plugin 2.2.2

Git client plugin 1.9.1

Debian Linux Testing
```

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.