Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails in publishing artifact, but succeeds on CodePipeline #40

Closed
bilzard opened this issue May 13, 2020 · 3 comments · Fixed by #41
Closed

Fails in publishing artifact, but succeeds on CodePipeline #40

bilzard opened this issue May 13, 2020 · 3 comments · Fixed by #41
Assignees

Comments

@bilzard
Copy link

bilzard commented May 13, 2020

I am suffering from the following problem that sometimes occur:

  • The build succeeded but failed to push artifacts to S3 (because of Java VM fails)
  • But the build is judged to be successful on Codepipeline
  • It will fail in subsequent stages because there is no output artifact

I know that root cause is a Java VM issue, but I think that the correct behavior is that if a plugin fails to push an artifact to S3, it will be judged as a failure on CodePipeline.

Any workarounds or tips on this issue would be appreciated.
Thanks.

Error message on Jenkins console

18:48:05 [AWS CodePipeline Plugin] Publishing artifacts
18:48:08 [AWS CodePipeline Plugin] Compressing directory '/var/lib/jenkins/workspace/PayReleaseSandboxProvisioningPartnerapi' as a 'Zip' archive
18:50:35 [AWS CodePipeline Plugin] Build succeeded, calling PutJobSuccessResult
18:50:36 FATAL: GC overhead limit exceeded
18:50:36 java.lang.OutOfMemoryError: GC overhead limit exceeded
18:50:36 	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
18:50:36 	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
18:50:36 	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2246)
18:50:36 	at hudson.util.IOUtils.copy(IOUtils.java:507)
18:50:36 	at com.amazonaws.codepipeline.jenkinsplugin.CompressionTools.compressArchive(CompressionTools.java:166)
18:50:36 	at com.amazonaws.codepipeline.jenkinsplugin.CompressionTools.compressZipFile(CompressionTools.java:99)
18:50:36 	at com.amazonaws.codepipeline.jenkinsplugin.CompressionTools.compressFile(CompressionTools.java:64)
18:50:36 	at com.amazonaws.codepipeline.jenkinsplugin.PublisherCallable.uploadDirectory(PublisherCallable.java:142)
18:50:36 	at com.amazonaws.codepipeline.jenkinsplugin.PublisherCallable.invoke(PublisherCallable.java:108)
18:50:36 	at com.amazonaws.codepipeline.jenkinsplugin.PublisherCallable.invoke(PublisherCallable.java:38)
18:50:36 	at hudson.FilePath.act(FilePath.java:1078)
18:50:36 	at hudson.FilePath.act(FilePath.java:1061)
18:50:36 	at com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelinePublisher.callPublish(AWSCodePipelinePublisher.java:199)
18:50:36 	at com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelinePublisher.perform(AWSCodePipelinePublisher.java:161)
18:50:36 	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
18:50:36 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
18:50:36 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
18:50:36 	at hudson.model.Build$BuildExecution.post2(Build.java:186)
18:50:36 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
18:50:36 	at hudson.model.Run.execute(Run.java:1840)
18:50:36 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
18:50:36 	at hudson.model.ResourceController.execute(ResourceController.java:97)
18:50:36 	at hudson.model.Executor.run(Executor.java:429)
18:50:36 [WS-CLEANUP] Deleting project workspace...
18:50:36 [WS-CLEANUP] Deferred wipeout is used...
18:50:36 [WS-CLEANUP] done
18:50:36 Finished: FAILURE

Codepipeline screen capture

codepipeline

@bilzard bilzard changed the title Fails in publishing artifacts, but succeeds on CodePipeline stage Fails in publishing artifact, but succeeds on CodePipeline May 13, 2020
@galmeida
Copy link
Contributor

Thanks for bringing this up, I will take a look

@galmeida galmeida self-assigned this May 13, 2020
galmeida added a commit to galmeida/aws-codepipeline-plugin-for-jenkins that referenced this issue May 13, 2020
A customer reported on issue awslabs#40 that if OutOfMemoryError is thrown
during artifact upload, the upload fails but the action execution is
still marked as succeeded. This change fixes that issue.
@galmeida galmeida linked a pull request May 13, 2020 that will close this issue
@ghost ghost closed this as completed in #41 May 13, 2020
ghost pushed a commit that referenced this issue May 13, 2020
A customer reported on issue #40 that if OutOfMemoryError is thrown
during artifact upload, the upload fails but the action execution is
still marked as succeeded. This change fixes that issue.
@galmeida
Copy link
Contributor

The fix should be available in version 0.42 of the plugin, available for download in a couple of hours once jenkinsci plugin caches are populated.

@bilzard
Copy link
Author

bilzard commented May 26, 2020

Thank you for responding at explosive speed!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants