Jenkins printing every remote branch on all builds [JENKINS-22794]

1,492 views
Skip to first unread message

Jordan Sokolic

unread,
Jul 25, 2019, 4:25:52 AM7/25/19
to Jenkins Users
We are experiencing an issue where Jenkins prints every remote branch in our repository to the console in every build. Since we have several thousand remote branches, this creates a lot of clutter in console logs.

Example:

10:29:19   > git rev-parse HEAD^{commit} # timeout=10
10:29:20  Seen branch in repository origin/32_.....
10:29:20  Seen branch in repository origin/337.....
10:29:20  Seen branch in repository origin/359.....
10:29:20  Seen branch in repository origin/4k_.....
10:29:20  Seen branch in repository origin/API.....
10:29:20  Seen branch in repository origin/API.....
10:29:20  Seen branch in repository origin/API.....
10:29:20  Seen branch in repository origin/API.....
10:29:20  Seen branch in repository origin/API.....
10:29:20  Seen branch in repository origin/API.....
10:29:20  Seen branch in repository origin/API.....
10:29:20  Seen branch in repository origin/API.....
10:29:20  Seen branch in repository origin/API.....
10:29:20  Seen branch in repository origin/API.....
(and so on)
10:29:20  Seen 4,483 remote branches
10:29:20   > git show-ref --tags -d # timeout=10
10:29:20  JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://wiki.jenkins-ci.org/display/JENKINS/Remove+Git+Plugin+BuildsByBranch+BuildData

Per JENKINS-22794 we have tried setting -Dorg.jenkinsci.plugins.gitclient.GitClient.quietRemoteBranches=true in /etc/default/jenkins and confirmed that it is in fact loaded in the cmdline, but Jenkins insists on printing all remote branches.

From the source it's pretty clear that this should work, but it doesn't.

Jenkins version: 2.176.1 

OS: Debian 9

Git client plugin version: 2.8.0

Thank you for any help.

Jordan

Geoffroy J

unread,
Jul 26, 2019, 6:09:05 AM7/26/19
to Jenkins Users
Hi
have you set the option on both master and slaves?
BR

sanjay mishra

unread,
Jul 27, 2019, 6:42:39 AM7/27/19
to jenkins...@googlegroups.com
Hi
i am facing 1 error when integrating my Git hub project in Jenkins 


Failed to connect to repository : Error performing command: git.exe ls-remote -h https://github.com/sanjay3933/GITTest.git HEAD  

Please help.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/692edd0b-18ed-4957-ba20-4a0b28cd78ae%40googlegroups.com.

Mark Waite

unread,
Jul 27, 2019, 7:54:15 AM7/27/19
to Jenkins Users
Sanjay, your question is unrelated to the original question that Jordan asked.  It is best to use a new thread rather than asking an unrelated question on an existing thread.

Jordan,

I set setting -Dorg.jenkinsci.plugins.gitclient.GitClient.quietRemoteBranches=true on the command line I used to start Jenkins in a docker container and have confirmed that it works as expected.  It needs to be set as a Java option, not as a Jenkins option.

When it is set correctly, the value will be visible in the "System Properties" page that can be displayed from "Manage Jenkins".

System-Properties.png



--
Thanks!
Mark Waite

Jordan Sokolic

unread,
Jul 28, 2019, 3:17:16 PM7/28/19
to Jenkins Users
Mark,

That seems to have done the trick. I did in fact have the system property set as a Jenkins argument. Moving it from JENKINS_ARGS to JAVA_ARGS in the environment file fixed the issue.

Thank you very much!

Jordan
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.


--
Thanks!
Mark Waite
Reply all
Reply to author
Forward
0 new messages