Skip to content

Restrict visibility to Envoy internals in consuming projects #827

Open

Description

@htuch

Today, the Bazel visibility for all targets (from source, to test support to the tests themselves) is public. This means that a project that consumes Envoy and adds its own filters etc., might rely on internal implementation details that are not intended to be stable aspects of the API.

We should restrict visibility outside of Envoy to only its interfaces, well defined library/binary exports (//source/exe:envoy, //source/exe:envoy_main_lib) and common code under ::Api:: that should be explicitly shared and is subject to the same API considerations as the Envoy interfaces in include.

Activity

  1. mattklein123 commented on Apr 24, 2017

    @mattklein123
    Member

    The first step here is to make all of the filters in the tree only use public interfaces, this will force us to go through ::Api:: for access to utilities, which is a good thing to do.

  2. self-assigned this
    on Aug 2, 2019
  3. htuch commented on Jun 18, 2020

    @htuch
    MemberAuthor

    #11618 is an example of where the lack of a stable interface has been a problem for us. I think for most filter authors going forward, Wasm will provide a compelling stable interface (in particular with NullVm), but there will be major consumers who will want better stability guarantees than what exists today.

    We met recently to discuss and the following ideas came up:

    • Using compiler annotations, class finalization and Bazel visibility to provide a build mode that controls which parts of include/envoy that an extension would use.
    • Adding extra tests with RepoKitteh enforced review labels that validate Api:: behavior (limited set of reviewers).
    • Looking at device driver API stability policies from Linux and other related projects.
    • Setup Api:: shepherds to build a cohesive extension API surface.
  4. removed their assignment
    on Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions