• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • git-plugin
    • 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).

      1. First of all with groovy build step i checked that job configuration returns true for requiresWorkspaceForPolling()
      2. 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
      3. Then there are many inconsistency in code:

      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.

          [JENKINS-30345] broken workspace less polling

          Kanstantsin Shautsou created issue -
          Kanstantsin Shautsou made changes -
          Description Original: 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.
          New: 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 {noformat}**{noformat}, but it will return null, that ends in requireWorkspace. If i have blank, then it will be converted to {noformat}**{noformat} 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.
          Kanstantsin Shautsou made changes -
          Description Original: 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 {noformat}**{noformat}, but it will return null, that ends in requireWorkspace. If i have blank, then it will be converted to {noformat}**{noformat} 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.
          New: Job configuration is pretty simple:
          url to repo, credentials, one branchspec with {noformat}**{noformat} or {noformat}*{noformat}. 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 {noformat}**{noformat}, but it will return null, that ends in requireWorkspace. If i have blank, then it will be converted to {noformat}**{noformat} 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.
          Kanstantsin Shautsou made changes -
          Remote Link New: This issue links to "jenkins/pull/1821 (Web Link)" [ 13142 ]
          Kanstantsin Shautsou made changes -
          Link New: This issue is related to JENKINS-30296 [ JENKINS-30296 ]
          Kanstantsin Shautsou made changes -
          Link New: This issue is related to JENKINS-29714 [ JENKINS-29714 ]
          Kanstantsin Shautsou made changes -
          Link New: This issue is related to JENKINS-30473 [ JENKINS-30473 ]
          Kanstantsin Shautsou made changes -
          Link New: This issue is related to JENKINS-18079 [ JENKINS-18079 ]
          Kanstantsin Shautsou made changes -
          Link New: This issue is blocking JENKINS-18079 [ JENKINS-18079 ]
          Kanstantsin Shautsou made changes -
          Link Original: This issue is related to JENKINS-18079 [ JENKINS-18079 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 165447 ] New: JNJira + In-Review [ 181977 ]

            Unassigned Unassigned
            integer Kanstantsin Shautsou
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: