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

Changes are not tracked when syncing to a label.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      Assume jobs A1 and A2 are two jobs that are built from the same sourcecode. A1
      builds the code and leaves the binaries as an artifact for A2, which runs the
      tests. A2 needs the sourcecode because input to the the testcases are there. The
      A1 build is tagged so A2 can sync the correct revisions. A1 and A2 run in
      separate workspaces. A1 is triggered by SCM, A2 is triggered by completion of A1.

      The problem is that the changes in the project are not listed in A2, even though
      it's the same project in the same SCM. I feel they should be, since the changes
      are actually sync'd out to the workspace when the job runs.
      We're running hudson 1.331, perforce plugin 1.0.15 (but I'm not sure it's the
      plugin's fault?)
      As said, job A2 has an SCM setup that involves sync'ing to the label/tag set by A1.

        Attachments

          Activity

          Hide
          torbent torbent added a comment -

          Alright
          I just didn't find it fair to keep an issue open that couldn't be fixed. It all depends on the way one uses labels, and I agree that in the "usual" use of labels it will be a bit tricky to determine changes. Could probably be done, though. Hmm, I suddenly recall that a former colleague of mine did something like this once ...
          Then there's our case with the same label that moves ...

          Show
          torbent torbent added a comment - Alright I just didn't find it fair to keep an issue open that couldn't be fixed. It all depends on the way one uses labels, and I agree that in the "usual" use of labels it will be a bit tricky to determine changes. Could probably be done, though. Hmm, I suddenly recall that a former colleague of mine did something like this once ... Then there's our case with the same label that moves ...
          Hide
          seanhoughton seanhoughton added a comment -

          Considering it's easy to get the changes when using changelist numbers instead of labels I would suggest the first step would be to add support for change tracking when the 'label' parameter is a number. I would expect that most parameterized downstream builds either use changelists already or could easily be converted to use changelists.

          Show
          seanhoughton seanhoughton added a comment - Considering it's easy to get the changes when using changelist numbers instead of labels I would suggest the first step would be to add support for change tracking when the 'label' parameter is a number. I would expect that most parameterized downstream builds either use changelists already or could easily be converted to use changelists.
          Hide
          rpetti Rob Petti added a comment -

          I was really looking for a solution that would be agnostic to the type of label used, be it changeset, automatic label, or tagged label. I think I found one by using 'p4 files //workpsace/...#have' and 'p4 files //workspace/...@label' before syncing to the label, and comparing the list of changes that are dumped out. This should guarantee a list of changes that are being added to the workspace.

          Show
          rpetti Rob Petti added a comment - I was really looking for a solution that would be agnostic to the type of label used, be it changeset, automatic label, or tagged label. I think I found one by using 'p4 files //workpsace/...#have' and 'p4 files //workspace/...@label' before syncing to the label, and comparing the list of changes that are dumped out. This should guarantee a list of changes that are being added to the workspace.
          Hide
          rpetti Rob Petti added a comment -

          The plugin will now (roughly) estimate the changeset of a label, and use that to determine the changes made since the last build. It's not 100% accurate if the label has a mix of changesets, but should be accurate enough for most.

          Show
          rpetti Rob Petti added a comment - The plugin will now (roughly) estimate the changeset of a label, and use that to determine the changes made since the last build. It's not 100% accurate if the label has a mix of changesets, but should be accurate enough for most.
          Hide
          torbent torbent added a comment -

          Closing. The solution works very nicely for the problem I originally outlined.
          Thank you, and apologies for not closing sooner - I've been slow migrating to Jenkins and newer Perforce plugin...

          Show
          torbent torbent added a comment - Closing. The solution works very nicely for the problem I originally outlined. Thank you, and apologies for not closing sooner - I've been slow migrating to Jenkins and newer Perforce plugin...

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              torbent torbent
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: