Skip to content

Replace apache download tasks with custom ivy repository. #1438

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

Merged
merged 3 commits into from
Mar 13, 2020

Conversation

jbaiera
Copy link
Member

@jbaiera jbaiera commented Mar 9, 2020

Hadoop ecosystem tarballs are hosted on Apache's download mirrors only instead of in maven repositories. Previously we were downloading these artifacts from a round robin of mirror endpoints, using securely obtained hashes to validate the downloaded files even from non HTTPS sources.

This PR removes those download tasks, replacing it with a custom Ivy repository backed by an HTTPS enabled apache mirror. This allows us to ensure the artifacts are securely downloaded and cached by Gradle instead of relying on task outputs like the old mirror download task.

Hadoop ecosystem tarballs are hosted on Apache's download mirrors only instead of in maven repositories. Previously we were downloading these artifacts from a round robin of mirror endpoints, using securely obtained hashes to validate the downloaded files even from non HTTPS sources.

This PR removes those download tasks, replacing it with a custom Ivy repository backed by an HTTPS enabled apache mirror. This allows us to ensure the artifacts are securely downloaded and cached by Gradle instead of relying on task outputs like the old mirror download task.
@mark-vieira
Copy link
Contributor

One thing to keep in mind here is that Gradle doesn't do artifact checksum verification by default. In fact, this capability was only recently added in Gradle 6.2. As it is, this PR removes the checksum validation for these artifacts. If we want to retain that capability, we'll need to enabled checksum verification in Gradle as described here.

@jbaiera
Copy link
Member Author

jbaiera commented Mar 10, 2020

The dependency verification features look really useful, but I think they might be a bit out of scope. It think we mostly want the verification for downloads from apache mirrors, but it's a global setting that will require upkeep outside of normal project configuration. Additionally, we would need to maintain a number of unverified configurations since we rely on the local file repo in snapshot and release builds.

Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment, otherwise LGTM.

@jbaiera jbaiera merged commit fbc52bc into elastic:master Mar 13, 2020
@jbaiera jbaiera deleted the fix-custom-ivy-repos branch March 13, 2020 15:58
jbaiera added a commit that referenced this pull request May 13, 2020
Hadoop ecosystem tarballs are hosted on Apache's download mirrors only instead of in maven repositories. Previously we were downloading these artifacts from a round robin of mirror endpoints, using securely obtained hashes to validate the downloaded files even from non HTTPS sources.

This PR removes those download tasks, replacing it with a custom Ivy repository backed by an HTTPS enabled apache mirror. This allows us to ensure the artifacts are securely downloaded and cached by Gradle instead of relying on task outputs like the old mirror download task.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants