[JIRA] (JENKINS-49353) ERROR: Could not do lightweight checkout, falling back to heavyweight

5 views
Skip to first unread message

stl@apple.com (JIRA)

unread,
Feb 26, 2018, 1:51:03 AM2/26/18
to jenkinsc...@googlegroups.com
Seb Lie commented on Bug JENKINS-49353
 
Re: ERROR: Could not do lightweight checkout, falling back to heavyweight

The root cause seems to be that "PR-216" is not recognized by the Bitbucket API.

If you replace PR-216 with "pull-requests/216/merge" or "pull-requests/216/from", you can download the Jenkinsfile without falling back to a full checkout (assuming it exists in the repo).

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

robin.smith@forgerock.com (JIRA)

unread,
Feb 26, 2018, 8:13:01 AM2/26/18
to jenkinsc...@googlegroups.com

I think the same issue also affects readTrusted. Since that function has no heavyweight checkout to fall back on, the errors seen here will cause a build failure when attempting a readTrusted operation during a Multbranch PR build with Bitbucket

edward.basiliere@sovos.com (JIRA)

unread,
Feb 27, 2018, 1:26:02 PM2/27/18
to jenkinsc...@googlegroups.com

We are experiencing this same issue. This has increased our build time for pull requests, especially for some of our larger repositories.

Jenkins: 2.89.4

Bitbucket Branch Source Plugin: 2.2.10

Bitbucket Server: 4.13.0

We get the error in the description:

/rest/api/1.0/projects/PROJNAME/repos/REPONAME/browse/Jenkinsfile?at=PR-106&start=0&limit=500

But if I replace "PR-106" with another branch, like "development", the lightweight checkout works fine:

/rest/api/1.0/projects/PROJNAME/repos/REPONAME/browse/Jenkinsfile?at=development&start=0&limit=500

 

Thanks!

szpuni@gmail.com (JIRA)

unread,
Jun 13, 2018, 3:37:02 AM6/13/18
to jenkinsc...@googlegroups.com

I seem to he facing exact same issue and I wonder if there is a way to fix it.

Weird thing is that when using Multi branch pipeline job type (Bitbucket Team/Project) when job is triggered by a webhook it just won't work but then few minutes later you can run same job from UI and once you execute it manually without any changes it's pulling branch as normal.

aryak.sengupta@gmail.com (JIRA)

unread,
Jun 27, 2018, 2:30:03 PM6/27/18
to jenkinsc...@googlegroups.com
Aryak Sengupta updated an issue
 
Jenkins / Bug JENKINS-49353
Change By: Aryak Sengupta
Priority: Minor Critical
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

sharathkumar730@yahoo.com (JIRA)

unread,
Jun 27, 2018, 2:52:02 PM6/27/18
to jenkinsc...@googlegroups.com
sharath mogadari commented on Bug JENKINS-49353
 
Re: ERROR: Could not do lightweight checkout, falling back to heavyweight

I am also facing exactly the same issue and I really hope that there is a workaround available for this. A possible hot fix (before the actual issue gets fixed) can be: 

  • Provide an option in the Jenkins UI to explicitly go for a heavyweight checkout (when Bitbucket Source is chosen). Don't make a call to this API /rest/api/1.0/projects/PROJNAME/repos/REPONAME/browse/Jenkinsfile?at=PR-51&start=0&limit=500 every time a PR is submitted (i.e. when this option for heavyweight checkout is checked or when a option for lightweight checkout is unchecked). 

Also, please solve this issue or as I mentioned above, please provide an option (a checkbox maybe in the Jenkins UI) to go for a heavyweight checkout. We don't need the lightweight checkout feature and we would be happy to go with a heavyweight checkout. 

Thanks

sharathkumar730@yahoo.com (JIRA)

unread,
Jun 27, 2018, 2:52:05 PM6/27/18
to jenkinsc...@googlegroups.com

fasching.matthias@gmail.com (JIRA)

unread,
Nov 19, 2018, 5:48:02 AM11/19/18
to jenkinsc...@googlegroups.com

Same here, the URL uses a wrong parameter (PR-XXX) instead of the branch name. I couldn't find any parameter that would me allow to change that.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

tanzeelrana901223@gmail.com (JIRA)

unread,
Oct 16, 2019, 4:18:07 PM10/16/19
to jenkinsc...@googlegroups.com
tanzeel rehman updated an issue
 
Change By: tanzeel rehman
Attachment: Screen Shot 2019-10-16 at 3.56.43 PM.png
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

tanzeelrana901223@gmail.com (JIRA)

unread,
Oct 16, 2019, 4:18:10 PM10/16/19
to jenkinsc...@googlegroups.com
tanzeel rehman commented on Bug JENKINS-49353
 
Re: ERROR: Could not do lightweight checkout, falling back to heavyweight

When I create a pull request in Bitbucket my build fails, see attached image for details. 

Couldn't find remote ref refs/pull-requests/42/from
  • Another thing I have noticed is that when I go to Jenkins UI and re-trigger the build it builds without any errors.
  • Next if I commit to my branch/PR build runs without errors
  • Next when I decline the PR and then open the same PR it again fails and this time when I try to re trigger build from Jenkins UI it continues to fail with the same error and I end up with having to
    • create a new PR with the only solution to run my build pipeline, OR
    • I do a new commit  and that triggers a successful build

My environments are: 

  • Jenkins ver. 2.197
  • Bitbucket Branch Source plugin 2.4.6
  • JENKINS-59808

Reply all
Reply to author
Forward
0 new messages