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

Unshelve doesn't update changelist and prints error when used with manual workspace specification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • None
    • P4 Plugin Version1.13.3

      Example pipeline:

      stage('Test') {
          node() {
              checkout perforce(credential: 'jenkinsp4', populate: autoClean(delete: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, replace: true, tidy: false), workspace: manualSpec(charset: 'utf8', cleanup: false, name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', pinHost: false, spec: clientSpec(allwrite: false, backup: true, changeView: '', clobber: true, compress: false, line: 'LOCAL', locked: false, modtime: false, rmdir: false, serverID: '', view: '//depot/main/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...')))
              p4unshelve credential: 'jenkinsp4', ignoreEmpty: false, resolve: 'none', shelf: '3731', tidy: false, workspace: manualSpec(charset: 'utf8', cleanup: false, name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', pinHost: false, spec: clientSpec(allwrite: false, backup: false, changeView: '', clobber: true, compress: false, line: 'LOCAL', locked: false, modtime: false, rmdir: false, serverID: '', view: '//depot/main/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...'))
          }
      }

      Although the CL is unshelved, it's not visible on the build changes page, and the following error is printed on the console:

       

      Error in client specification.
      Mapping '//jenkins-NODE_NAME-JOB_NAME-EXECUTOR_NUMBER/...' is not under '//jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...'.
      (p4):stop:10
      P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification.
      Mapping '//jenkins-NODE_NAME-JOB_NAME-EXECUTOR_NUMBER/...' is not under '//jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...'.
              at com.perforce.p4java.impl.mapbased.server.cmd.ResultMapParser.handleErrorStr(ResultMapParser.java:146)
              at com.perforce.p4java.impl.mapbased.server.cmd.ResultMapParser.parseCommandResultMapIfIsInfoMessageAsString(ResultMapParser.java:98)
              at com.perforce.p4java.impl.mapbased.server.cmd.ClientDelegator.updateClient(ClientDelegator.java:212)
              at com.perforce.p4java.impl.mapbased.server.Server.updateClient(Server.java:1728)
              at com.perforce.p4java.impl.mapbased.client.Client.update(Client.java:528)
              at org.jenkinsci.plugins.p4.client.ClientHelper.updateClient(ClientHelper.java:191)
              at org.jenkinsci.plugins.p4.client.ClientHelper.clientLogin(ClientHelper.java:170)
              at org.jenkinsci.plugins.p4.client.ClientHelper.<init>(ClientHelper.java:104)
              at org.jenkinsci.plugins.p4.unshelve.UnshelveBuilder.updateChangeLog(UnshelveBuilder.java:141)
              at org.jenkinsci.plugins.p4.unshelve.UnshelveBuilder.unshelve(UnshelveBuilder.java:134)
              at org.jenkinsci.plugins.p4.unshelve.UnshelveBuilderStep.perform(UnshelveBuilderStep.java:42)
              at org.jenkinsci.plugins.p4.workflow.P4UnshelveStep$P4UnshelveStepExecution.run(P4UnshelveStep.java:133)
              at org.jenkinsci.plugins.p4.workflow.P4UnshelveStep$P4UnshelveStepExecution.run(P4UnshelveStep.java:119)
              at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:750)
      

       

            Unassigned Unassigned
            abannerth Akos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: