Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67931

Preview check Only populate strategy hits maxresults P4 server limitation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • p4-plugin
    • Jenkins 2.289.3
      P4 Plugin 1.12.2

      Hello,

      I have a hunch it might be a regression from JENKINS-57870.

      I have a Freestyle job with a Source Code Management set as Perforce. View maps a pretty big directory.

      I only need to have my job triggered, I don't want to sync anything, so I picked Preview check Only.

      This strategy, unfortunately, hits a `maxresults` limitation from a server. It seems that this operation:

      p4 changes -m1 -ssubmitted //depot/bigdir/...@123456
      

      ... isn't cheap, actually. `-m1` filtering applies after getting all the possible data from the server. On the contrary, this operation:

      p4 changes -m1 -ssubmitted //depot/bigdir/...
      

      ... seems to be fine.

      I also don't entirely understand what this operation is supposed to do. The result for my tests was, that it returns the very same changelist number.

      In the mentioned JENKINS-57870 it looks like the fetching was supposed to be done in batches. It doesn't seems to do that in a current version of a plugin in this scenario. We have a  Head change query limit configured, as well as I tested values like 1, 10, 100 there. Didn't help.

      Also setting, unsetting Quiete option didn't help as well.

      Ideally I would like to have a Populate strategy set as None, as I am just interested with P4_CHANGELIST number from the P4 trigger call via property.

      Logs

      Building in workspace /<cut>/mmatczak/tests/big-p4-dir-triggered
      Executor number at runtime: 0
      ... p4 login +
      ... p4 login -s +
      ... p4 client -o jenkins-master-mmatczak-tests-big-p4-dir-triggered-78 +
      ... p4 info +
      ... p4 info +
      ... p4 client -o jenkins-master-mmatczak-tests-big-p4-dir-triggered-78 +
      ... p4 client -i +
      ...   View: +
      ... p4 counter change +
      ... p4 changes -m1 -ssubmitted //jenkins-master-mmatczak-tests-big-p4-dir-triggered-78/___ -
      p4 changes -m1 -ssubmitted //jenkins-master-mmatczak-tests-big-p4-dir-triggered-78/...@123456
      
      Request too large (over 1500000); see 'p4 help maxresults'.
      
      ERROR: P4: Unable to initialise CheckoutTask: com.perforce.p4java.exception.RequestException: Request too large (over 1500000); see 'p4 help maxresults'.
      
      Finished: FAILURE
      

            Unassigned Unassigned
            mmatczak Maciej Matczak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: