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

Bintray publisher shouldn't derive config.Bintray.Product from ProductId #109

Open
dansanduleac opened this issue Jul 30, 2018 · 1 comment

Comments

@dansanduleac
Copy link

This logic breaks (e.g. circleci) on multi-project repos like go-java-launcher (publishing both go-java-launcher and go-init) because it tries to derive the bintray package from each project's name, whereas it should probably be derived from the github project's name - that's what we do for OSS java projects. See bintray api re: uploading content.
Also we probably shouldn't call this Product in the bintray config, we should model the API terminology.

Had to publish manually using ssh by passing in the --product like so:

root@b4a1a69d3c80:/go/src/github.com/palantir/go-java-launcher# ./godelw publish bintray --url https://api.bintray.com --product go-java-launcher --subject palantir --repository releases --username "$BINTRAY_USERNAME" --password "$BINTRAY_PASSWORD" --publish --downloads-list
Uploading to https://api.bintray.com/content/palantir/releases/go-java-launcher/1.4.0/com/palantir/launching/go-init/1.4.0/go-init-1.4.0.tgz
 3.24 MiB / 3.24 MiB [======================================================================================] 100.00% 1s
Running Bintray publish for uploaded artifacts...done
Adding artifact to Bintray downloads list for package...done
Uploading to https://api.bintray.com/content/palantir/releases/go-java-launcher/1.4.0/com/palantir/launching/go-java-launcher/1.4.0/go-java-launcher-1.4.0.tgz
 2.29 MiB / 2.29 MiB [======================================================================================] 100.00% 1s
Running Bintray publish for uploaded artifacts...done
Adding artifact to Bintray downloads list for package...
Uploading artifacts succeeded, but addings artifact to downloads list failed: adding artifact to Bintray downloads list for package resulted in response: 400 Bad Request

Also, we seem to get back a 400 when adding artifact to Bintray downloads list, could that be because we are somehow publishing two packages to the same identifier in bintray?
It might also be a red herring since we may have already added go-java-launcher 1.4.0 to the downloads list in the build linked at the top that failed.. but I don't see any logs about that to confirm or deny it.

cc @robert3005 who helped me debug

@nmiyake
Copy link
Contributor

nmiyake commented Jul 30, 2018

Thanks for the feedback. I think this is probably reasonable -- I took a quick look, and it looks like this does end up getting overridden in many of our existing repos (https://github.com/palantir/distgo/blob/master/.circleci/config.yml#L115, https://github.com/palantir/godel-dep-plugin/blob/master/.circleci/config.yml#L99), which points to the defaults not being great.

The fix would likely be for --product not to be auto-populated -- although conceptually using the "GitHub project name" might make sense, the tool currently doesn't make any assumptions about code being hosted on GitHub, and I don't want to add in that assumption/dependency.

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

No branches or pull requests

2 participants