[JIRA] (JENKINS-59694) When build step fails or get aborted upload is still tried

5 views
Skip to first unread message

stephan.wezel@promotion-software.de (JIRA)

unread,
Oct 8, 2019, 3:49:03 AM10/8/19
to jenkinsc...@googlegroups.com
Stephan Wezel created an issue
 
Jenkins / Bug JENKINS-59694
When build step fails or get aborted upload is still tried
Issue Type: Bug Bug
Assignee: Mez Pahlan
Components: appcenter-plugin
Created: 2019-10-08 07:48
Priority: Major Major
Reporter: Stephan Wezel

When the build process fails due an error or gets aborted the plugin still tries to upload an release.

But this upload fails because no file is generated which should be uploaded.

The plugin should check if the current state of the job is failed/aborted and then do nothing

 

We use jenkins "freestyle project" for the job configuration.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

stephan.wezel@promotion-software.de (JIRA)

unread,
Oct 8, 2019, 3:50:03 AM10/8/19
to jenkinsc...@googlegroups.com
Stephan Wezel updated an issue
Change By: Stephan Wezel
When the build process fails due an error or gets aborted the plugin still tries to upload an release.

But this upload fails because no file is generated which should be uploaded.

As an result at app-center an empty release is generated.

The plugin should check if the current state of the job is failed/aborted and then do nothing

 

We use jenkins "freestyle project" for the job configuration.

mez.pahlan@gmail.com (JIRA)

unread,
Oct 9, 2019, 11:42:02 AM10/9/19
to jenkinsc...@googlegroups.com

mez.pahlan@gmail.com (JIRA)

unread,
Oct 9, 2019, 11:43:02 AM10/9/19
to jenkinsc...@googlegroups.com
Mez Pahlan commented on Bug JENKINS-59694
 
Re: When build step fails or get aborted upload is still tried

Hi Stephan Wezel thanks for reporting this. I'll have a look at what other plugins do in this regard. Out of curiosity why is your build continuing when there is an error?

stephan.wezel@promotion-software.de (JIRA)

unread,
Oct 10, 2019, 2:25:03 AM10/10/19
to jenkinsc...@googlegroups.com

The bug occurred when i aborted an job.  The job was aborted while doing an svn checkout.

At that stage the last build wasn't yet cleaned up. Thus a file with the same name was still there.

Here the relevant part of the log.

 

Started by user <User>
Running as SYSTEM
Building remotely on MAC (Mac-Slave) in workspace <workspace path>
Build was aborted
Aborted by <User>
File found: output/ios/build/<appname>.ipa
Creating an upload resource.
Checking out a fresh workspace because Jenkins failed to detect the current workspace <workspace path>
ERROR: svn: E200030: java.nio.channels.ClosedChannelException
org.tmatesoft.svn.core.SVNException: svn: E200030: java.nio.channels.ClosedChannelException

 

As you can see the build was aborted but the appcenter part was doing its job. But not the part which builds the project (via unity3d editor jenkins plugin: https://wiki.jenkins.io/display/JENKINS/Unity3dBuilder+Plugin)

mez.pahlan@gmail.com (JIRA)

unread,
Oct 10, 2019, 2:42:02 AM10/10/19
to jenkinsc...@googlegroups.com

Thank you. Hopefully I can reproduce these steps and get back to you.

Would you kind posting the full log from this run please. There should be more AppCenter log statements that I don't see here.

stephan.wezel@promotion-software.de (JIRA)

unread,
Oct 10, 2019, 2:56:03 AM10/10/19
to jenkinsc...@googlegroups.com

First here a log output where an build was aborted (while building the project itself was active) in conjunction with hockeyapp:

Build was aborted
Aborted by <User>

Build step 'Upload to HockeyApp' marked build as failure
No emails were triggered.
Finished: ABORTED

 

Here the full log:

Started by user <User>
Running as SYSTEM

Building remotely on Mac(Mac-Slave) in workspace <workspace path>


Build was aborted
Aborted by <User>

File found: output/ios/build/<appname>_r427.ipa
Creating an upload resource.
Checking out a fresh workspace because Jenkins failed to detect the current workspace <workspace path>/ARDemo


ERROR: svn: E200030: java.nio.channels.ClosedChannelException
org.tmatesoft.svn.core.SVNException: svn: E200030: java.nio.channels.ClosedChannelException

at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
at org.tmatesoft.svn.core.internal.db.SVNSqlJetDb.createSqlJetError(SVNSqlJetDb.java:195)
at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDbRoot.<init>(SVNWCDbRoot.java:80)
at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.parseDir(SVNWCDb.java:1984)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.detectWcGeneration(SvnOperationFactory.java:1688)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.getImplementation(SvnOperationFactory.java:1334)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1227)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:2497)
at hudson.scm.subversion.UpdateUpdater$TaskImpl.parseSvnInfo(UpdateUpdater.java:125)
at hudson.scm.subversion.UpdateUpdater$TaskImpl.getSvnCommandToUse(UpdateUpdater.java:87)
at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:130)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1040)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1016)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:989)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3052)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.tmatesoft.sqljet.core.SqlJetIOException: java.nio.channels.ClosedChannelException: error code is IOERR
at org.tmatesoft.sqljet.core.internal.fs.SqlJetFile.lock(SqlJetFile.java:565)
at org.tmatesoft.sqljet.core.internal.pager.SqlJetPager.waitOnLock(SqlJetPager.java:2515)
at org.tmatesoft.sqljet.core.internal.pager.SqlJetPager.sharedLock(SqlJetPager.java:1234)
at org.tmatesoft.sqljet.core.internal.pager.SqlJetPager.acquirePage(SqlJetPager.java:1020)
at org.tmatesoft.sqljet.core.internal.btree.SqlJetBtree.getMeta(SqlJetBtree.java:2196)
at org.tmatesoft.sqljet.core.internal.table.SqlJetOptions.readSchemaCookie(SqlJetOptions.java:213)
at org.tmatesoft.sqljet.core.internal.table.SqlJetOptions.<init>(SqlJetOptions.java:93)
at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine$2.runSynchronized(SqlJetEngine.java:281)
at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.runSynchronized(SqlJetEngine.java:217)
at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.readSchema(SqlJetEngine.java:276)
at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.getOptions(SqlJetEngine.java:299)
at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDbRoot.<init>(SVNWCDbRoot.java:74)
... 23 more
Caused by: java.nio.channels.ClosedChannelException
at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:110)
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1106)
at org.tmatesoft.sqljet.core.internal.fs.SqlJetFileLockManager$1.createLock(SqlJetFileLockManager.java:57)
at org.tmatesoft.sqljet.core.internal.fs.SqlJetFileLockManager.createLock(SqlJetFileLockManager.java:81)
at org.tmatesoft.sqljet.core.internal.fs.SqlJetFileLockManager.tryLock(SqlJetFileLockManager.java:102)
at org.tmatesoft.sqljet.core.internal.fs.SqlJetFile.lock(SqlJetFile.java:476)
... 34 more
Cleaning local Directory ./ARDemo
Create upload resource successful.
Uploading app to resource.
Checking out svn://pssync.promotion-software.de:9036/santrain_mobile_source/trunk/santrain_ar_demo/<appname> at revision '2019-10-08T09:28:55.306 +0200'
Upload app to resource successful.
Committing resource.
Committing resource successful.
Distributing resource.
io.jenkins.plugins.appcenter.AppCenterException: Distributing resource unsuccessful:
at io.jenkins.plugins.appcenter.task.internal.DistributeResourceTask.lambda$execute$1(DistributeResourceTask.java:59)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at retrofit2.CompletableFutureCallAdapterFactory$BodyCallAdapter$2.onResponse(CompletableFutureCallAdapterFactory.java:81)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:129)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: retrofit2.HttpException: HTTP 400 Bad Request
io.jenkins.plugins.appcenter.AppCenterException: Upload to AppCenter failed.
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:56)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:17)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Thread.java:748)
Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 10.0.0.202/10.0.0.202:59538
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:957)
at hudson.FilePath.act(FilePath.java:1162)
at io.jenkins.plugins.appcenter.AppCenterRecorder.uploadToAppCenter(AppCenterRecorder.java:131)
at io.jenkins.plugins.appcenter.AppCenterRecorder.perform(AppCenterRecorder.java:118)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1840)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: java.util.concurrent.ExecutionException: io.jenkins.plugins.appcenter.AppCenterException: Distributing resource unsuccessful:
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:54)
... 10 more
Caused by: io.jenkins.plugins.appcenter.AppCenterException: Distributing resource unsuccessful:
at io.jenkins.plugins.appcenter.task.internal.DistributeResourceTask.lambda$execute$1(DistributeResourceTask.java:59)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at retrofit2.CompletableFutureCallAdapterFactory$BodyCallAdapter$2.onResponse(CompletableFutureCallAdapterFactory.java:81)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:129)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
Caused by: retrofit2.HttpException: HTTP 400 Bad Request
... 7 more
... 7 more
Finished: ABORTED

 

stephan.wezel@promotion-software.de (JIRA)

unread,
Oct 10, 2019, 2:59:02 AM10/10/19
to jenkinsc...@googlegroups.com

appcenter seems to behave differently then hockeyapp.

Here is an example where the build itself failed. appcenter plugin is still running but aborts because the file to upload is not found.

 

FATAL: Unity3d command line execution failed with status 1
Build step 'Invoke Unity3d Editor' marked build as failure
io.jenkins.plugins.appcenter.AppCenterException: File not found: output/android/MyPal_r115.apk
at io.jenkins.plugins.appcenter.task.internal.CheckFileExistsTask.execute(CheckFileExistsTask.java:44)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:42)


at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:17)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Thread.java:748)
io.jenkins.plugins.appcenter.AppCenterException: Upload to AppCenter failed.
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:56)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:17)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Thread.java:748)

Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 10.0.0.202/10.0.0.202:49750


at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:957)
at hudson.FilePath.act(FilePath.java:1162)
at io.jenkins.plugins.appcenter.AppCenterRecorder.uploadToAppCenter(AppCenterRecorder.java:131)
at io.jenkins.plugins.appcenter.AppCenterRecorder.perform(AppCenterRecorder.java:118)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1840)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)

Caused by: java.util.concurrent.ExecutionException: io.jenkins.plugins.appcenter.AppCenterException: File not found: output/android/MyPal_r115.apk


at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:54)
... 10 more

Caused by: io.jenkins.plugins.appcenter.AppCenterException: File not found: output/android/MyPal_r115.apk
at io.jenkins.plugins.appcenter.task.internal.CheckFileExistsTask.execute(CheckFileExistsTask.java:44)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:42)
... 10 more

stephan.wezel@promotion-software.de (JIRA)

unread,
Oct 17, 2019, 3:44:02 AM10/17/19
to jenkinsc...@googlegroups.com

mez.pahlan@gmail.com (JIRA)

unread,
Oct 17, 2019, 6:13:02 AM10/17/19
to jenkinsc...@googlegroups.com

Hi, sorry I haven't had time to look at this just yet. I'm on holiday at the moment but might get some time on the weekend.

mez.pahlan@gmail.com (JIRA)

unread,
Oct 26, 2019, 11:35:04 AM10/26/19
to jenkinsc...@googlegroups.com
Mez Pahlan assigned an issue to Unassigned
 
Change By: Mez Pahlan
Assignee: Mez Pahlan

stephan.wezel@promotion-software.de (JIRA)

unread,
Nov 11, 2019, 5:55:02 AM11/11/19
to jenkinsc...@googlegroups.com

stephan.wezel@promotion-software.de (JIRA)

unread,
Nov 11, 2019, 5:55:02 AM11/11/19
to jenkinsc...@googlegroups.com

mez.pahlan@gmail.com (JIRA)

unread,
Nov 11, 2019, 6:05:01 AM11/11/19
to jenkinsc...@googlegroups.com

Hi Stephan Wezel I won't be able to look at this just yet. What issues does this cause so I can prioritise the work.

stephan.wezel@promotion-software.de (JIRA)

unread,
Nov 11, 2019, 10:01:02 AM11/11/19
to jenkinsc...@googlegroups.com

Mez Pahlan: As already said. The upload job tries to do its job which might cause two following things:

  1.  An old build gets uploaded again, when job gets aborted before it can cleanup old data
  2. An empty upload will be generated, when the uploaded file doesn't exists and the job gets aborted after old data was cleaned up and no new build was finished

mez.pahlan@gmail.com (JIRA)

unread,
Nov 11, 2019, 4:56:04 PM11/11/19
to jenkinsc...@googlegroups.com

Thank you. I've got to figure out how to upload debug symbols / mapping files first but then I'll take a look at this straight after.

I must admit I don't use the freestyle build often, only the recommended pipeline build, so I'm a bit confused as to why the whole build continues if it fails in an upstream step. In a pipeline you specifically have to write code for that to happen, otherwise the default behaviour is that downstream steps don't get executed due to previous failures. Unless I've completely misunderstood that is how I've observed pipelines working. Maybe that's different in a freestyle job?

I'll start by seeing what other plugin developers do for this scenario.

Regarding point 2 (empty upload is generated) I don't think that's correct. If a file doesn't exist the upload will fail. If you're talking about "reserving an upload slot in AppCenter" well they're only valid for 24 hours and managed by AppCenter itself so I'm not concerned about creating and not using upload resources. Unless you mean something different?

stephan.wezel@promotion-software.de (JIRA)

unread,
Nov 12, 2019, 3:37:03 AM11/12/19
to jenkinsc...@googlegroups.com

The second point is correct as you can see in the log i posted it.
Here the relevant part:

Upload app to resource successful.
Committing resource.
Committing resource successful.
Distributing resource.
io.jenkins.plugins.appcenter.AppCenterException: Distributing resource unsuccessful:

As you can see the ressource was succesfully commited but distribution failed due no data is in the release.

And you don't need to see how other plugins does it. You have a plugin at hand which seems to do it correctly when an job is aborted: the hockeyapp plugin

Here again the relevant part of the log from aborted jenkins job which used hockeyapp

Build was aborted
Aborted by <User>
Build step 'Upload to HockeyApp' marked build as failure
No emails were triggered.
Finished: ABORTED

stephan.wezel@promotion-software.de (JIRA)

unread,
Nov 12, 2019, 3:48:06 AM11/12/19
to jenkinsc...@googlegroups.com

I just tested it again. At least the second point seems to be resolved.
Here the relevant part of the log

A Assets\Resources\Sprites\QuestionPics\img_scene_03.png.meta
AU Build was aborted
Aborted by <user>
io.jenkins.plugins.appcenter.AppCenterException: No file found matching pattern: output/android/<filename>.apk
at io.jenkins.plugins.appcenter.AppCenterLogger.logFailure(AppCenterLogger.java:21)
at io.jenkins.plugins.appcenter.AppCenterLogger.logFailure(AppCenterLogger.java:14)


at io.jenkins.plugins.appcenter.task.internal.CheckFileExistsTask.execute(CheckFileExistsTask.java:44)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:42)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:17)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)

at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Unknown Source)


io.jenkins.plugins.appcenter.AppCenterException: Upload to AppCenter failed.
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:56)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:17)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)

at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Unknown Source)
Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from <jenkins master url>:64316


at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:957)
at hudson.FilePath.act(FilePath.java:1162)

at io.jenkins.plugins.appcenter.AppCenterRecorder.uploadToAppCenter(AppCenterRecorder.java:142)
at io.jenkins.plugins.appcenter.AppCenterRecorder.perform(AppCenterRecorder.java:129)


at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1840)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)

Caused by: java.util.concurrent.ExecutionException: io.jenkins.plugins.appcenter.AppCenterException: No file found matching pattern: output/android/<filename>.apk
at java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
at java.util.concurrent.CompletableFuture.get(Unknown Source)


at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:54)
... 10 more

Caused by: io.jenkins.plugins.appcenter.AppCenterException: No file found matching pattern: output/android/BravoQuiz_r438.apk
at io.jenkins.plugins.appcenter.AppCenterLogger.logFailure(AppCenterLogger.java:21)
at io.jenkins.plugins.appcenter.AppCenterLogger.logFailure(AppCenterLogger.java:14)


at io.jenkins.plugins.appcenter.task.internal.CheckFileExistsTask.execute(CheckFileExistsTask.java:44)
at io.jenkins.plugins.appcenter.task.UploadTask.call(UploadTask.java:42)
... 10 more

Finished: ABORTED

stephan.wezel@promotion-software.de (JIRA)

unread,
Nov 12, 2019, 4:00:03 AM11/12/19
to jenkinsc...@googlegroups.com

The first bug is still there. An old build will be uploaded either wenn build will be aborted or a previouse step fails (e.g. the step which cleans up old data)

Here the relevant part of the log when a previouse step fails

A .editorconfig

At revision 493

Folder Delete Operation:
Deleting folder: <workspacedir>\Test"<workspacedir>\Test\output\android\"
FATAL: java.nio.file.InvalidPathException: Illegal char <"> at index 35: <workspacedir>\Test\"<workspacedir>\output\android\"
ERROR: File Operations failed.

File found matching pattern: output/android/filename_r438.apk
Creating an upload resource.

Create upload resource successful.
Uploading app to resource.

Upload app to resource successful.
Committing resource.

Committing resource successful.
Distributing resource.

Distributing resource successful.
Finished: FAILURE

mez.pahlan@gmail.com (JIRA)

unread,
Nov 12, 2019, 4:36:02 AM11/12/19
to jenkinsc...@googlegroups.com

I want to check what other plugins do because the old HockeyApp plugin is not a model that I want to copy from. The code was unmaintainable and really hard to test. Thanks for your understanding. I'll prioritise this ticket next in line.

stephan.wezel@promotion-software.de (JIRA)

unread,
Nov 12, 2019, 4:51:04 AM11/12/19
to jenkinsc...@googlegroups.com

Ah ok, and sorry if my text was a bit harsh. I thought this part of the old hockeyapp plugin was good enough to see what needs to be done.
An candidate might be the unity3d plugin (https://github.com/jenkinsci/unity3d-plugin)
Or the msbuild plugin (https://github.com/jenkinsci/msbuild-plugin)
Those two plugins are used by us and they seems that they do nothing when a build gets aborted/failed before their task begins

mez.pahlan@gmail.com (JIRA)

unread,
Nov 17, 2019, 11:21:03 AM11/17/19
to jenkinsc...@googlegroups.com

mez.pahlan@gmail.com (JIRA)

unread,
Nov 17, 2019, 11:32:03 AM11/17/19
to jenkinsc...@googlegroups.com
Mez Pahlan started work on Bug JENKINS-59694
 
Change By: Mez Pahlan
Status: Open In Progress

mez.pahlan@gmail.com (JIRA)

unread,
Nov 17, 2019, 12:05:03 PM11/17/19
to jenkinsc...@googlegroups.com
Mez Pahlan commented on Bug JENKINS-59694
 
Re: When build step fails or get aborted upload is still tried

Finally got some time to look at this. Thanks for the prompts .

We now exit early if we detect that the build result is worse or equal to FAILURE. This means the following will abort the execution of this plugin: FAILURE, NOT_BUILT, ABORTED.

Hope this helps!

mez.pahlan@gmail.com (JIRA)

unread,
Nov 17, 2019, 12:10:02 PM11/17/19
to jenkinsc...@googlegroups.com

mez.pahlan@gmail.com (JIRA)

unread,
Nov 17, 2019, 12:21:02 PM11/17/19
to jenkinsc...@googlegroups.com
Change By: Mez Pahlan
Status: In Review Fixed but Unreleased
Resolution: Fixed

stephan.wezel@promotion-software.de (JIRA)

unread,
Nov 18, 2019, 2:45:02 AM11/18/19
to jenkinsc...@googlegroups.com
Stephan Wezel commented on Bug JENKINS-59694
 
Re: When build step fails or get aborted upload is still tried

Thanks, I will test it when the next release with this fix is published

mez.pahlan@gmail.com (JIRA)

unread,
Nov 18, 2019, 4:42:07 PM11/18/19
to jenkinsc...@googlegroups.com
Change By: Mez Pahlan
Status: Fixed but Unreleased Resolved
Resolution: Fixed Done
Released As: 0.8.0

stephan.wezel@promotion-software.de (JIRA)

unread,
Nov 22, 2019, 3:00:03 AM11/22/19
to jenkinsc...@googlegroups.com
 
Re: When build step fails or get aborted upload is still tried

Just tested it and it works as expected. Thank you very much

Reply all
Reply to author
Forward
0 new messages