bintray / gradle-bintray-plugin

Apache License 2.0
1.28k stars 197 forks source link

bintrayPublish is slow or failing #240

Open chali opened 6 years ago

chali commented 6 years ago

Hello, I'm using latest release 1.8.1 of the plugin and I'm observing some unstable behavior when I'm publishing into bintray repository. I'm running builds on travis-ci. https://travis-ci.org/Netflix/netflixoss-build-infrastructure/builds

You can see builds for release builds for 0.7.2 - 0.7.6. All version are released from the same commit without any change.

0.7.2 and 0.7.4 failed because of http returned 400 0.7.3 was the only successful build 0.7.5 and 0.7.6 failed due to timeout from travis after 10 minutes of no response from bintrayPublish task.

Would you have any suggestions? My suspicion is that something is going on during maven central sync. Is this call synchronous operation which blocks until sync is confirmed by maven central?

Thanks

chali commented 6 years ago

We have other projects using older versions and they are having similar problems too. Builds are failing due to no response from bintrayUpload. Here is an example https://travis-ci.org/Netflix/concurrency-limits/builds/392491089

eyalbe4 commented 6 years ago

Thank you for reporting this @chali. We're trying to determine the cause of these issues. Are you still experiencing them?

chali commented 6 years ago

Hi @eyalbe4, I just tried https://travis-ci.org/Netflix/netflixoss-build-infrastructure/builds/393650073 and it again failed with timeout during bintrayPublish.

chali commented 6 years ago

I enabled --info for our build https://travis-ci.org/Netflix/netflixoss-build-infrastructure/builds/393748747.

The log shows:

This happens for the first artifact within the project.

chali commented 6 years ago

Now I see mostly those errors:

Could not sync 'netflixoss/BuildTesting/netflixoss-build-infrastructure/0.7.10' to Maven Central: HTTP/1.1 400 Bad Request [status:Sync Failed, messages:[Failed to close repository: comnetflix-4712. Server response:
   <nexus-error>
    <errors>
      <error>
        <id>*</id>
        <msg>Unhandled: Repository: comnetflix-4712 has invalid state: closed</msg>
      </error>
    </errors>
  </nexus-error>, Dropping existing partial staging repository.]]

E.g. this build https://travis-ci.org/Netflix/netflixoss-build-infrastructure/builds/394311507

@eyalbe4, do you have any update?

rnorth commented 5 years ago

Maybe a bit late for a 'me too' comment, but we've started to see a similar-ish issue with bintrayPublish hitting our CI timeout for unresponsiveness:

> Task :bintrayPublish
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

(Source)

In our case we don't have maven central sync enabled. It's not been a problem until this week, but now we're getting 100% of our publications fail.

nedtwigg commented 5 years ago

We've had a few half-finished deployments in a row, after a long history of successful automatic deployments.

It's a bummer, because it forces us to deploy artifacts from dev machines rather than CI. If there's any debugging information that could be helpful we'd be happy to supply it.

koral-- commented 5 years ago

I'm encountering errors like mentioned in https://github.com/bintray/gradle-bintray-plugin/issues/240#issuecomment-398833273 In my case there are additionally redundant staging repositories created.

I'm using bintrayPublish task via shipkit with sync to maven central. It seems that artifacts are indeed published successfully. However, task creates multiple staging repositories and fails to close one of them:

[performRelease] Execution failed for task ':bintrayPublish'.
[performRelease] > Could not sync 'droidsonroids/maven/FoQA/0.0.21' to Maven Central: HTTP/1.1 400 Bad Request [status:Sync Failed, messages:[Failed to close repository: pldroidsonroids-1201. Server response:
[performRelease]    <nexus-error>
[performRelease]     <errors>
[performRelease]       <error>
[performRelease]         <id>*</id>
[performRelease]         <msg>Unhandled: Repository: pldroidsonroids-1201 has invalid state: closed</msg>
[performRelease]       </error>
[performRelease]     </errors>
[performRelease]   </nexus-error>, Dropping existing partial staging repository.]]

Apart from 1201 there were also 2 additional repos:

Full log: https://app.bitrise.io/build/273edf8b820b6c75#?tab=log Another failed build: https://app.bitrise.io/build/2967f290c563def5#?tab=log Affected project: https://github.com/DroidsOnRoids/FoQA

dreab8 commented 5 years ago

not sure if it is related but during the hibernate release the bintrayPublish task takes ~1 hour, what I have noticed is that during this phase on the Bintray project related web page appears the message "Notice: You have ${number} unpublished item(s) for this version" that disappears when ${value} reaches 0 to appear again shortly after with the same initial ${number} value, this goes on for about an hour.

dreab8 commented 5 years ago

I noticed we are using 1.8.3 and not the last version that includes https://github.com/bintray/gradle-bintray-plugin/commit/476b2c5fa8597763135245a9d20e4e34b3ead632 , next release I'll try with the new version and let you know.

dreab8 commented 4 years ago

after upgrading to 1.8.4 the bintrayPublish task was really fast.

joffrey-bion commented 3 years ago

I know it's been a while, but just so you know I'm also having connection timeout exceptions during bintrayPublish with version 1.8.5 of the plugin:

* What went wrong:
Execution failed for task ':bintrayPublish'.
> javax.net.ssl.SSLException: Connection timed out (Read failed)

Here are a couple builds with this problem: