-
Bug
-
Resolution: Unresolved
-
Blocker
-
None
-
git-plugin 2.4.0, 2.3.5
git-client-plugin 1.18.0, 1.19.0
jenkins-lts 1.609.3
Job configuration is pretty simple:
url to repo, credentials, one branchspec with
**
or
*
. Worked before updates (sorry lost previous versions). Job assigned to cloud based slave. After update constantly prints "no workspace triggering build immediately" (lost exact message because bypassed issue atm).
- First of all with groovy build step i checked that job configuration returns true for requiresWorkspaceForPolling()
- I have no extensions so this line of code is bad https://github.com/jenkinsci/git-plugin/blob/054359b8601dff8234b6c45bf2c701c1616f635d/src/main/java/hudson/plugins/git/GitSCM.java#L521
- Then there are many inconsistency in code:
- https://github.com/jenkinsci/git-plugin/blob/054359b8601dff8234b6c45bf2c701c1616f635d/src/main/java/hudson/plugins/git/GitSCM.java#L489-L503 If i want all branches, then i have
**
, but it will return null, that ends in requireWorkspace. If i have blank, then it will be converted to
**
that is weird...
- https://github.com/jenkinsci/git-plugin/blob/3a83b2c181dd7bfb32e44c306b6360db8a83471c/src/main/java/hudson/plugins/git/BranchSpec.java#L40-L47 If you have blank, then treat as '**', but if you have space, then it will be trimmed and saved as empty. First of all trim must be done always before any checks, secondary use guava/commons checkNotNull and StringUtils.isEmpty, nonNull and etc helper codes, third place braces as such code ends to not obvious bugs, fourth replace tabs into spaces, that mixed in one line and screw screen (that ends again to bugs).
So to get working polling i set SPACE in branchspec.
Sorry, but have no time for providing any fixes in this over hacked plugin code.
Status blocker, because with cloud based slaves it triggers builds infinitely.
- is blocking
-
JENKINS-18079 GitHub Push always builds if workspace is on offline slave node
- Resolved
- is related to
-
JENKINS-29714 infinite polling with variable in branchspec
- Open
-
JENKINS-30296 Infinite loop (pooling changes continuously) when using "*/master" branches to build
- Open
-
JENKINS-30473 polling fails when cloud slaves shutdowns fast
- Closed
- links to