From fbf291e4668e596e02aa0da62efef8ffcf440700 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Wed, 25 Mar 2020 22:03:04 +0000 Subject: [PATCH] api/tools: some progress towards generalizing API version upgrade. (#10507) * Automatically derive active protos target used in proto_format.sh from the packages with files annotated as active. * Replace some sites with hardcoded v2/v3 with active/next_major_version_candidate. * Move //docs:BUILD to //versioning:BUILD in API tree. This has already ceased to be used directly in the docs build, so this makes things a bit clearer. Risk level: Low (API tooling and build only) Testing: fix_format (mostly idempotent) Part of #10355. Signed-off-by: Harvey Tuch Mirrored from https://github.com/envoyproxy/envoy @ 4403003b9c0888ce81606a2f45fcc1da126514e7 --- CONTRIBUTING.md | 2 +- STYLE.md | 2 +- {docs => versioning}/BUILD | 13 ++++--------- 3 files changed, 6 insertions(+), 11 deletions(-) rename {docs => versioning}/BUILD (97%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b11d3ddf..dc77573c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ changes. They may be as part of a larger implementation PR. Please follow the st process for validating build/test sanity of `api/` before submitting a PR. *Note: New .proto files should be added to -[BUILD](https://github.com/envoyproxy/envoy/blob/master/api/docs/BUILD) in order to get the RSTs generated.* +[BUILD](https://github.com/envoyproxy/envoy/blob/master/api/versioning/BUILD) in order to get the RSTs generated.* ## Documentation changes diff --git a/STYLE.md b/STYLE.md index ba30c4c2..623981f9 100644 --- a/STYLE.md +++ b/STYLE.md @@ -140,7 +140,7 @@ To add an extension config to the API, the steps below should be followed: This places the filter in the correct [v3 package hierarchy](#package-organization). 1. If this is still WiP and subject to breaking changes, import `udpa/annotations/status.proto` and set `option (udpa.annotations.file_status).work_in_progress = true;`. -1. Add a reference to the v2 extension config in (1) in [api/docs/BUILD](docs/BUILD). +1. Add a reference to the v2 extension config in (1) in [api/versioning/BUILD](versioning/BUILD). 1. Run `./tools/proto_format/proto_format.sh fix`. This should regenerate the `BUILD` file, reformat `foobar.proto` as needed and also generate the v3 extension config, together with shadow API protos. diff --git a/docs/BUILD b/versioning/BUILD similarity index 97% rename from docs/BUILD rename to versioning/BUILD index 1a791f14..9fb68272 100644 --- a/docs/BUILD +++ b/versioning/BUILD @@ -1,17 +1,12 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/active_protos_gen.py. + licenses(["notice"]) # Apache 2 load("@rules_proto//proto:defs.bzl", "proto_library") -package_group( - name = "docs", - packages = [ - "//docs", - ], -) - -# This is where you add protos that will participate in docs RST generation. +# This track active development versions of protos. proto_library( - name = "protos", + name = "active_protos", visibility = ["//visibility:public"], deps = [ "//envoy/admin/v2alpha:pkg",