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

Remove trailing slashes from third-party dependency URLs #1531

Open
mcpwlk opened this issue Feb 8, 2019 · 2 comments
Open

Remove trailing slashes from third-party dependency URLs #1531

mcpwlk opened this issue Feb 8, 2019 · 2 comments

Comments

@mcpwlk
Copy link

mcpwlk commented Feb 8, 2019

Base URLs for asyncbigtable and asynccassandra have trailing slashes:

$ git grep '^[A-Z]*_BASE_URL.*/$'
third_party/asyncbigtable/include.mk:ASYNCBIGTABLE_BASE_URL := https://oss.sonatype.org/content/repositories/releases/com/pythian/opentsdb/asyncbigtable/0.3.0/
third_party/asynccassandra/include.mk:ASYNCCASSANDRA_BASE_URL := https://oss.sonatype.org/content/repositories/snapshots/net/opentsdb/asynccassandra/0.0.1-SNAPSHOT/

This causes the build scripts to generate and use URLs with double slashes, like

https://repo1.maven.org/content/repositories/releases/com/pythian/opentsdb/asyncbigtable/0.3.0//asyncbigtable-0.3.0-jar-with-dependencies.jar

This was the cause of a build failure in our system, because the repo1.maven.org repo stopped merging slashes in URLs:

$ curl -Is https://repo1.maven.org/content/repositories/releases/com/pythian/opentsdb/asyncbigtable/0.3.0//asyncbigtable-0.3.0-jar-with-dependencies.jar | head -1
HTTP/1.1 404 Not Found
$ curl -Is https://repo1.maven.org/content/repositories/releases/com/pythian/opentsdb/asyncbigtable/0.3.0/asyncbigtable-0.3.0-jar-with-dependencies.jar | head -1
HTTP/1.1 200 OK

This is a repo admin's fault, however I believe it would be beneficial to remove the trailing slashes for the remaining dependencies, in order to make the build process more independent of third-party repo configurations.

@mcpwlk
Copy link
Author

mcpwlk commented Feb 8, 2019

Note that this happened for v2.3.1. In the current master, the URL doesn't redirect to repo1.maven.org, and double slashes don't cause any issues.

@mcpwlk
Copy link
Author

mcpwlk commented Feb 11, 2019

Note that there is another hidden issue here, since that specific link under https://oss.sonatype.org/ redirects to https://repo1.maven.org/..., which isn't handled by the build scripts. We work around it by setting CURL="/usr/bin/curl -L --proto-redir =https" as a build variable.

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

1 participant