jenkinsci / jenkinsci/gitlab-branch-source-plugin
[JENKINS-71487] GitLab branch source should not show stack trace on heavyweight checkout
- Dominant language
- Java
- Stars
- 134
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Description
A multibranch Pipeline that I created with the GitLab branch source reported an unexpected stack trace in the log of the merge request job that was being built.
The stack trace was:
```
14:59:18 Branch indexing
14:59:18 Querying the current revision of branch master...
14:59:18 Current revision of branch master is 67378b9650cd2d539f6b869a20cbc29a0d268406
14:59:19 ERROR: Could not do lightweight checkout, falling back to heavyweight
14:59:19 java.io.IOException: Jenkinsfile not found at 67378b9650cd2d539f6b869a20cbc29a0d268406
14:59:19 at io.jenkins.plugins.gitlabbranchsource.GitLabSCMFile.fetchFile(GitLabSCMFile.java:127)
14:59:19 at io.jenkins.plugins.gitlabbranchsource.GitLabSCMFile.content(GitLabSCMFile.java:119)
14:59:19 at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335)
14:59:19 at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:108)
14:59:19 at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:312)
14:59:19 at hudson.model.ResourceController.execute(ResourceController.java:101)
14:59:19 at hudson.model.Executor.run(Executor.java:442)
14:59:19 Checking out git https://gitlab.com/MarkEWaite/hugo-experiment.git
```
There is a Jenkinsfile in commit 67378b9650cd2d539f6b869a20cbc29a0d268406. It was surprising that the branch source plugin could not do a lightweight checkout, since the merge request source branch has a Jenkinsfile and the merge request destination branch has the same Jenkinsfile.
---
Originally reported by
markewaite, imported from: GitLab branch source should not show stack trace on heavyweight checkout
Raw content of original issue
A multibranch Pipeline that I created with the GitLab branch source reported an unexpected stack trace in the log of the merge request job that was being built.
The stack trace was:
14:59:18 Branch indexing
14:59:18 Querying the current revision of branch master...
14:59:18 Current revision of branch master is 67378b9650cd2d539f6b869a20cbc29a0d268406
14:59:19 ERROR: Could not do lightweight checkout, falling back to heavyweight
14:59:19 java.io.IOException: Jenkinsfile not found at 67378b9650cd2d539f6b869a20cbc29a0d268406
14:59:19 at io.jenkins.plugins.gitlabbranchsource.GitLabSCMFile.fetchFile(GitLabSCMFile.java:127)
14:59:19 at io.jenkins.plugins.gitlabbranchsource.GitLabSCMFile.content(GitLabSCMFile.java:119)
14:59:19 at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335)
14:59:19 at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:108)
14:59:19 at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:312)
14:59:19 at hudson.model.ResourceController.execute(ResourceController.java:101)
14:59:19 at hudson.model.Executor.run(Executor.java:442)
14:59:19 Checking out git https://gitlab.com/MarkEWaite/hugo-experiment.gitThere is a Jenkinsfile in commit 67378b9650cd2d539f6b869a20cbc29a0d268406. It was surprising that the branch source plugin could not do a lightweight checkout, since the merge request source branch has a Jenkinsfile and the merge request destination branch has the same Jenkinsfile.
environment
```
Jenkins 2.401.1
GitLab branch source plugin 664.v877fdc293c89
Other plugins as recorded in plugins.txt
https://github.com/MarkEWaite/docker-lfs/blob/7e0d7afda4d9b4dd8ebdf0a6322ee481f22631f2/plugins.txt#L61
```
Contributor guide
Assessment
This issue has not been assessed yet.