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

P4 Plugin update 1.8.7 breaks against workspaces using the $JOB_NAME variable

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Upgraded to 1.8.7 and this has broken all jobs on our instance which use the JOB_NAME variable for workspace name/mapping.

      Looking at the failed jobs, I can see that the ${JOB_NAME} variable used for both the Workspace name and list of mappings is being treated differently.

      Consider the output below.

      p4 client -o syd_jenkins_NightlyTesting-BUILD_COMPILER-clang-3.5.0
      
      ... p4 client -i +
      P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification.
      Mapping '//syd_jenkins_NightlyTesting/BUILD_COMPILER=clang-3.5.0/...' is not under '//syd_jenkins_NightlyTesting-BUILD_COMPILER-clang-3.5.0/...'.
      
      

      The job configuration contains a workspace name of {{syd_jenkins_\$
      {JOB_NAME} }}and there are a list of mappings for this workspace that take the form of:

      //Depot/core/dummy/... //syd_jenkins_${JOB_NAME}/...

       

      From the output above, I believe the expansion of the JOB_NAME variable is treated differently within the two fields, rendering the 1.8.7 release of the P4 plugin unusable for anyone running in this manner.

      I have downgraded to 1.8.6 in the interim and this has resolved the issue.

        Attachments

          Issue Links

            Activity

            Hide
            mrose Michael Rose added a comment -

            In my case, I switched from ${JOB_NAME} to ${JOB_BASE_NAME} as a short-term fix.

            Show
            mrose Michael Rose added a comment - In my case, I switched from ${JOB_NAME} to ${JOB_BASE_NAME} as a short-term fix.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Paul Allen
            Path:
            src/main/java/org/jenkinsci/plugins/p4/workspace/ManualWorkspaceImpl.java
            src/test/java/org/jenkinsci/plugins/p4/client/WorkspaceTest.java
            http://jenkins-ci.org/commit/p4-plugin/befa99fd217ab61ca72ae0d0e925b2015c32da6a
            Log:
            Look for the expanded original name when updating the view.

            Added test case for Job names with a '/' restricted character.

            JENKINS-50393

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Paul Allen Path: src/main/java/org/jenkinsci/plugins/p4/workspace/ManualWorkspaceImpl.java src/test/java/org/jenkinsci/plugins/p4/client/WorkspaceTest.java http://jenkins-ci.org/commit/p4-plugin/befa99fd217ab61ca72ae0d0e925b2015c32da6a Log: Look for the expanded original name when updating the view. Added test case for Job names with a '/' restricted character. JENKINS-50393
            Hide
            p4paul Paul Allen added a comment -

            If anyone wants to test the fix the latest build for the HPI file is here:

            https://ci.jenkins.io/job/Plugins/job/p4-plugin/job/master/188/

            Show
            p4paul Paul Allen added a comment - If anyone wants to test the fix the latest build for the HPI file is here: https://ci.jenkins.io/job/Plugins/job/p4-plugin/job/master/188/
            Hide
            p4paul Paul Allen added a comment -

            Ready for release.

            Show
            p4paul Paul Allen added a comment - Ready for release.
            Hide
            p4paul Paul Allen added a comment -

            Released in 1.8.8

            Show
            p4paul Paul Allen added a comment - Released in 1.8.8

              People

              Assignee:
              p4paul Paul Allen
              Reporter:
              da5id_ David Hows
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: