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

Hockeyapp plugin can't publish from remote slaves

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It seems as though hockeyapp plugin v 1.06 is completely broken on remote slaves.

      Uploading to HockeyApp...
      /scratch/jenkins/workspace/myjob does not exist.
      at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:483)
      at org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
      at hockeyapp.HockeyappRecorder.perform(HockeyappRecorder.java:138)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:795)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:716)
      at hudson.model.Run.execute(Run.java:1690)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)
      Build step 'Upload to HockeyApp' marked build as failure

      It looks like this bug was introduced in [1b21917b57](https://github.com/jenkinsci/hockeyapp-plugin/commit/1b21917b57059b5184bb3e538c8b3528cd820b94).

      The fix is to use something like hudson.FilePath#copyRecursiveTo() to properly copy the file over the remoting channel.

        Attachments

          Activity

          recampbell Ryan Campbell created issue -
          Hide
          recampbell Ryan Campbell added a comment - - edited

          [deleted]

          Show
          recampbell Ryan Campbell added a comment - - edited [deleted]
          Hide
          recampbell Ryan Campbell added a comment -

          Reducing severity since you can always downgrade.

          Show
          recampbell Ryan Campbell added a comment - Reducing severity since you can always downgrade.
          recampbell Ryan Campbell made changes -
          Field Original Value New Value
          Priority Blocker [ 1 ] Critical [ 2 ]
          Hide
          recampbell Ryan Campbell added a comment -

          Jerome, can you take a look? I think you accepted the PR which introduced this bug.

          Show
          recampbell Ryan Campbell added a comment - Jerome, can you take a look? I think you accepted the PR which introduced this bug.
          recampbell Ryan Campbell made changes -
          Assignee lacostej [ lacostej ]
          Hide
          wearbif wearbif added a comment - - edited

          Same problem on remote slave Ubuntu 12.04 LTS and Windows Server 2008 as master. The bug renders the plugin completely useless.

          Current log:
          Uploading to HockeyApp...
          C:\remote\slave\path\to\workspace does not exist.
          at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:483)
          at org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69)
          at hockeyapp.HockeyappRecorder.perform(HockeyappRecorder.java:138)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:753)
          at hudson.model.Build$BuildExecution.post2(Build.java:183)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
          at hudson.model.Run.execute(Run.java:1690)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:246)
          Build step 'Upload to HockeyApp' marked build as failure

          Old log:

          Uploading to HockeyApp...
          C:\Windows\TEMP\jtf463029372113950703.tmp\artefact.file
          Successfully deleted 1 old versions.

          Show
          wearbif wearbif added a comment - - edited Same problem on remote slave Ubuntu 12.04 LTS and Windows Server 2008 as master. The bug renders the plugin completely useless. Current log: Uploading to HockeyApp... C:\remote\slave\path\to\workspace does not exist. at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:483) at org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69) at hockeyapp.HockeyappRecorder.perform(HockeyappRecorder.java:138) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:753) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706) at hudson.model.Run.execute(Run.java:1690) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Build step 'Upload to HockeyApp' marked build as failure Old log: Uploading to HockeyApp... C:\Windows\TEMP\jtf463029372113950703.tmp\artefact.file Successfully deleted 1 old versions.
          Hide
          ohoeltke Oliver H added a comment -

          Sorry for this one.
          Will take care of it tomorrow

          Show
          ohoeltke Oliver H added a comment - Sorry for this one. Will take care of it tomorrow
          ohoeltke Oliver H made changes -
          Assignee lacostej [ lacostej ] Oliver H [ ohoeltke ]
          Hide
          wmcdev WAVE Development added a comment -

          Any update on this? We can't push from our Jenkins slaves either.

          Show
          wmcdev WAVE Development added a comment - Any update on this? We can't push from our Jenkins slaves either.
          Hide
          ungerts Tobias Unger added a comment -

          I think the file set should be evaluated on the slave using e.g. hudson.remoting.Callable and copied to the master using getFileLocally. Currently, the file set is evaluated on the master using the workspace path of the slave. That's the problem. I've attached a basic example of a Callable. Is anybody working on the issue? Otherwise I'll fix the issue.

           
          launcher.getChannel().call(new RemoteFileTask(build.getWorkspace().getRemote(), vars.expand(filePath)))
          
           
          public class RemoteFileTask implements Callable<String, IOException> {
          
              private String basePath;
              private String filePath;
          
              public RemoteFileTask(String basePath, String filePath) {
                  this.filePath = filePath;
                  this.basePath = basePath;
              }
          
              public String call() throws IOException {
                  FileSet fileSet = Util.createFileSet(new File(basePath),
                          filePath, null);
                  return fileSet.iterator().next().toString();
              }
          }
          
          Show
          ungerts Tobias Unger added a comment - I think the file set should be evaluated on the slave using e.g. hudson.remoting.Callable and copied to the master using getFileLocally . Currently, the file set is evaluated on the master using the workspace path of the slave. That's the problem. I've attached a basic example of a Callable . Is anybody working on the issue? Otherwise I'll fix the issue. launcher.getChannel().call( new RemoteFileTask(build.getWorkspace().getRemote(), vars.expand(filePath))) public class RemoteFileTask implements Callable< String , IOException> { private String basePath; private String filePath; public RemoteFileTask( String basePath, String filePath) { this .filePath = filePath; this .basePath = basePath; } public String call() throws IOException { FileSet fileSet = Util.createFileSet( new File(basePath), filePath, null ); return fileSet.iterator().next().toString(); } }
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Tobias Unger
          Path:
          src/main/java/hockeyapp/HockeyappRecorder.java
          http://jenkins-ci.org/commit/hockeyapp-plugin/45f2b0da870fa1d1f3a283abf72e869c35d3e2ca
          Log:
          [FIXED JENKINS-22848]

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tobias Unger Path: src/main/java/hockeyapp/HockeyappRecorder.java http://jenkins-ci.org/commit/hockeyapp-plugin/45f2b0da870fa1d1f3a283abf72e869c35d3e2ca Log: [FIXED JENKINS-22848]
          scm_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Brian Johnson
          Path:
          src/main/java/hockeyapp/HockeyappRecorder.java
          http://jenkins-ci.org/commit/hockeyapp-plugin/276eded7656cf467236ca212b623853858034f0d
          Log:
          Fixes JENKINS-22848.
          Resolve file path on remote for slave nodes.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Brian Johnson Path: src/main/java/hockeyapp/HockeyappRecorder.java http://jenkins-ci.org/commit/hockeyapp-plugin/276eded7656cf467236ca212b623853858034f0d Log: Fixes JENKINS-22848 . Resolve file path on remote for slave nodes.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Tobias Unger
          Path:
          pom.xml
          src/main/java/hockeyapp/HockeyappRecorder.java
          http://jenkins-ci.org/commit/hockeyapp-plugin/d06fdf8ab196c3a8e39138f06168da833a4b84ca
          Log:
          Merge remote-tracking branch 'b2jrock/JENKINS-22848' into merge

          Conflicts:
          src/main/java/hockeyapp/HockeyappRecorder.java

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tobias Unger Path: pom.xml src/main/java/hockeyapp/HockeyappRecorder.java http://jenkins-ci.org/commit/hockeyapp-plugin/d06fdf8ab196c3a8e39138f06168da833a4b84ca Log: Merge remote-tracking branch 'b2jrock/ JENKINS-22848 ' into merge Conflicts: src/main/java/hockeyapp/HockeyappRecorder.java
          Hide
          joncrooke Jonathan Crooke added a comment -

          Not seeing v1.1.0 on my Jenkins update list yet. Still says 1.0.6. Is this normal?

          Show
          joncrooke Jonathan Crooke added a comment - Not seeing v1.1.0 on my Jenkins update list yet. Still says 1.0.6. Is this normal?
          Hide
          ohoeltke Oliver H added a comment -

          No this is not normal!
          I tried to do a release again, but somehow the maven-release-plugin does not work on this machine.
          I will hopefully look at this tomorrow, but you want to get the updated plugin right now you can download it here:
          https://dl.dropboxusercontent.com/u/8978467/hockeyapp.hpi
          and install it manually.

          Show
          ohoeltke Oliver H added a comment - No this is not normal! I tried to do a release again, but somehow the maven-release-plugin does not work on this machine. I will hopefully look at this tomorrow, but you want to get the updated plugin right now you can download it here: https://dl.dropboxusercontent.com/u/8978467/hockeyapp.hpi and install it manually.
          Hide
          danielbeck Daniel Beck added a comment -

          Oliver: There's a bug in Maven Release Plugin, maybe you're hit by that? https://groups.google.com/forum/#!topic/jenkinsci-dev/qkmbl3HrYgk

          Show
          danielbeck Daniel Beck added a comment - Oliver: There's a bug in Maven Release Plugin, maybe you're hit by that? https://groups.google.com/forum/#!topic/jenkinsci-dev/qkmbl3HrYgk
          Hide
          joncrooke Jonathan Crooke added a comment -

          Installed manually, then - thanks!

          Show
          joncrooke Jonathan Crooke added a comment - Installed manually, then - thanks!
          Hide
          ohoeltke Oliver H added a comment -

          @Daniel: That was exactly my problem. I already found this bug yesterday and tried some things, which didn't work out. But now i've got it working with: mvn org.apache.maven.plugins:maven-release-plugin:2.5:perform.
          Release doesn't work anyhow, because authorization failed (got my credentials in settings.xml). Will investigate this evening. Thanx!

          Show
          ohoeltke Oliver H added a comment - @Daniel: That was exactly my problem. I already found this bug yesterday and tried some things, which didn't work out. But now i've got it working with: mvn org.apache.maven.plugins:maven-release-plugin:2.5:perform. Release doesn't work anyhow, because authorization failed (got my credentials in settings.xml). Will investigate this evening. Thanx!
          Hide
          ohoeltke Oliver H added a comment - - edited

          Got it released with:
          mvn org.apache.maven.plugins:maven-release-plugin:2.5:perform -DrepositoryId=maven.jenkins-ci.org
          Version 1.1.0 should be available within the next hours.

          Show
          ohoeltke Oliver H added a comment - - edited Got it released with: mvn org.apache.maven.plugins:maven-release-plugin:2.5:perform -DrepositoryId=maven.jenkins-ci.org Version 1.1.0 should be available within the next hours.
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 154990 ] JNJira + In-Review [ 195103 ]
          brantone Brantone made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            Assignee:
            ohoeltke Oliver H
            Reporter:
            recampbell Ryan Campbell
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: