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

Corruption of workspace due to incomplete parameters substitution (no validation)

      Hello,

      We have experienced several issues with substitution of parameters during execution of operation.

      For example, ${EXECUTOR_NUMBER} works well for checkout(), but this parameter is not accessible during execution processWorkspaceBeforeDeletion(). It causes corruption of job, which requires manual fix at server’s side. Reproduction steps:
      • We start job, and checkout() successfully creates workspace.
      • Cleanup workspace…
      • getWorkspace() in processWorkspaceBeforeDeletion() creates new workspace at Perforce server (name contains unsubstituted EXECUTOR_NUMBER parameter) and then deletes it. BTW, it deletes local folders as well.
      • Run job again…
      • Checkout() completes successfully, because P4 server thinks that workspace is up to date
      • Job fails, because there’s no data in job’s workspace after p4 checkout

      Best regards,
      Oleg Nenashev

          [JENKINS-18346] Corruption of workspace due to incomplete parameters substitution (no validation)

          Oleg Nenashev created issue -
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Assignee Original: Rob Petti [ rpetti ] New: Oleg Nenashev [ oleg_nenashev ]
          Oleg Nenashev made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Oleg Nenashev made changes -
          Summary Original: Corruption of workspace due to unfull parameters substitution (no validation) New: Corruption of workspace due to incomplete parameters substitution (no validation)
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 149653 ] New: JNJira + In-Review [ 193228 ]
          Jenkins IRC Bot made changes -
          Component/s New: p4-plugin [ 19224 ]
          Component/s Original: perforce-plugin [ 15506 ]

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: