Skip to content

bazel: Allow to distdir all dependencies#4779

Merged
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
vadorovsky:distdir
Oct 20, 2018
Merged

bazel: Allow to distdir all dependencies#4779
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
vadorovsky:distdir

Conversation

@vadorovsky
Copy link
Copy Markdown
Contributor

To use --distdir option of Bazel (which allows to use previously
fetched tarballs instead of downloading dependencies during
build), all dependencies should use http instead of git and need
to have sha256 sums specified.

Risk Level: low
Testing: n/a
Docs Changes: updated bazel/EXTERNAL_DEPS.md
Release Notes: n/a

Signed-off-by: Michal Rostecki mrostecki@suse.de

@vadorovsky
Copy link
Copy Markdown
Contributor Author

@lizan PTAL

Copy link
Copy Markdown
Member

@lizan lizan left a comment

Choose a reason for hiding this comment

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

Great, thanks!

Comment thread api/bazel/repositories.bzl Outdated
Comment thread bazel/repositories.bzl Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not used anymore?

Comment thread bazel/repositories.bzl Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good to know we don't need to use new_http_archive anymore 👍

Comment thread tools/check_repositories.sh Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

only grep bazel/ and api/bazel directory? or use -r instead of -R then you don't need exclude-dir.

@lizan lizan requested a review from htuch October 18, 2018 20:03
Comment thread support/hooks/pre-push Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we also do this in CI?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Functions native.http_archive and native.new_http_archive are
deprecated. The function http_archive from repo:http.bzl should be
used instead.

The new function supports patching of http archives, so
patched_http_archive.bzl is not needed anymore.

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
To use --distdir option of Bazel (which allows to use previously
fetched tarballs instead of downloading dependencies during
build), all dependencies should use http instead of git and need
to have sha256 sums specified.

Risk Level: low
Testing: n/a
Docs Changes: updated bazel/EXTERNAL_DEPS.md
Release Notes: n/a

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
check_repositories.sh checks whether repositories definitions
allow all dependencies to be prefetched and stored in distdir.

It means meeting the following criteria:
- Using only HTTP repositories, not using git repositories.
- SHA256 sum defined for each repository.

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
Check repositories definitions correctness on `git push`.

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
Check repositories definitions correctness in `format` CI job.

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
@vadorovsky
Copy link
Copy Markdown
Contributor Author

@lizan Comments addressed

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Very cool!

@mattklein123 mattklein123 merged commit dc0d35b into envoyproxy:master Oct 20, 2018
@vadorovsky vadorovsky deleted the distdir branch October 22, 2018 11:15
vadorovsky added a commit to vadorovsky/cilium that referenced this pull request Oct 29, 2018
To use --distdir option of Bazel (which allows to use previously
fetched tarballs instead of downloading dependencies during build),
all dependencies should use http instead of git and need to have
sha256 sums specified.

Envoy needs to be updated to version which contains the following
PR:

envoyproxy/envoy#4779

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
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.

5 participants