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

dependencies: associate extensions with deps, validate use_category. #13340

Merged
merged 7 commits into from
Oct 1, 2020

Conversation

htuch
Copy link
Member

@htuch htuch commented Sep 30, 2020

This PR introduces a few related changes:

  • use_category is restructured to distinguish core/extension deps. There's also an extension
    allowlist added for each dependency in the dataplane_ext and observability_ext category.

  • tools/dependency/validate.py is introduced to validate a bunch of structural relationships
    implied by the bazel/repository_locations.bzl metadata. This includes that test-only deps
    aren't used in //source/.., that some obvious dataplane/controlplane packages taint the
    appropriate reachable deps and that the association between extensions/deps holds.

  • The CI docs job now runs tools/dependency/validate.py.

  • The dependency dashboard at
    https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/security/external_deps
    to include granular information on which dataplane/observability deps come from core/extensions.

  • Some misc. cleanup of source code dep that came up while working on this.

Risk level: Low
Testing: Pyunit tests added for validate.py.

Part of #12673.

Signed-off-by: Harvey Tuch htuch@google.com

This PR introduces a few related changes:

* use_category is restructured to distinguish core/extension deps. There's also an extension
  allowlist added for each dependency in the dataplane_ext and observability_ext category.

* tools/dependency/validate.py is introduced to validate a bunch of structural relationships
  implied by the bazel/repository_locations.bzl metadata. This includes that test-only deps
  aren't used in //source/.., that some obvious dataplane/controlplane packages taint the
  appropriate reachable deps and that the association between extensions/deps holds.

* The CI docs jobs now runs tools/dependency/validate.py.

* The dependency dashboard at
  https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/security/external_deps
  to include granular information on which dataplane/observability deps come from core/extensions.

* Some misc. cleanup of source code dep that came up while working on this.

Risk level: Low
Testing: Pyunit tests added for validate.py.

Part of envoyproxy#12673.

Signed-off-by: Harvey Tuch <htuch@google.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/dependency-watchers: FYI only for changes made to (bazel/repository_locations\.bzl)|(api/bazel/repository_locations\.bzl)|(.*/requirements\.txt).

🐱

Caused by: #13340 was opened by htuch.

see: more, trace.

@htuch htuch requested review from moderation and phlax and removed request for lizan and alyssawilk September 30, 2020 21:28
@htuch htuch requested a review from asraa September 30, 2020 21:28
@moderation
Copy link
Contributor

LGTM - as discussed in Slack I'll PR my changes to the API dependencies so we can bring them into the docs output too

Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
@htuch
Copy link
Member Author

htuch commented Sep 30, 2020

Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
@htuch htuch requested a review from dio as a code owner October 1, 2020 00:36
Copy link
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.

Neat!!! Just one small typo I found.

/wait

source/exe/BUILD Outdated Show resolved Hide resolved
bazel/repositories.bzl Outdated Show resolved Hide resolved
tools/dependency/validate.py Outdated Show resolved Hide resolved
tools/dependency/validate.py Outdated Show resolved Hide resolved
tools/dependency/validate.py Outdated Show resolved Hide resolved
tools/dependency/validate.py Outdated Show resolved Hide resolved
tools/dependency/validate.py Outdated Show resolved Hide resolved
@phlax
Copy link
Member

phlax commented Oct 1, 2020

@htuch ive left a mostly python style/formatting review, as im only just becoming familiar with the code here.

the output looks very useful

Signed-off-by: Harvey Tuch <htuch@google.com>
tools/dependency/validate.py Outdated Show resolved Hide resolved
mattklein123
mattklein123 previously approved these changes Oct 1, 2020
Signed-off-by: Harvey Tuch <htuch@google.com>
@htuch htuch merged commit 2550806 into envoyproxy:master Oct 1, 2020
@htuch htuch deleted the ext-deps branch October 1, 2020 22:34
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