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

Fingerprint information not kept up to date if project is renamed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      The fingerprint record contains the names of projects. However, if the project is renamed, the link to the usage or originator is lost. Furthermore, if another project is created with that name, then the fingerprint points to the new project.

      Fingerprint records should be updated when projects are renamed.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: dty
          Path:
          changelog.html
          core/src/main/java/hudson/model/AbstractBuild.java
          core/src/main/java/hudson/model/Fingerprint.java
          test/src/test/java/hudson/tasks/FingerprinterTest.java
          http://jenkins-ci.org/commit/jenkins/8dfa5e19ea94195e9737f99457297623d4180c7f
          Log:
          [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed.

          • Added a RenameListener to Fingerprint. When the listener is invoked for
            renamed projects, it will iterate over all the builds of the project looking
            for fingerprint actions. If the build was the originator of the fingerprint,
            the buildPtr is updated; (had to make the name non-final to allow for this).
            If the build is the consumer of a fingerprint, the usages are updated.

          core/src/main/java/hudson/model/Fingerprint.java

          • Expose the fingerprint data inline with the build data in the remote API.
            The renaming code also uses this method as a convenient way to get the
            fingerprints for a build.

          core/src/main/java/hudson/model/AbstractBuild.java

          • Test.

          test/src/test/java/hudson/tasks/FingerprinterTest.java

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: dty Path: changelog.html core/src/main/java/hudson/model/AbstractBuild.java core/src/main/java/hudson/model/Fingerprint.java test/src/test/java/hudson/tasks/FingerprinterTest.java http://jenkins-ci.org/commit/jenkins/8dfa5e19ea94195e9737f99457297623d4180c7f Log: [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed. Added a RenameListener to Fingerprint. When the listener is invoked for renamed projects, it will iterate over all the builds of the project looking for fingerprint actions. If the build was the originator of the fingerprint, the buildPtr is updated; (had to make the name non-final to allow for this). If the build is the consumer of a fingerprint, the usages are updated. core/src/main/java/hudson/model/Fingerprint.java Expose the fingerprint data inline with the build data in the remote API. The renaming code also uses this method as a convenient way to get the fingerprints for a build. core/src/main/java/hudson/model/AbstractBuild.java Test. test/src/test/java/hudson/tasks/FingerprinterTest.java
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1078
          [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed.

          dty : 8dfa5e19ea94195e9737f99457297623d4180c7f
          Files :

          • changelog.html
          • core/src/main/java/hudson/model/Fingerprint.java
          • test/src/test/java/hudson/tasks/FingerprinterTest.java
          • core/src/main/java/hudson/model/AbstractBuild.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1078 [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed. dty : 8dfa5e19ea94195e9737f99457297623d4180c7f Files : changelog.html core/src/main/java/hudson/model/Fingerprint.java test/src/test/java/hudson/tasks/FingerprinterTest.java core/src/main/java/hudson/model/AbstractBuild.java
          Hide
          dty Dean Yu added a comment -

          Fixed towards 1.429 release.

          Show
          dty Dean Yu added a comment - Fixed towards 1.429 release.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: dty
          Path:
          changelog.html
          core/src/main/java/hudson/model/AbstractBuild.java
          core/src/main/java/hudson/model/Fingerprint.java
          test/src/test/java/hudson/tasks/FingerprinterTest.java
          http://jenkins-ci.org/commit/jenkins/8dfa5e19ea94195e9737f99457297623d4180c7f
          Log:
          [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed.

          • Added a RenameListener to Fingerprint. When the listener is invoked for
            renamed projects, it will iterate over all the builds of the project looking
            for fingerprint actions. If the build was the originator of the fingerprint,
            the buildPtr is updated; (had to make the name non-final to allow for this).
            If the build is the consumer of a fingerprint, the usages are updated.

          core/src/main/java/hudson/model/Fingerprint.java

          • Expose the fingerprint data inline with the build data in the remote API.
            The renaming code also uses this method as a convenient way to get the
            fingerprints for a build.

          core/src/main/java/hudson/model/AbstractBuild.java

          • Test.

          test/src/test/java/hudson/tasks/FingerprinterTest.java

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: dty Path: changelog.html core/src/main/java/hudson/model/AbstractBuild.java core/src/main/java/hudson/model/Fingerprint.java test/src/test/java/hudson/tasks/FingerprinterTest.java http://jenkins-ci.org/commit/jenkins/8dfa5e19ea94195e9737f99457297623d4180c7f Log: [FIX JENKINS-10330] Update project names in fingerprints when projects are renamed. Added a RenameListener to Fingerprint. When the listener is invoked for renamed projects, it will iterate over all the builds of the project looking for fingerprint actions. If the build was the originator of the fingerprint, the buildPtr is updated; (had to make the name non-final to allow for this). If the build is the consumer of a fingerprint, the usages are updated. core/src/main/java/hudson/model/Fingerprint.java Expose the fingerprint data inline with the build data in the remote API. The renaming code also uses this method as a convenient way to get the fingerprints for a build. core/src/main/java/hudson/model/AbstractBuild.java Test. test/src/test/java/hudson/tasks/FingerprinterTest.java

            People

            Assignee:
            dty Dean Yu
            Reporter:
            dty Dean Yu
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: