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

Recording fingerprints ignores the excludes when archiving artifacts

    Details

    • Similar Issues:
    • Released As:
      Jenkins 2.177

      Description

      Seen while searching for workaround for JENKINS-41695:

      We have a project which archives some files.
      We exclude some files to be archived.
      When fingerprinting all artifacts, it ignores the exclude setting.

      Our Job configuration is as follows:

      • Post-Build Actions:
        • Archive the Artifacts
          • Files to archive: install/**/*
          • Excludes: install/usr/lib/debug/.build-id/**/*
          • Fingerprint all archive artifacts: True
          • Use default excludes: True

      Now, we still see the failure when archiving symbolic links (which should be excluded!)

      Archiving artifacts
      Recording fingerprints
      ERROR: Failed to record fingerprints
      java.io.IOException: remote file operation failed: /var/jenkins/workspace/MyJob at hudson.remoting.Channel@3b0647d7:ubuntu-12-04-amd64-4: java.io.IOException: Failed to compute digest for /var/jenkins/workspace/MyJob/install/usr/lib/debug/.build-id/12/8ac6549dedadda10425743f1f64e810adc301f
      	at hudson.FilePath.act(FilePath.java:985)
      	at hudson.FilePath.act(FilePath.java:967)
      	at hudson.tasks.Fingerprinter.record(Fingerprinter.java:212)
      	at hudson.tasks.Fingerprinter.perform(Fingerprinter.java:124)
      	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:221)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74)
      	at hudson.plugins.templateproject.ProxyPublisher.perform(ProxyPublisher.java:85)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:776)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
      	at hudson.model.Run.execute(Run.java:1763)
      	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:381)
      Caused by: java.io.IOException: Failed to compute digest for /var/jenkins/workspace/MyJob/install/usr/lib/debug/.build-id/12/8ac6549dedadda10425743f1f64e810adc301f
      	at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:230)
      	at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:212)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2688)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      	at ......remote call to ubuntu-12-04-amd64-4(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
      	at hudson.remoting.Channel.call(Channel.java:778)
      	at hudson.FilePath.act(FilePath.java:978)
      	... 15 more
      Caused by: java.io.FileNotFoundException: /var/jenkins/workspace/MyJob/install/usr/lib/debug/.build-id/12/8ac6549dedadda10425743f1f64e810adc301f (No such file or directory)
      	at java.io.FileInputStream.open(Native Method)
      	at java.io.FileInputStream.<init>(FileInputStream.java:146)
      	at hudson.Util.getDigestOf(Util.java:639)
      	at hudson.FilePath$38.invoke(FilePath.java:1924)
      	at hudson.FilePath$38.invoke(FilePath.java:1921)
      	at hudson.FilePath.act(FilePath.java:989)
      	at hudson.FilePath.act(FilePath.java:967)
      	at hudson.FilePath.digest(FilePath.java:1921)
      	at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:228)
      	at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:212)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2688)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          Please reopen if this occurs on a recent release. This baseline is almost two years old.

          (I'm not trying to be rude here by resolving immediately, just spent way too much time trying to reproduce issues that have long been fixed.)

          Show
          danielbeck Daniel Beck added a comment - Please reopen if this occurs on a recent release. This baseline is almost two years old. (I'm not trying to be rude here by resolving immediately, just spent way too much time trying to reproduce issues that have long been fixed.)
          Hide
          nicoprediger Nico Prediger added a comment -

          I'm still seeing this issue in 2.46.3 LTS. My config looks like this:

          archive: project/**
          exclude: project/modules/**

          modules contains symlinks, which causes fingerprinting to fail, as described in JENKINS-41695.

          Archiving without fingerprinting works fine, no excluded file is being archived. But enabling the fingerprints fails, because Jenkins tries to fingerprint files that were never archived:
          Archiviere Artefakte
          Zeichne Fingerabrücke auf
          ERROR: Aufzeichnen der Fingerabdrücke fehlgeschlagen
          java.io.FileNotFoundException: /var/lib/jenkins/jobs/jobname/workspace/project/modules/symlinkname (Datei oder Verzeichnis nicht gefunden)
          at java.io.FileInputStream.open0(Native Method)
          at java.io.FileInputStream.open(FileInputStream.java:195)
          at java.io.FileInputStream.<init>(FileInputStream.java:138)
          at hudson.Util.getDigestOf(Util.java:803)
          at hudson.FilePath$38.invoke(FilePath.java:1922)
          at hudson.FilePath$38.invoke(FilePath.java:1919)
          at hudson.FilePath.act(FilePath.java:996)
          at hudson.FilePath.act(FilePath.java:974)
          at hudson.FilePath.digest(FilePath.java:1919)
          at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:231)
          Caused: java.io.IOException: Berechnung der Prüfsumme für /var/lib/jenkins/jobs/jobname/workspace/project/modules/symlinkname fehlgeschlagen
          at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:233)
          at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:215)
          at hudson.FilePath.act(FilePath.java:996)
          at hudson.FilePath.act(FilePath.java:974)
          at hudson.tasks.Fingerprinter.record(Fingerprinter.java:215)
          at hudson.tasks.Fingerprinter.perform(Fingerprinter.java:127)
          at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:242)
          at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
          at hudson.model.Build$BuildExecution.post2(Build.java:186)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
          at hudson.model.Run.execute(Run.java:1753)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:405)
          Build step 'Artefakte archivieren' changed build result to FAILURE
          Finished: FAILURE

          Show
          nicoprediger Nico Prediger added a comment - I'm still seeing this issue in 2.46.3 LTS. My config looks like this: archive: project/** exclude: project/modules/** modules contains symlinks, which causes fingerprinting to fail, as described in  JENKINS-41695 . Archiving without fingerprinting works fine, no excluded file is being archived. But enabling the fingerprints fails, because Jenkins tries to fingerprint files that were never archived: Archiviere Artefakte Zeichne Fingerabrücke auf ERROR: Aufzeichnen der Fingerabdrücke fehlgeschlagen java.io.FileNotFoundException: /var/lib/jenkins/jobs/jobname/workspace/project/modules/symlinkname (Datei oder Verzeichnis nicht gefunden) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at hudson.Util.getDigestOf(Util.java:803) at hudson.FilePath$38.invoke(FilePath.java:1922) at hudson.FilePath$38.invoke(FilePath.java:1919) at hudson.FilePath.act(FilePath.java:996) at hudson.FilePath.act(FilePath.java:974) at hudson.FilePath.digest(FilePath.java:1919) at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:231) Caused: java.io.IOException: Berechnung der Prüfsumme für /var/lib/jenkins/jobs/jobname/workspace/project/modules/symlinkname fehlgeschlagen at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:233) at hudson.tasks.Fingerprinter$2.invoke(Fingerprinter.java:215) at hudson.FilePath.act(FilePath.java:996) at hudson.FilePath.act(FilePath.java:974) at hudson.tasks.Fingerprinter.record(Fingerprinter.java:215) at hudson.tasks.Fingerprinter.perform(Fingerprinter.java:127) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:242) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) at hudson.model.Run.execute(Run.java:1753) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:405) Build step 'Artefakte archivieren' changed build result to FAILURE Finished: FAILURE
          Hide
          danielbeck Daniel Beck added a comment -

          My first guess was that Jesse Glick's f43a450c31d3875e72defa8400c6ada43bfc3ad0 caused this in 1.575, but even before I checked the code and the Fingerprinter just doesn't have an exclude feature.

          Given how the UI works, probably safe to consider this a bug.

          Show
          danielbeck Daniel Beck added a comment - My first guess was that Jesse Glick 's f43a450c31d3875e72defa8400c6ada43bfc3ad0 caused this in 1.575, but even before I checked the code and the Fingerprinter just doesn't have an exclude feature. Given how the UI works, probably safe to consider this a bug.

            People

            • Assignee:
              foxtrot9 Mit Naria
              Reporter:
              tom_ghyselinck Tom Ghyselinck
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: