Skip to content

[JENKINS-17606] Copy Artifact's fingerprinting creates second hudson.tasks.Fingerprinter_-FingerprintAction section with just the artifacts copied #377

Closed

Description

@jenkins-infra-bot

Originally reported by maciasello, imported from: Copy Artifact's fingerprinting creates second hudson.tasks.Fingerprinter_-FingerprintAction section with just the artifacts copied
  • assignee: wolfs
  • status: Closed
  • priority: Minor
  • component(s): copyartifact-plugin, fingerprint-plugin
  • label(s): 1.532.3-fixed
  • resolution: Fixed
  • resolved: 2014-02-26T20:02:30+00:00
  • votes: 1
  • watchers: 6
  • imported: 20260107-133739
  • environment: Win 2008RC2, Jenkins 1.504, Copy Artifact v1.26
2 attachments

Activity

  1. jenkins-infra-bot commented on Apr 17, 2013

    @jenkins-infra-bot
    Author
    maciasello:
    • Original comment link
    • Raw content of original comment:

      Ok, this seems more tricky. The problem occurs when CopyArtifact is done in a job invoked in a non-blocking manner from the main job:

        (A) main job
         (B) |-> parametrized trigger action as Build step
          (C) |-> Copy Artifacts from job (A)
      

      What I see in code is that FingerprintingCopyMethod:116 checks if there is FingerprintAction already for the Build or not and handles it fine:

      FingerprintAction fa = r.getAction(FingerprintAction.class);
      if (fa != null) fa.add(fingerprints);
      else            r.getActions().add(new FingerprintAction(r, fingerprints));
      

      On the other hand if CopyArtifact is called earlier for the Build, Fingerprinter task does not check if the FingerprintAction was present or not and adds the second instance (see Fingerprinter.java:136).

      Is it correct approach just to mimic the CopyArtifact behavior and check for previously added FingerprintAction?

    Ok, this seems more tricky. The problem occurs when CopyArtifact is done in a job invoked in a non-blocking manner from the main job:

      (A) main job
       (B) |-> parametrized trigger action as Build step
        (C) |-> Copy Artifacts from job (A)
    
    

    What I see in code is that FingerprintingCopyMethod:116 checks if there is FingerprintAction already for the Build or not and handles it fine:

    FingerprintAction fa = r.getAction(FingerprintAction.class);
    if (fa != null) fa.add(fingerprints);
    else    r.getActions().add(new FingerprintAction(r, fingerprints));
    
    

    On the other hand if CopyArtifact is called earlier for the Build, Fingerprinter task does not check if the FingerprintAction was present or not and adds the second instance (see Fingerprinter.java:136).

    Is it correct approach just to mimic the CopyArtifact behavior and check for previously added FingerprintAction?

  2. jenkins-infra-bot commented on Apr 27, 2013

    @jenkins-infra-bot
    Author
    marcsanfacon:
    • Original comment link
    • Raw content of original comment:

      I changed the priority from Critical to minor since I don't think this is blocking.

      I am no Jenkins dev expert either. I did this extension because I needed to create the fingerprints before the end of the build. The only thing this plugin does is called the fingerprint base methods in Jenkins.

      As you describes, maybe the fingerprint methods in Jenkins does not handle well the non-blocking calls?

    I changed the priority from Critical to minor since I don't think this is blocking.

    I am no Jenkins dev expert either. I did this extension because I needed to create the fingerprints before the end of the build. The only thing this plugin does is called the fingerprint base methods in Jenkins.

    As you describes, maybe the fingerprint methods in Jenkins does not handle well the non-blocking calls?

  3. jenkins-infra-bot commented on Jul 27, 2013

    @jenkins-infra-bot
    Author
    deepchip:
    • Original comment link
    • Raw content of original comment:

      This may not be blocking, but in very large teams, having to explain this does not help me build trust in the Jenkins.

    This may not be blocking, but in very large teams, having to explain this does not help me build trust in the Jenkins.

  4. jenkins-infra-bot commented on Jul 27, 2013

    @jenkins-infra-bot
    Author
    kutzi:
    • Original comment link
    • Raw content of original comment:

      I've you think that a change to Jenkins' core Fingerprinter would fix the issue, feel free to create a pull request with a fix.

    I've you think that a change to Jenkins' core Fingerprinter would fix the issue, feel free to create a pull request with a fix.

  5. jenkins-infra-bot commented on Feb 4, 2014

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in jenkins
    User: Stefan Wolf
    Path:
    changelog.html
    core/src/main/java/hudson/tasks/Fingerprinter.java
    test/src/test/java/hudson/tasks/FingerprinterTest.java
    http://jenkins-ci.org/commit/jenkins/be7a97ee32b57dcb27b8fd6c908ebbe451220902
    Log:
    [FIXED JENKINS-17606] Reuse existing fingerprint action if present.
    Prevents multiple FingerprintActions.

  6. jenkins-infra-bot commented on Feb 4, 2014

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in jenkins
    User: Stefan Wolf
    Path:
    changelog.html
    core/src/main/java/hudson/tasks/Fingerprinter.java
    test/src/test/java/hudson/tasks/FingerprinterTest.java
    http://jenkins-ci.org/commit/jenkins/cd0b3c7afebdb6c2fb74ff0ed81656b8ebf02c77
    Log:
    Merge pull request #1113 from wolfs/fingerprint

    [FIXED JENKINS-17606] Reuse existing fingerprint action if present.

    Compare: jenkinsci/jenkins@931d296...cd0b3c7

  7. jenkins-infra-bot commented on Feb 24, 2014

    @jenkins-infra-bot
    Author
    dogfood:
    • Original comment link
    • Raw content of original comment:

      Integrated in jenkins_main_trunk #3192 [FIXED JENKINS-17606] Reuse existing fingerprint action if present. (Revision be7a97ee32b57dcb27b8fd6c908ebbe451220902)

      Result = SUCCESS Stefan Wolf : be7a97ee32b57dcb27b8fd6c908ebbe451220902 Files :

      • test/src/test/java/hudson/tasks/FingerprinterTest.java
      • changelog.html
      • core/src/main/java/hudson/tasks/Fingerprinter.java

    Integrated in jenkins_main_trunk #3192
    [FIXED JENKINS-17606] Reuse existing fingerprint action if present. (Revision be7a97ee32b57dcb27b8fd6c908ebbe451220902)

    Result = SUCCESS
    Stefan Wolf : be7a97ee32b57dcb27b8fd6c908ebbe451220902
    Files :

    • test/src/test/java/hudson/tasks/FingerprinterTest.java
    • changelog.html
    • core/src/main/java/hudson/tasks/Fingerprinter.java
  8. jenkins-infra-bot commented on Feb 26, 2014

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original comment:

      Code changed in jenkins User: Stefan Wolf Path: core/src/main/java/hudson/tasks/Fingerprinter.java test/src/test/java/hudson/tasks/FingerprinterTest.java http://jenkins-ci.org/commit/jenkins/1c847ccb5cdd92d36cc9344482247d6d86cff7df Log: [FIXED JENKINS-17606] Reuse existing fingerprint action if present. Prevents multiple FingerprintActions.

      (cherry picked from commit be7a97ee32b57dcb27b8fd6c908ebbe451220902)

      Conflicts: changelog.html core/src/main/java/hudson/tasks/Fingerprinter.java test/src/test/java/hudson/tasks/FingerprinterTest.java

    Code changed in jenkins
    User: Stefan Wolf
    Path:
    core/src/main/java/hudson/tasks/Fingerprinter.java
    test/src/test/java/hudson/tasks/FingerprinterTest.java
    http://jenkins-ci.org/commit/jenkins/1c847ccb5cdd92d36cc9344482247d6d86cff7df
    Log:
    [FIXED JENKINS-17606] Reuse existing fingerprint action if present.
    Prevents multiple FingerprintActions.

    (cherry picked from commit be7a97ee32b57dcb27b8fd6c908ebbe451220902)

    Conflicts:
    changelog.html
    core/src/main/java/hudson/tasks/Fingerprinter.java
    test/src/test/java/hudson/tasks/FingerprinterTest.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions