jenkinsci / jenkinsci/workflow-multibranch-plugin

[JENKINS-51759] Cannot load Jenkinsfile for Pull Request

Open
#495 0 comments 0 reactions 0 assignees View on GitHub
component:workflow-multibranch-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
87
Forks
131
PR merge metrics
No merged PRs in 30d

Description

When Bitbucket Branch Plugin cannot do lightweight checkout for Jenkinsfile for Pull Request.

I configured my PR strategy to Build Pull Request Revision. 

I am getting the following exception:

ERROR: Could not do lightweight checkout, falling back to heavyweight

java.io.FileNotFoundException: URL: /rest/api/1.0/projects/sample/repos/sample-repo/browse/Jenkinsfile?at=PR-62&start=0&limit=500

and switches to heavy checkout.

---
Originally reported by adambialas, imported from: Cannot load Jenkinsfile for Pull Request


  • status: In Progress
  • priority: Major
  • component(s): workflow-multibranch-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 20251212-090250

Raw content of original issue

When Bitbucket Branch Plugin cannot do lightweight checkout for Jenkinsfile for Pull Request.

I configured my PR strategy to Build Pull Request Revision. 

I am getting the following exception:

ERROR: Could not do lightweight checkout, falling back to heavyweight
java.io.FileNotFoundException: URL: /rest/api/1.0/projects/sample/repos/sample-repo/browse/Jenkinsfile?at=PR-62&start=0&limit=500
and switches to heavy checkout.

environment

```
Jenkins ver. 2.125

Bitbucket Branch Source Plugin 2.2.11

Pipeline: Multibranch 2.19
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the configured Build Pull Request Revision scenario with the listed Jenkins and plugin versions, then trace the lightweight-checkout path that requests Jenkinsfile at PR-62. Done means the Jenkinsfile loads for the pull request without the reported FileNotFoundException or unintended fallback to a heavyweight checkout.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ci-cd, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.