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

Polling fails when using quotes in view mask

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      Server is linux x86_64.
      Slave is Windows Server 2003 Standard Edition, 5.2.3790 Service Pack 2 Build 3790
    • Similar Issues:

      Description

      No build has been triggered for days even though a change to the sources has been checked in.

      This is the Perforce Polling Log:
      Started on Feb 8, 2011 3:20:57 PM
      Looking for changes...
      Using node: twinpeaks-vm
      Using remote perforce client: hudson-OE-HUBS-DW-TWINPEAKS-VM
      [OE-HUBS-DW] $ "C:\Program Files\Perforce\p4" workspace -o hudson-OE-HUBS-DW-TWINPEAKS-VM
      Saving modified client hudson-OE-HUBS-DW-TWINPEAKS-VM
      [OE-HUBS-DW] $ "C:\Program Files\Perforce\p4" -s client -i
      Last sync'd change was 663559
      [OE-HUBS-DW] $ "C:\Program Files\Perforce\p4" counter change
      [OE-HUBS-DW] $ "C:\Program Files\Perforce\p4" -s changes '"//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276'
      No changes found.
      Done. Took 1.2 sec
      No changes

      This is what I get on the slave server when I do a "p4 changes":
      --------------
      Z:\>p4 -u rolem -c hudson-OE-HUBS-DW-TWINPEAKS-VM -s changes "//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673241
      info: Change 665714 on 2011/02/03 by fmartin@lglt-fmartin 'Eliminate 'Customer Requests' i'
      exit: 0

      So Perforce reports that something has been checked in, but the Perforce plugin doesn't seem to be seeing it.

      One other thing worth mentioning: We have checked "Use View Mask" in the Advanced button of Perforce settings. The View mask is:
      "//depot/IT_Engineering/DIAL - New QC App/..."
      and the "Use mask when polling" checkbox is checked.

        Attachments

          Activity

          michaelcurtisspatrick Michael Curtiss created issue -
          Hide
          rpetti Rob Petti added a comment -

          Can you post your Perforce Plugin and Hudson/Jenkins version numbers, please?

          Also, is this happening consistently, or just every once and a while?

          Show
          rpetti Rob Petti added a comment - Can you post your Perforce Plugin and Hudson/Jenkins version numbers, please? Also, is this happening consistently, or just every once and a while?
          rpetti Rob Petti made changes -
          Field Original Value New Value
          Assignee Rob Petti [ rpetti ]
          Hide
          michaelcurtisspatrick Michael Curtiss added a comment -

          Hudson: Hudson ver. 1.388-SNAPSHOT (private-01/13/2011 15:39-kohsuke)
          Perforce Plugin: 1.1.13

          I believe this is intermittent, but I've asked the developer who depends on this build to confirm that. I'll let you know what he says.

          Show
          michaelcurtisspatrick Michael Curtiss added a comment - Hudson: Hudson ver. 1.388-SNAPSHOT (private-01/13/2011 15:39-kohsuke) Perforce Plugin: 1.1.13 I believe this is intermittent, but I've asked the developer who depends on this build to confirm that. I'll let you know what he says.
          Hide
          rpetti Rob Petti added a comment -

          Linking to JENKINS-7664, since this is probably related to the intermittent remoting issues we've been having since 1.378.

          Show
          rpetti Rob Petti added a comment - Linking to JENKINS-7664 , since this is probably related to the intermittent remoting issues we've been having since 1.378.
          rpetti Rob Petti made changes -
          Link This issue depends on JENKINS-7664 [ JENKINS-7664 ]
          Hide
          michaelcurtisspatrick Michael Curtiss added a comment -

          I talked with the developer, and we are not sure about whether this happens every time. We did some testing when we added the View Mask setting and thought, at the time, that builds were being triggered correctly. But he says he doesn't much pay attention until he gets close to a release. We don't have a QA engineer on this project and that is who would usually be watching the CI builds more closely.

          We can do some experiments, but we need to hold off for at least a couple of days since the project is trying doing a release right now.

          Show
          michaelcurtisspatrick Michael Curtiss added a comment - I talked with the developer, and we are not sure about whether this happens every time. We did some testing when we added the View Mask setting and thought, at the time, that builds were being triggered correctly. But he says he doesn't much pay attention until he gets close to a release. We don't have a QA engineer on this project and that is who would usually be watching the CI builds more closely. We can do some experiments, but we need to hold off for at least a couple of days since the project is trying doing a release right now.
          Hide
          michaelcurtisspatrick Michael Curtiss added a comment -

          After more experimenting, and refreshing our memory:

          • This may never have worked. I have been able to reproduce the bug consistently.
          • If I uncheck the View Mask setting polling starts working.
          • I'm thinking now that we tested the Use View Mask with a different job and the, probably, just assumed this job would work the same. One glaring difference between the two jobs is that this one has spaces in the depot path. Is it possible that the Use View Mask selection is not handling spaces correctly?
          Show
          michaelcurtisspatrick Michael Curtiss added a comment - After more experimenting, and refreshing our memory: This may never have worked. I have been able to reproduce the bug consistently. If I uncheck the View Mask setting polling starts working. I'm thinking now that we tested the Use View Mask with a different job and the, probably, just assumed this job would work the same. One glaring difference between the two jobs is that this one has spaces in the depot path. Is it possible that the Use View Mask selection is not handling spaces correctly?
          Hide
          rpetti Rob Petti added a comment -

          One thing I do notice is that you tested using

          -s changes "//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673241
          

          What happens if you try what is actually being executed?

          -s changes '"//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276'
          

          Perhaps perforce just doesn't like the extra quotes...

          Show
          rpetti Rob Petti added a comment - One thing I do notice is that you tested using -s changes " //depot/IT_Engineering/DIAL - New QC App/..." @663559,@673241 What happens if you try what is actually being executed? -s changes ' " //depot/IT_Engineering/DIAL - New QC App/..." @663559,@673276' Perhaps perforce just doesn't like the extra quotes...
          Hide
          michaelcurtisspatrick Michael Curtiss added a comment -

          Quite right you are. I'm not sure now why I removed those quotes in the first place. Probably because they broke things. That is kind of inverted reasoning.

          So, on Windows I get:

          Z:\>p4 -u rolem -s changes '"//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276'
          error: Invalid changelist/client/label/date '@673276''.
          exit: 1

          Z:\>p4 -u rolem -s changes "//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276
          info: Change 665714 on 2011/02/03 by fmartin@lglt-fmartin 'Eliminate 'Customer Requests' i'
          exit: 0

          Unix breaks similiarly:

          lgmac-mpatrick:~ cpatrick$ p4 -u rolem -c cpatrick_lgmac -s changes '"//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276'
          error: Path '/Users/cpatrick/"//depot/IT_Engineering/DIAL - New QC App/..."' is not under client's root '/Users/cpatrick/Perforce/workspaces/cpatrick_lgmac'.
          exit: 1
          lgmac-mpatrick:~ cpatrick$ p4 -u rolem -c cpatrick_lgmac -s changes "//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276
          info: Change 665714 on 2011/02/03 by fmartin@lglt-fmartin 'Eliminate 'Customer Requests' i'
          exit: 0

          Just out of curiosity I tried the same quoting combination with a depot path that doesn't have any spaces and it fails also:

          lgmac-mpatrick:~ cpatrick$ p4 -u rolem -c cpatrick_lgmac -s changes "//depot/IT_Engineering/ReleaseEng/release/example/nftemplate1/src/..."@663559,@675736
          info: Change 675736 on 2011/02/09 by role-oe@hudson-OE-TEMPLATE-force-branch-buildnode06 'Automated force of changes from'
          exit: 0
          lgmac-mpatrick:~ cpatrick$ p4 -u rolem -c cpatrick_lgmac -s changes '"//depot/IT_Engineering/ReleaseEng/release/example/nftemplate1/src/..."@663559,@675736'
          error: Path '/Users/cpatrick/"//depot/IT_Engineering/ReleaseEng/release/example/nftemplate1/src/..."' is not under client's root '/Users/cpatrick/Perforce/workspaces/cpatrick_lgmac'.
          exit: 1

          Conclusion: I don't know why the command is being constructed with the single quotes but that sure enough is breaking it regardless of whether there are spaces in the path or not.

          Show
          michaelcurtisspatrick Michael Curtiss added a comment - Quite right you are. I'm not sure now why I removed those quotes in the first place. Probably because they broke things. That is kind of inverted reasoning. So, on Windows I get: Z:\>p4 -u rolem -s changes '"//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276' error: Invalid changelist/client/label/date '@673276''. exit: 1 Z:\>p4 -u rolem -s changes "//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276 info: Change 665714 on 2011/02/03 by fmartin@lglt-fmartin 'Eliminate 'Customer Requests' i' exit: 0 Unix breaks similiarly: lgmac-mpatrick:~ cpatrick$ p4 -u rolem -c cpatrick_lgmac -s changes '"//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276' error: Path '/Users/cpatrick/"//depot/IT_Engineering/DIAL - New QC App/..."' is not under client's root '/Users/cpatrick/Perforce/workspaces/cpatrick_lgmac'. exit: 1 lgmac-mpatrick:~ cpatrick$ p4 -u rolem -c cpatrick_lgmac -s changes "//depot/IT_Engineering/DIAL - New QC App/..."@663559,@673276 info: Change 665714 on 2011/02/03 by fmartin@lglt-fmartin 'Eliminate 'Customer Requests' i' exit: 0 Just out of curiosity I tried the same quoting combination with a depot path that doesn't have any spaces and it fails also: lgmac-mpatrick:~ cpatrick$ p4 -u rolem -c cpatrick_lgmac -s changes "//depot/IT_Engineering/ReleaseEng/release/example/nftemplate1/src/..."@663559,@675736 info: Change 675736 on 2011/02/09 by role-oe@hudson-OE-TEMPLATE-force-branch-buildnode06 'Automated force of changes from' exit: 0 lgmac-mpatrick:~ cpatrick$ p4 -u rolem -c cpatrick_lgmac -s changes '"//depot/IT_Engineering/ReleaseEng/release/example/nftemplate1/src/..."@663559,@675736' error: Path '/Users/cpatrick/"//depot/IT_Engineering/ReleaseEng/release/example/nftemplate1/src/..."' is not under client's root '/Users/cpatrick/Perforce/workspaces/cpatrick_lgmac'. exit: 1 Conclusion: I don't know why the command is being constructed with the single quotes but that sure enough is breaking it regardless of whether there are spaces in the path or not.
          Hide
          rpetti Rob Petti added a comment -

          I've sifted through the code a bit, and I think it should work if you simply remove the double quotes from that line in your view mask. Can you give that a shot? The config page might complain about it not being valid, but just ignore it. If that fixes it, I'll add some code to strip them out before passing them onto the command line.

          Show
          rpetti Rob Petti added a comment - I've sifted through the code a bit, and I think it should work if you simply remove the double quotes from that line in your view mask. Can you give that a shot? The config page might complain about it not being valid, but just ignore it. If that fixes it, I'll add some code to strip them out before passing them onto the command line.
          Hide
          michaelcurtisspatrick Michael Curtiss added a comment -

          Now I've figured out the combination that works: Remove the quotes from the path in the View Mask. That seems obvious now, but it was not initially obvious because, without the quotes the same path fails in the client spec. (I think that is true. At the very least, the quotes work in the client spec.)

          So it might be argued that this is not really a bug. You just have to know not to use quotes in the View Mask.

          But I would still argue that it is a bug, the reason being that the View Mask is supposed to be a subset of the client spec. The way I got my path for the View Mask was by cutting and pasting from the client spec. It seems to me like, whatever is supported in the client should work in the View Mask.

          I leave it to you to decide what to do with this "bug". For me, I now know the "work around", so my job once agains works.

          Show
          michaelcurtisspatrick Michael Curtiss added a comment - Now I've figured out the combination that works: Remove the quotes from the path in the View Mask. That seems obvious now, but it was not initially obvious because, without the quotes the same path fails in the client spec. (I think that is true. At the very least, the quotes work in the client spec.) So it might be argued that this is not really a bug. You just have to know not to use quotes in the View Mask. But I would still argue that it is a bug, the reason being that the View Mask is supposed to be a subset of the client spec. The way I got my path for the View Mask was by cutting and pasting from the client spec. It seems to me like, whatever is supported in the client should work in the View Mask. I leave it to you to decide what to do with this "bug". For me, I now know the "work around", so my job once agains works.
          Hide
          michaelcurtisspatrick Michael Curtiss added a comment -

          It looks like we came to same conclusion independently. Thanks for you help with this.

          Show
          michaelcurtisspatrick Michael Curtiss added a comment - It looks like we came to same conclusion independently. Thanks for you help with this.
          rpetti Rob Petti made changes -
          Link This issue depends on JENKINS-7664 [ JENKINS-7664 ]
          Hide
          rpetti Rob Petti added a comment -

          Updating summary.

          Show
          rpetti Rob Petti added a comment - Updating summary.
          rpetti Rob Petti made changes -
          Summary Polling sometimes fails Polling fails when using quotes in view mask
          Hide
          rpetti Rob Petti added a comment -

          Fixed. Will be released with 1.2.3.

          Show
          rpetti Rob Petti added a comment - Fixed. Will be released with 1.2.3.
          rpetti Rob Petti made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 138875 ] JNJira + In-Review [ 188197 ]

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              michaelcurtisspatrick Michael Curtiss
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: