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

Fix crawler due to bintray changes #36

Merged
merged 1 commit into from Aug 27, 2015

Conversation

lightpriest
Copy link

I guess bintray changed their URL prefix to be with % instead of #.
Everything else looks the same.

I guess bintray changed their URL prefix to be with % instead of #.
Everything else looks the same.
@jenkinsadmin
Copy link

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@jdamick
Copy link
Contributor

jdamick commented Aug 27, 2015

agreed, please merge. cc/ @ndeloof

@jdamick
Copy link
Contributor

jdamick commented Aug 27, 2015

other option is to change like the groovy crawler:

def url = baseUrl + e.getHrefAttribute()[1..-1]

Either way is not very pretty and fragile..

ndeloof added a commit that referenced this pull request Aug 27, 2015
Fix crawler due to bintray changes
@ndeloof ndeloof merged commit 0a180d6 into jenkins-infra:master Aug 27, 2015
@aheritier
Copy link
Contributor

and now it is broken because it is a : character :(
I don't know what is doing bintray cc @freddy33

@jbaruch
Copy link

jbaruch commented Sep 25, 2015

We're looking into it.

@freddy33
Copy link

% is a big issue in URL. The : is better.
Anyway, crawling is not the way to go.

@aheritier
Copy link
Contributor

Hi @jbaruch @freddy33, Nihal from your support team explained me that the character was changing regularly to avoid crawling (which I can understand) and thus we should use bintray APIs instead.
We need to rework our scripts which are creating catalogs from bintray. For now, I found 3 of them:

SBT script is already using api.bintray.com. I will see to propose a fix to unify them and be sure they are using API instead of doing crawling

@aheritier
Copy link
Contributor

@freddy33 @jbaruch I created the issue https://issues.jenkins-ci.org/browse/JENKINS-30708 to try to solve the crawling issue but the fact that the URL changes regularly will continue to break our downloads at least temporarily because of our Jenkins current architecture to manage tools installers. I will see with others teams member if we can improve/fix this.

@ydubreuil
Copy link
Contributor

I'm trying to fix this issue but Bintray API seems to require an API token to list available files. Listing version with https://api.bintray.com/v1/packages/mitchellh/packer/packer is possible without authentication but getting files list is not: https://api.bintray.com/v1/packages/mitchellh/packer/packer/files

For SBT, I was able to workaround this by crafting the good URL from version list, but for packer it's not possible.

@freddy33 @jbaruch Do we really need to have an API token to list files? Do you have a workaround?

@lightpriest
Copy link
Author

As a quick workaround, maybe we can use the text inside the anchor tag - it seems to match and be consistent between changes they make to the href attribute.

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 this pull request may close these issues.

None yet

8 participants