From b2b89a5eb6621544dad18fc04105ee49ef02229c Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Tue, 4 May 2021 19:23:00 +0100 Subject: [PATCH 01/19] protodoc: Add redirects for v2 protos to current version Signed-off-by: Ryan Northey --- docs/BUILD | 5 +- docs/build.sh | 7 +- docs/root/_static/css/envoy.css | 8 ++ docs/v2_mapping.json | 155 ++++++++++++++++++++++++++++++++ tools/protodoc/BUILD | 5 +- tools/protodoc/protodoc.py | 57 ++++++++++-- 6 files changed, 227 insertions(+), 10 deletions(-) create mode 100644 docs/v2_mapping.json diff --git a/docs/BUILD b/docs/BUILD index df6aa85f655f..0c2797f66ff1 100644 --- a/docs/BUILD +++ b/docs/BUILD @@ -5,7 +5,10 @@ load( licenses(["notice"]) # Apache 2 -exports_files(["protodoc_manifest.yaml"]) +exports_files([ + "protodoc_manifest.yaml", + "v2_mapping.json", +]) envoy_package() diff --git a/docs/build.sh b/docs/build.sh index fc3e89d117bd..1bf18e0f54ec 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -135,7 +135,8 @@ generate_api_rst v3 # Fixup anchors and references in v3 so they form a distinct namespace. # TODO(htuch): Do this in protodoc generation in the future. find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_api_#envoy_v3_api_#g" -find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#config_resource_monitors#v3_config_resource_monitors#g" +# TODO(phlax): Remove this once above is removed +find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_v2_api_#envoy_api_#g" # xDS protocol spec. mkdir -p "${GENERATED_RST_DIR}/api-docs" @@ -160,6 +161,10 @@ rsync -av \ "${SCRIPT_DIR}"/_ext \ "${GENERATED_RST_DIR}" +# Merge generated redirects +# TODO(phlax): Move updating redirects to separate bazel task +cat /tmp/redirects.txt >> "${GENERATED_RST_DIR}"/redirects.txt + # To speed up validate_fragment invocations in validating_code_block bazel build "${BAZEL_BUILD_OPTIONS[@]}" //tools/config_validation:validate_fragment diff --git a/docs/root/_static/css/envoy.css b/docs/root/_static/css/envoy.css index 4cc8d11cfdf3..5c4eaa33d73d 100644 --- a/docs/root/_static/css/envoy.css +++ b/docs/root/_static/css/envoy.css @@ -36,3 +36,11 @@ table.docutils div.line-block { padding: 2px 2px; border: solid #eee 1px; } + +.inline-tip, +.inline-note, +.inline-warning { + clear: none !important; + display: inline-block !important; + max-width: 50%; +} diff --git a/docs/v2_mapping.json b/docs/v2_mapping.json new file mode 100644 index 000000000000..8d437476dff6 --- /dev/null +++ b/docs/v2_mapping.json @@ -0,0 +1,155 @@ +{ + "envoy/admin/v3/certs.proto": "envoy/admin/v2alpha/certs.proto", + "envoy/admin/v3/clusters.proto": "envoy/admin/v2alpha/clusters.proto", + "envoy/admin/v3/config_dump.proto": "envoy/admin/v2alpha/config_dump.proto", + "envoy/admin/v3/listeners.proto": "envoy/admin/v2alpha/listeners.proto", + "envoy/admin/v3/memory.proto": "envoy/admin/v2alpha/memory.proto", + "envoy/admin/v3/metrics.proto": "envoy/admin/v2alpha/metrics.proto", + "envoy/admin/v3/mutex_stats.proto": "envoy/admin/v2alpha/mutex_stats.proto", + "envoy/admin/v3/server_info.proto": "envoy/admin/v2alpha/server_info.proto", + "envoy/admin/v3/tap.proto": "envoy/admin/v2alpha/tap.proto", + "envoy/extensions/transport_sockets/tls/v3/common.proto": "envoy/api/v2/auth/common.proto", + "envoy/extensions/transport_sockets/tls/v3/secret.proto": "envoy/api/v2/auth/secret.proto", + "envoy/extensions/transport_sockets/tls/v3/tls.proto": "envoy/api/v2/auth/tls.proto", + "envoy/service/cluster/v3/cds.proto": "envoy/api/v2/cds.proto", + "envoy/config/cluster/v3/cluster.proto": "envoy/api/v2/cluster.proto", + "envoy/config/cluster/v3/circuit_breaker.proto": "envoy/api/v2/cluster/circuit_breaker.proto", + "envoy/config/cluster/v3/filter.proto": "envoy/api/v2/cluster/filter.proto", + "envoy/config/cluster/v3/outlier_detection.proto": "envoy/api/v2/cluster/outlier_detection.proto", + "envoy/config/core/v3/address.proto": "envoy/api/v2/core/address.proto", + "envoy/config/core/v3/backoff.proto": "envoy/api/v2/core/backoff.proto", + "envoy/config/core/v3/base.proto": "envoy/api/v2/core/base.proto", + "envoy/config/core/v3/config_source.proto": "envoy/api/v2/core/config_source.proto", + "envoy/config/core/v3/event_service_config.proto": "envoy/api/v2/core/event_service_config.proto", + "envoy/config/core/v3/grpc_method_list.proto": "envoy/api/v2/core/grpc_method_list.proto", + "envoy/config/core/v3/grpc_service.proto": "envoy/api/v2/core/grpc_service.proto", + "envoy/config/core/v3/health_check.proto": "envoy/api/v2/core/health_check.proto", + "envoy/config/core/v3/http_uri.proto": "envoy/api/v2/core/http_uri.proto", + "envoy/config/core/v3/protocol.proto": "envoy/api/v2/core/protocol.proto", + "envoy/config/core/v3/socket_option.proto": "envoy/api/v2/core/socket_option.proto", + "envoy/service/discovery/v3/discovery.proto": "envoy/api/v2/discovery.proto", + "envoy/service/endpoint/v3/eds.proto": "envoy/api/v2/eds.proto", + "envoy/config/endpoint/v3/endpoint.proto": "envoy/api/v2/endpoint.proto", + "envoy/config/endpoint/v3/endpoint_components.proto": "envoy/api/v2/endpoint/endpoint_components.proto", + "envoy/service/listener/v3/lds.proto": "envoy/api/v2/lds.proto", + "envoy/config/listener/v3/listener.proto": "envoy/api/v2/listener.proto", + "envoy/config/listener/v3/listener_components.proto": "envoy/api/v2/listener/listener_components.proto", + "envoy/config/listener/v3/quic_config.proto": "envoy/api/v2/listener/quic_config.proto", + "envoy/config/listener/v3/udp_listener_config.proto": "envoy/api/v2/listener/udp_listener_config.proto", + "envoy/extensions/common/ratelimit/v3/ratelimit.proto": "envoy/api/v2/ratelimit/ratelimit.proto", + "envoy/service/route/v3/rds.proto": "envoy/api/v2/rds.proto", + "envoy/config/route/v3/route.proto": "envoy/api/v2/route.proto", + "envoy/config/route/v3/route_components.proto": "envoy/api/v2/route/route_components.proto", + "envoy/config/route/v3/scoped_route.proto": "envoy/api/v2/scoped_route.proto", + "envoy/service/route/v3/srds.proto": "envoy/api/v2/srds.proto", + "envoy/extensions/access_loggers/grpc/v3/als.proto": "envoy/config/accesslog/v2/als.proto", + "envoy/extensions/access_loggers/file/v3/file.proto": "envoy/config/accesslog/v2/file.proto", + "envoy/config/bootstrap/v3/bootstrap.proto": "envoy/config/bootstrap/v2/bootstrap.proto", + "envoy/extensions/clusters/aggregate/v3/cluster.proto": "envoy/config/cluster/aggregate/v2alpha/cluster.proto", + "envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto": "envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto", + "envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto": "envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto", + "envoy/extensions/common/tap/v3/common.proto": "envoy/config/common/tap/v2alpha/common.proto", + "envoy/config/accesslog/v3/accesslog.proto": "envoy/config/filter/accesslog/v2/accesslog.proto", + "envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto": "envoy/config/filter/dubbo/router/v2alpha1/router.proto", + "envoy/extensions/filters/common/fault/v3/fault.proto": "envoy/config/filter/fault/v2/fault.proto", + "envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto": "envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto", + "envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto": "envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto", + "envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto": "envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto", + "envoy/extensions/filters/http/buffer/v3/buffer.proto": "envoy/config/filter/http/buffer/v2/buffer.proto", + "envoy/extensions/filters/http/cache/v3alpha/cache.proto": "envoy/config/filter/http/cache/v2alpha/cache.proto", + "envoy/extensions/filters/http/compressor/v3/compressor.proto": "envoy/config/filter/http/compressor/v2/compressor.proto", + "envoy/extensions/filters/http/cors/v3/cors.proto": "envoy/config/filter/http/cors/v2/cors.proto", + "envoy/extensions/filters/http/csrf/v3/csrf.proto": "envoy/config/filter/http/csrf/v2/csrf.proto", + "envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto": "envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto", + "envoy/extensions/filters/http/dynamo/v3/dynamo.proto": "envoy/config/filter/http/dynamo/v2/dynamo.proto", + "envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto": "envoy/config/filter/http/ext_authz/v2/ext_authz.proto", + "envoy/extensions/filters/http/fault/v3/fault.proto": "envoy/config/filter/http/fault/v2/fault.proto", + "envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto": "envoy/config/filter/http/grpc_http1_bridge/v2/config.proto", + "envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto": "envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto", + "envoy/extensions/filters/http/grpc_stats/v3/config.proto": "envoy/config/filter/http/grpc_stats/v2alpha/config.proto", + "envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto": "envoy/config/filter/http/grpc_web/v2/grpc_web.proto", + "envoy/extensions/filters/http/gzip/v3/gzip.proto": "envoy/config/filter/http/gzip/v2/gzip.proto", + "envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto": "envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto", + "envoy/extensions/filters/http/health_check/v3/health_check.proto": "envoy/config/filter/http/health_check/v2/health_check.proto", + "envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto": "envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto", + "envoy/extensions/filters/http/jwt_authn/v3/config.proto": "envoy/config/filter/http/jwt_authn/v2alpha/config.proto", + "envoy/extensions/filters/http/lua/v3/lua.proto": "envoy/config/filter/http/lua/v2/lua.proto", + "envoy/extensions/filters/http/on_demand/v3/on_demand.proto": "envoy/config/filter/http/on_demand/v2/on_demand.proto", + "envoy/extensions/filters/http/original_src/v3/original_src.proto": "envoy/config/filter/http/original_src/v2alpha1/original_src.proto", + "envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto": "envoy/config/filter/http/rate_limit/v2/rate_limit.proto", + "envoy/extensions/filters/http/rbac/v3/rbac.proto": "envoy/config/filter/http/rbac/v2/rbac.proto", + "envoy/extensions/filters/http/router/v3/router.proto": "envoy/config/filter/http/router/v2/router.proto", + "envoy/extensions/filters/http/squash/v3/squash.proto": "envoy/config/filter/http/squash/v2/squash.proto", + "envoy/extensions/filters/http/tap/v3/tap.proto": "envoy/config/filter/http/tap/v2alpha/tap.proto", + "envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto": "envoy/config/filter/http/transcoder/v2/transcoder.proto", + "envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto": "envoy/config/filter/listener/http_inspector/v2/http_inspector.proto", + "envoy/extensions/filters/listener/original_dst/v3/original_dst.proto": "envoy/config/filter/listener/original_dst/v2/original_dst.proto", + "envoy/extensions/filters/listener/original_src/v3/original_src.proto": "envoy/config/filter/listener/original_src/v2alpha1/original_src.proto", + "envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto": "envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto", + "envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto": "envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto", + "envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto": "envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto", + "envoy/extensions/filters/network/direct_response/v3/config.proto": "envoy/config/filter/network/direct_response/v2/config.proto", + "envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto": "envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto", + "envoy/extensions/filters/network/dubbo_proxy/v3/route.proto": "envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto", + "envoy/extensions/filters/network/echo/v3/echo.proto": "envoy/config/filter/network/echo/v2/echo.proto", + "envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto": "envoy/config/filter/network/ext_authz/v2/ext_authz.proto", + "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto": "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto", + "envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.proto": "envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto", + "envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto": "envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto", + "envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto": "envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto", + "envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto": "envoy/config/filter/network/rate_limit/v2/rate_limit.proto", + "envoy/extensions/filters/network/rbac/v3/rbac.proto": "envoy/config/filter/network/rbac/v2/rbac.proto", + "envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto": "envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto", + "envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto": "envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto", + "envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto": "envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto", + "envoy/extensions/filters/network/thrift_proxy/v3/route.proto": "envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto", + "envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto": "envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto", + "envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto": "envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto", + "envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto": "envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto", + "envoy/config/grpc_credential/v3/aws_iam.proto": "envoy/config/grpc_credential/v2alpha/aws_iam.proto", + "envoy/config/grpc_credential/v3/file_based_metadata.proto": "envoy/config/grpc_credential/v2alpha/file_based_metadata.proto", + "envoy/config/listener/v3/api_listener.proto": "envoy/config/listener/v2/api_listener.proto", + "envoy/config/metrics/v3/metrics_service.proto": "envoy/config/metrics/v2/metrics_service.proto", + "envoy/config/metrics/v3/stats.proto": "envoy/config/metrics/v2/stats.proto", + "envoy/config/overload/v3/overload.proto": "envoy/config/overload/v2alpha/overload.proto", + "envoy/config/ratelimit/v3/rls.proto": "envoy/config/ratelimit/v2/rls.proto", + "envoy/config/rbac/v3/rbac.proto": "envoy/config/rbac/v2/rbac.proto", + "envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto": "envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto", + "envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto": "envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto", + "envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto": "envoy/config/retry/previous_hosts/v2/previous_hosts.proto", + "envoy/config/trace/v3/datadog.proto": "envoy/config/trace/v2/datadog.proto", + "envoy/config/trace/v3/dynamic_ot.proto": "envoy/config/trace/v2/dynamic_ot.proto", + "envoy/config/trace/v3/http_tracer.proto": "envoy/config/trace/v2/http_tracer.proto", + "envoy/config/trace/v3/lightstep.proto": "envoy/config/trace/v2/lightstep.proto", + "envoy/config/trace/v3/opencensus.proto": "envoy/config/trace/v2/opencensus.proto", + "envoy/config/trace/v3/service.proto": "envoy/config/trace/v2/service.proto", + "envoy/config/trace/v3/zipkin.proto": "envoy/config/trace/v2/zipkin.proto", + "envoy/config/trace/v3/xray.proto": "envoy/config/trace/v2alpha/xray.proto", + "envoy/extensions/transport_sockets/alts/v3/alts.proto": "envoy/config/transport_socket/alts/v2alpha/alts.proto", + "envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto": "envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto", + "envoy/extensions/transport_sockets/tap/v3/tap.proto": "envoy/config/transport_socket/tap/v2alpha/tap.proto", + "envoy/data/accesslog/v3/accesslog.proto": "envoy/data/accesslog/v2/accesslog.proto", + "envoy/data/cluster/v3/outlier_detection_event.proto": "envoy/data/cluster/v2alpha/outlier_detection_event.proto", + "envoy/data/core/v3/health_check_event.proto": "envoy/data/core/v2alpha/health_check_event.proto", + "envoy/data/dns/v3/dns_table.proto": "envoy/data/dns/v2alpha/dns_table.proto", + "envoy/data/tap/v3/common.proto": "envoy/data/tap/v2alpha/common.proto", + "envoy/data/tap/v3/http.proto": "envoy/data/tap/v2alpha/http.proto", + "envoy/data/tap/v3/transport.proto": "envoy/data/tap/v2alpha/transport.proto", + "envoy/data/tap/v3/wrapper.proto": "envoy/data/tap/v2alpha/wrapper.proto", + "envoy/service/accesslog/v3/als.proto": "envoy/service/accesslog/v2/als.proto", + "envoy/service/auth/v3/attribute_context.proto": "envoy/service/auth/v2/attribute_context.proto", + "envoy/service/auth/v3/external_auth.proto": "envoy/service/auth/v2/external_auth.proto", + "envoy/service/discovery/v3/ads.proto": "envoy/service/discovery/v2/ads.proto", + "envoy/service/runtime/v3/rtds.proto": "envoy/service/discovery/v2/rtds.proto", + "envoy/service/secret/v3/sds.proto": "envoy/service/discovery/v2/sds.proto", + "envoy/service/event_reporting/v3/event_reporting_service.proto": "envoy/service/event_reporting/v2alpha/event_reporting_service.proto", + "envoy/service/load_stats/v3/lrs.proto": "envoy/service/load_stats/v2/lrs.proto", + "envoy/service/metrics/v3/metrics_service.proto": "envoy/service/metrics/v2/metrics_service.proto", + "envoy/service/ratelimit/v3/rls.proto": "envoy/service/ratelimit/v2/rls.proto", + "envoy/service/status/v3/csds.proto": "envoy/service/status/v2/csds.proto", + "envoy/config/tap/v3/common.proto": "envoy/service/tap/v2alpha/common.proto", + "envoy/service/tap/v3/tap.proto": "envoy/service/tap/v2alpha/tap.proto", + "envoy/service/trace/v3/trace_service.proto": "envoy/service/trace/v2/trace_service.proto", + "envoy/type/metadata/v3/metadata.proto": "envoy/type/metadata/v2/metadata.proto", + "envoy/type/tracing/v3/custom_tag.proto": "envoy/type/tracing/v2/custom_tag.proto" +} diff --git a/tools/protodoc/BUILD b/tools/protodoc/BUILD index 919df98a8137..d9eeb6ac203f 100644 --- a/tools/protodoc/BUILD +++ b/tools/protodoc/BUILD @@ -21,7 +21,10 @@ envoy_proto_library( py_binary( name = "protodoc", srcs = ["protodoc.py"], - data = ["//docs:protodoc_manifest.yaml"], + data = [ + "//docs:protodoc_manifest.yaml", + "//docs:v2_mapping.json", + ], visibility = ["//visibility:public"], deps = [ ":manifest_proto_py_proto", diff --git a/tools/protodoc/protodoc.py b/tools/protodoc/protodoc.py index e3fbb4a94068..f634bd7be2f5 100755 --- a/tools/protodoc/protodoc.py +++ b/tools/protodoc/protodoc.py @@ -36,6 +36,9 @@ # Namespace prefix for Envoy core APIs. ENVOY_API_NAMESPACE_PREFIX = '.envoy.api.v2.' +# Last documented v2 api version +ENVOY_LAST_V2_VERSION = "1.17.2" + # Namespace prefix for Envoy top-level APIs. ENVOY_PREFIX = '.envoy.' @@ -57,13 +60,17 @@ """ .. _extension_{{extension}}: -This extension may be referenced by the qualified name *{{extension}}* +This extension may be referenced by the qualified name ``{{extension}}`` + +.. rst-class:: inline-note .. note:: {{status}} {{security_posture}} +.. rst-class:: inline-tip + .. tip:: This extension extends and can be used with the following extension {% if categories|length > 1 %}categories{% else %}category{% endif %}: @@ -124,6 +131,22 @@ for _cat in _v['categories']: EXTENSION_CATEGORIES.setdefault(_cat, []).append(_k) +REDIRECTS_FILE = os.environ.get("REDIRECTS_FILE", "/tmp/redirects.txt") + +V2_LINK_TEMPLATE = Template( + """ +.. sidebar:: API v3 + + This documentation is for the Envoy v3 API. + + As of Envoy v1.18 the v2 API has been removed and is no longer supported. + + If you are upgrading from v2 config you may wish to view the API v2 documentation: + + :ref:`{{v2_text}} <{{v2_url}}>` + +""") + class ProtodocError(Exception): """Base error class for the protodoc module.""" @@ -260,7 +283,7 @@ def format_extension_category(extension_category): category=extension_category, extensions=sorted(extensions)) -def format_header_from_file(style, source_code_info, proto_name): +def format_header_from_file(style, source_code_info, proto_name, v2_link): """Format RST header based on special file level title Args: @@ -281,9 +304,10 @@ def format_header_from_file(style, source_code_info, proto_name): formatted_extension = format_extension(extension) if annotations.DOC_TITLE_ANNOTATION in source_code_info.file_level_annotations: return anchor + format_header( - style, source_code_info.file_level_annotations[ - annotations.DOC_TITLE_ANNOTATION]) + formatted_extension, stripped_comment - return anchor + format_header(style, proto_name) + formatted_extension, stripped_comment + style, source_code_info.file_level_annotations[annotations.DOC_TITLE_ANNOTATION] + ) + v2_link + "\n\n" + formatted_extension, stripped_comment + return v2_link + anchor + format_header( + style, proto_name) + formatted_extension, stripped_comment def format_field_type_as_json(type_context, field): @@ -648,6 +672,10 @@ class RstFormatVisitor(visitor.Visitor): def __init__(self): r = runfiles.Create() + + with open(r.Rlocation('envoy/docs/v2_mapping.json'), 'r') as f: + self.v2_mapping = json.load(f) + with open(r.Rlocation('envoy/docs/protodoc_manifest.yaml'), 'r') as f: # Load as YAML, emit as JSON and then parse as proto to provide type # checking. @@ -681,6 +709,7 @@ def visit_message(self, msg_proto, type_context, nested_msgs, nested_enums): formatted_leading_comment = format_comment_with_annotations(leading_comment, 'message') if hide_not_implemented(leading_comment): return '' + return anchor + header + proto_link + formatted_leading_comment + format_message_as_json( type_context, msg_proto) + format_message_as_definition_list( type_context, msg_proto, @@ -691,6 +720,20 @@ def visit_file(self, file_proto, type_context, services, msgs, enums): if all(len(msg) == 0 for msg in msgs) and all(len(enum) == 0 for enum in enums): has_messages = False + v2_link = "" + if file_proto.name in self.v2_mapping: + # TODO(phlax): remove _v2_ from filepath once sed mangling is removed + v2_filepath = f"envoy_v2_api_file_{self.v2_mapping[file_proto.name]}" + v2_text = v2_filepath.split('/', 1)[1] + v2_url = f"v{ENVOY_LAST_V2_VERSION}:{v2_filepath}" + v2_link = V2_LINK_TEMPLATE.render(v2_url=v2_url, v2_text=v2_text) + + # TODO(phlax): move this to a separate bazel task + with open(REDIRECTS_FILE, "a") as f: + redirect_from = f"api-v2/{self.v2_mapping[file_proto.name].split('/', 1)[1]}.rst" + redirect_to = f"api-v3/{file_proto.name.split('/', 1)[1]}.rst" + f.write(f"{redirect_from}\t{redirect_to}\n") + # TODO(mattklein123): The logic in both the doc and transform tool around files without messages # is confusing and should be cleaned up. This is a stop gap to have titles for all proto docs # in the common case. @@ -704,7 +747,7 @@ def visit_file(self, file_proto, type_context, services, msgs, enums): # Find the earliest detached comment, attribute it to file level. # Also extract file level titles if any. header, comment = format_header_from_file( - '=', type_context.source_code_info, file_proto.name) + '=', type_context.source_code_info, file_proto.name, v2_link) # If there are no messages, we don't include in the doc tree (no support for # service rendering yet). We allow these files to be missing from the # toctrees. @@ -716,7 +759,7 @@ def visit_file(self, file_proto, type_context, services, msgs, enums): warnings += ( '.. warning::\n This API is work-in-progress and is ' 'subject to breaking changes.\n\n') - debug_proto = format_proto_as_block_comment(file_proto) + # debug_proto = format_proto_as_block_comment(file_proto) return header + warnings + comment + '\n'.join(msgs) + '\n'.join(enums) # + debug_proto From 8a89b37a8b104fc921edd96d1dbb9cf8b0bd7b3a Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Wed, 5 May 2021 20:47:58 +0100 Subject: [PATCH 02/19] tools/ Signed-off-by: Ryan Northey --- tools/protodoc/protodoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/protodoc/protodoc.py b/tools/protodoc/protodoc.py index f634bd7be2f5..5eadf279444a 100755 --- a/tools/protodoc/protodoc.py +++ b/tools/protodoc/protodoc.py @@ -141,7 +141,7 @@ As of Envoy v1.18 the v2 API has been removed and is no longer supported. - If you are upgrading from v2 config you may wish to view the API v2 documentation: + If you are upgrading from v2 API config you may wish to view the v2 API documentation: :ref:`{{v2_text}} <{{v2_url}}>` From c883c6adf87cb329079839cebb6c46a74209b00e Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 08:53:35 +0100 Subject: [PATCH 03/19] shift-redirects Signed-off-by: Ryan Northey --- docs/build.sh | 2 +- tools/protodoc/protodoc.py | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/build.sh b/docs/build.sh index 1bf18e0f54ec..81bea3ece4a0 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -163,7 +163,7 @@ rsync -av \ # Merge generated redirects # TODO(phlax): Move updating redirects to separate bazel task -cat /tmp/redirects.txt >> "${GENERATED_RST_DIR}"/redirects.txt +jq -r 'with_entries(.key |= sub("^envoy/";"api-v2/")) | with_entries(.value |= sub("^envoy/";"api-v3/")) | to_entries[] | "\(.key)\t\t\(.value)"' docs/v2_mapping.json >> "${GENERATED_RST_DIR}"/redirects.txt # To speed up validate_fragment invocations in validating_code_block bazel build "${BAZEL_BUILD_OPTIONS[@]}" //tools/config_validation:validate_fragment diff --git a/tools/protodoc/protodoc.py b/tools/protodoc/protodoc.py index 5eadf279444a..498433bc4c5e 100755 --- a/tools/protodoc/protodoc.py +++ b/tools/protodoc/protodoc.py @@ -131,8 +131,6 @@ for _cat in _v['categories']: EXTENSION_CATEGORIES.setdefault(_cat, []).append(_k) -REDIRECTS_FILE = os.environ.get("REDIRECTS_FILE", "/tmp/redirects.txt") - V2_LINK_TEMPLATE = Template( """ .. sidebar:: API v3 @@ -728,12 +726,6 @@ def visit_file(self, file_proto, type_context, services, msgs, enums): v2_url = f"v{ENVOY_LAST_V2_VERSION}:{v2_filepath}" v2_link = V2_LINK_TEMPLATE.render(v2_url=v2_url, v2_text=v2_text) - # TODO(phlax): move this to a separate bazel task - with open(REDIRECTS_FILE, "a") as f: - redirect_from = f"api-v2/{self.v2_mapping[file_proto.name].split('/', 1)[1]}.rst" - redirect_to = f"api-v3/{file_proto.name.split('/', 1)[1]}.rst" - f.write(f"{redirect_from}\t{redirect_to}\n") - # TODO(mattklein123): The logic in both the doc and transform tool around files without messages # is confusing and should be cleaned up. This is a stop gap to have titles for all proto docs # in the common case. From fc5dee01968d98c9b58ba5d706b70883f328e2ad Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 09:12:56 +0100 Subject: [PATCH 04/19] install-jq Signed-off-by: Ryan Northey --- ci/do_ci.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/do_ci.sh b/ci/do_ci.sh index e832dd61ff31..e15c57c29bde 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -442,6 +442,9 @@ elif [[ "$CI_TARGET" == "fix_spelling_pedantic" ]]; then elif [[ "$CI_TARGET" == "docs" ]]; then echo "generating docs..." # Build docs. + # TODO(phlax): Move jq install to envoy-build-tools + sudo apt-get update -y + sudo apt-get install -y -qq --no-install-recommends jq BAZEL_BUILD_OPTIONS="${BAZEL_BUILD_OPTIONS[*]}" "${ENVOY_SRCDIR}"/docs/build.sh exit 0 elif [[ "$CI_TARGET" == "deps" ]]; then From 4a0d75acaec541026f5e0c68b65f507758f6d305 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 09:30:18 +0100 Subject: [PATCH 05/19] ci/ Signed-off-by: Ryan Northey --- ci/do_ci.sh | 3 --- ci/run_envoy_docker.sh | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ci/do_ci.sh b/ci/do_ci.sh index e15c57c29bde..e832dd61ff31 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -442,9 +442,6 @@ elif [[ "$CI_TARGET" == "fix_spelling_pedantic" ]]; then elif [[ "$CI_TARGET" == "docs" ]]; then echo "generating docs..." # Build docs. - # TODO(phlax): Move jq install to envoy-build-tools - sudo apt-get update -y - sudo apt-get install -y -qq --no-install-recommends jq BAZEL_BUILD_OPTIONS="${BAZEL_BUILD_OPTIONS[*]}" "${ENVOY_SRCDIR}"/docs/build.sh exit 0 elif [[ "$CI_TARGET" == "deps" ]]; then diff --git a/ci/run_envoy_docker.sh b/ci/run_envoy_docker.sh index b545950d787e..a593e81e1364 100755 --- a/ci/run_envoy_docker.sh +++ b/ci/run_envoy_docker.sh @@ -40,9 +40,13 @@ else BUILD_DIR_MOUNT_DEST=/build SOURCE_DIR="${PWD}" SOURCE_DIR_MOUNT_DEST=/source + # TODO(phlax): remove jq install once upstream support is added: + # https://github.com/envoyproxy/envoy-build-tools/pull/132/checks?check_run_id=2516452176 START_COMMAND=("/bin/bash" "-lc" "groupadd --gid $(id -g) -f envoygroup \ && useradd -o --uid $(id -u) --gid $(id -g) --no-create-home --home-dir /build envoybuild \ && usermod -a -G pcap envoybuild \ + && apt-get update \ + && apt-get install --no-install-recommends jq \ && chown envoybuild:envoygroup /build \ && sudo -EHs -u envoybuild bash -c 'cd /source && $*'") fi From ed86834ef66d87b3b91f02b82fa3f11b4c76c72e Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 09:32:38 +0100 Subject: [PATCH 06/19] ci/ Signed-off-by: Ryan Northey --- ci/run_envoy_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_envoy_docker.sh b/ci/run_envoy_docker.sh index a593e81e1364..6b9f98c4d64d 100755 --- a/ci/run_envoy_docker.sh +++ b/ci/run_envoy_docker.sh @@ -41,7 +41,7 @@ else SOURCE_DIR="${PWD}" SOURCE_DIR_MOUNT_DEST=/source # TODO(phlax): remove jq install once upstream support is added: - # https://github.com/envoyproxy/envoy-build-tools/pull/132/checks?check_run_id=2516452176 + # https://github.com/envoyproxy/envoy-build-tools/pull/132 START_COMMAND=("/bin/bash" "-lc" "groupadd --gid $(id -g) -f envoygroup \ && useradd -o --uid $(id -u) --gid $(id -g) --no-create-home --home-dir /build envoybuild \ && usermod -a -G pcap envoybuild \ From e7d98e4f557681bd20cb104c7828624cb6705a35 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 09:43:13 +0100 Subject: [PATCH 07/19] ci/ Signed-off-by: Ryan Northey --- ci/run_envoy_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_envoy_docker.sh b/ci/run_envoy_docker.sh index 6b9f98c4d64d..1e65d5b89950 100755 --- a/ci/run_envoy_docker.sh +++ b/ci/run_envoy_docker.sh @@ -46,7 +46,7 @@ else && useradd -o --uid $(id -u) --gid $(id -g) --no-create-home --home-dir /build envoybuild \ && usermod -a -G pcap envoybuild \ && apt-get update \ - && apt-get install --no-install-recommends jq \ + && apt-get install -y -qq --no-install-recommends jq \ && chown envoybuild:envoygroup /build \ && sudo -EHs -u envoybuild bash -c 'cd /source && $*'") fi From 5d152046bd9ae3e71e702d9292cc6f4fa6818b19 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 10:03:40 +0100 Subject: [PATCH 08/19] jq Signed-off-by: Ryan Northey --- docs/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build.sh b/docs/build.sh index 81bea3ece4a0..23070e8b4fb0 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -163,7 +163,7 @@ rsync -av \ # Merge generated redirects # TODO(phlax): Move updating redirects to separate bazel task -jq -r 'with_entries(.key |= sub("^envoy/";"api-v2/")) | with_entries(.value |= sub("^envoy/";"api-v3/")) | to_entries[] | "\(.key)\t\t\(.value)"' docs/v2_mapping.json >> "${GENERATED_RST_DIR}"/redirects.txt +jq -r 'with_entries(.key |= sub("^envoy/";"api-v3/")) | with_entries(.value |= sub("^envoy/";"api-v2/")) | to_entries[] | "\(.value)\t\t\(.key)"' docs/v2_mapping.json >> "${GENERATED_RST_DIR}"/redirects.txt # To speed up validate_fragment invocations in validating_code_block bazel build "${BAZEL_BUILD_OPTIONS[@]}" //tools/config_validation:validate_fragment From e91b5fb026b74d2a627b3fec2cb0a8f323d0aa06 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 10:33:35 +0100 Subject: [PATCH 09/19] checking-grep Signed-off-by: Ryan Northey --- docs/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/build.sh b/docs/build.sh index 23070e8b4fb0..1a80155dbb10 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -135,6 +135,9 @@ generate_api_rst v3 # Fixup anchors and references in v3 so they form a distinct namespace. # TODO(htuch): Do this in protodoc generation in the future. find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_api_#envoy_v3_api_#g" + +find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 + # TODO(phlax): Remove this once above is removed find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_v2_api_#envoy_api_#g" @@ -162,7 +165,6 @@ rsync -av \ "${GENERATED_RST_DIR}" # Merge generated redirects -# TODO(phlax): Move updating redirects to separate bazel task jq -r 'with_entries(.key |= sub("^envoy/";"api-v3/")) | with_entries(.value |= sub("^envoy/";"api-v2/")) | to_entries[] | "\(.value)\t\t\(.key)"' docs/v2_mapping.json >> "${GENERATED_RST_DIR}"/redirects.txt # To speed up validate_fragment invocations in validating_code_block From 05db40d2c4cfad4d531e7db2dba6385cc2d1478a Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 10:58:02 +0100 Subject: [PATCH 10/19] docs/ Signed-off-by: Ryan Northey --- docs/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build.sh b/docs/build.sh index 1a80155dbb10..63252bb78c9a 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -136,7 +136,7 @@ generate_api_rst v3 # TODO(htuch): Do this in protodoc generation in the future. find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_api_#envoy_v3_api_#g" -find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 +grep config_resource_monitors "${GENERATED_RST_DIR}"/api-v3 # TODO(phlax): Remove this once above is removed find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_v2_api_#envoy_api_#g" From f2adaa753490cbd5506ab14ca73806a76d23bdc2 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 11:13:17 +0100 Subject: [PATCH 11/19] docs/ Signed-off-by: Ryan Northey --- docs/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build.sh b/docs/build.sh index 63252bb78c9a..7bf9cad30b03 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -136,7 +136,7 @@ generate_api_rst v3 # TODO(htuch): Do this in protodoc generation in the future. find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_api_#envoy_v3_api_#g" -grep config_resource_monitors "${GENERATED_RST_DIR}"/api-v3 +grep -r config_resource_monitors "${GENERATED_RST_DIR}"/api-v3 # TODO(phlax): Remove this once above is removed find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_v2_api_#envoy_api_#g" From 0084c34a286a59c4912add3f9b0be94dcfd9d6da Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 11:29:02 +0100 Subject: [PATCH 12/19] docs/ Signed-off-by: Ryan Northey --- docs/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/build.sh b/docs/build.sh index 7bf9cad30b03..8d2d79911df1 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -135,8 +135,7 @@ generate_api_rst v3 # Fixup anchors and references in v3 so they form a distinct namespace. # TODO(htuch): Do this in protodoc generation in the future. find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_api_#envoy_v3_api_#g" - -grep -r config_resource_monitors "${GENERATED_RST_DIR}"/api-v3 +find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#config_resource_monitors#v3_config_resource_monitors#g" # TODO(phlax): Remove this once above is removed find "${GENERATED_RST_DIR}"/api-v3 -name "*.rst" -print0 | xargs -0 sed -i -e "s#envoy_v2_api_#envoy_api_#g" From b671f90050d0861889ebd27ec00c05424578ff15 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 15:43:46 +0100 Subject: [PATCH 13/19] build: Bump build hash to 55d9e4719d2bd0accce8f829b44dab70cd42112a Signed-off-by: Ryan Northey --- .bazelrc | 2 +- .devcontainer/Dockerfile | 2 +- examples/wasm-cc/docker-compose-wasm.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bazelrc b/.bazelrc index b97516ba3f9f..19c8eae5d70f 100644 --- a/.bazelrc +++ b/.bazelrc @@ -247,7 +247,7 @@ build:remote-clang-cl --config=rbe-toolchain-clang-cl # Docker sandbox # NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/main/toolchains/rbe_toolchains_config.bzl#L8 -build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:3d0491e2034287959a292806e3891fd0b7dd2703 +build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:55d9e4719d2bd0accce8f829b44dab70cd42112a build:docker-sandbox --spawn_strategy=docker build:docker-sandbox --strategy=Javac=docker build:docker-sandbox --strategy=Closure=docker diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 17524a28f257..378a45b4f1af 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM gcr.io/envoy-ci/envoy-build:3d0491e2034287959a292806e3891fd0b7dd2703 +FROM gcr.io/envoy-ci/envoy-build:55d9e4719d2bd0accce8f829b44dab70cd42112a ARG USERNAME=vscode ARG USER_UID=501 diff --git a/examples/wasm-cc/docker-compose-wasm.yaml b/examples/wasm-cc/docker-compose-wasm.yaml index eb7424995583..32caf4245c27 100644 --- a/examples/wasm-cc/docker-compose-wasm.yaml +++ b/examples/wasm-cc/docker-compose-wasm.yaml @@ -2,7 +2,7 @@ version: "3.7" services: wasm_compile_update: - image: envoyproxy/envoy-build-ubuntu:3d0491e2034287959a292806e3891fd0b7dd2703 + image: envoyproxy/envoy-build-ubuntu:55d9e4719d2bd0accce8f829b44dab70cd42112a command: | bash -c "bazel build //examples/wasm-cc:envoy_filter_http_wasm_updated_example.wasm \ && cp -a bazel-bin/examples/wasm-cc/* /build" @@ -12,7 +12,7 @@ services: - ./lib:/build wasm_compile: - image: envoyproxy/envoy-build-ubuntu:3d0491e2034287959a292806e3891fd0b7dd2703 + image: envoyproxy/envoy-build-ubuntu:55d9e4719d2bd0accce8f829b44dab70cd42112a command: | bash -c "bazel build //examples/wasm-cc:envoy_filter_http_wasm_example.wasm \ && cp -a bazel-bin/examples/wasm-cc/* /build" From 2166656e2bde194817f142ffdf7a5afdc3181b98 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 15:52:18 +0100 Subject: [PATCH 14/19] update build-tools version 50ea97bb4289441f4f87537e8c145ffb79b1c9ba Signed-off-by: Ryan Northey --- bazel/repository_locations.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index d4be5d0a79f8..07de59f2eb94 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -65,11 +65,11 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "envoy-build-tools", project_desc = "Common build tools shared by the Envoy/UDPA ecosystem", project_url = "https://github.com/envoyproxy/envoy-build-tools", - version = "50ea97bb4289441f4f87537e8c145ffb79b1c9ba", - sha256 = "3c905c71e9f2f29f4c24d9e980c95a45c73510e10b9baa6199e3fa4acfafba5e", + version = "2d4bdba38113cd9bf758c2609f40ce90014e52af", + sha256 = "8e872990609d67f9b635790020672d1972b906bed30e4d08d97f964be1ced483", strip_prefix = "envoy-build-tools-{version}", urls = ["https://github.com/envoyproxy/envoy-build-tools/archive/{version}.tar.gz"], - release_date = "2021-04-14", + release_date = "2021-05-06", use_category = ["build"], ), boringssl = dict( From ed38491bb2ed961e7a66554e81c5fab4037afdcf Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 6 May 2021 16:01:40 +0100 Subject: [PATCH 15/19] revert-ci-hack Signed-off-by: Ryan Northey --- ci/run_envoy_docker.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ci/run_envoy_docker.sh b/ci/run_envoy_docker.sh index 1e65d5b89950..b545950d787e 100755 --- a/ci/run_envoy_docker.sh +++ b/ci/run_envoy_docker.sh @@ -40,13 +40,9 @@ else BUILD_DIR_MOUNT_DEST=/build SOURCE_DIR="${PWD}" SOURCE_DIR_MOUNT_DEST=/source - # TODO(phlax): remove jq install once upstream support is added: - # https://github.com/envoyproxy/envoy-build-tools/pull/132 START_COMMAND=("/bin/bash" "-lc" "groupadd --gid $(id -g) -f envoygroup \ && useradd -o --uid $(id -u) --gid $(id -g) --no-create-home --home-dir /build envoybuild \ && usermod -a -G pcap envoybuild \ - && apt-get update \ - && apt-get install -y -qq --no-install-recommends jq \ && chown envoybuild:envoygroup /build \ && sudo -EHs -u envoybuild bash -c 'cd /source && $*'") fi From 5b78d4506c916face89008d77d2e7763991e8834 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Fri, 7 May 2021 14:46:42 +0100 Subject: [PATCH 16/19] tools/ Signed-off-by: Ryan Northey --- tools/protodoc/protodoc.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tools/protodoc/protodoc.py b/tools/protodoc/protodoc.py index 498433bc4c5e..cee09c2b4ea3 100755 --- a/tools/protodoc/protodoc.py +++ b/tools/protodoc/protodoc.py @@ -62,15 +62,11 @@ This extension may be referenced by the qualified name ``{{extension}}`` -.. rst-class:: inline-note - .. note:: {{status}} {{security_posture}} -.. rst-class:: inline-tip - .. tip:: This extension extends and can be used with the following extension {% if categories|length > 1 %}categories{% else %}category{% endif %}: @@ -133,15 +129,13 @@ V2_LINK_TEMPLATE = Template( """ -.. sidebar:: API v3 - - This documentation is for the Envoy v3 API. +This documentation is for the Envoy v3 API. - As of Envoy v1.18 the v2 API has been removed and is no longer supported. +As of Envoy v1.18 the v2 API has been removed and is no longer supported. - If you are upgrading from v2 API config you may wish to view the v2 API documentation: +If you are upgrading from v2 API config you may wish to view the v2 API documentation: - :ref:`{{v2_text}} <{{v2_url}}>` + :ref:`{{v2_text}} <{{v2_url}}>` """) From 0ddc9fa977b25ae05d4f32c67b334b67d6dd8f50 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Fri, 7 May 2021 15:00:50 +0100 Subject: [PATCH 17/19] tools/ Signed-off-by: Ryan Northey --- tools/protodoc/protodoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/protodoc/protodoc.py b/tools/protodoc/protodoc.py index cee09c2b4ea3..1baa98a23fd2 100755 --- a/tools/protodoc/protodoc.py +++ b/tools/protodoc/protodoc.py @@ -297,7 +297,7 @@ def format_header_from_file(style, source_code_info, proto_name, v2_link): if annotations.DOC_TITLE_ANNOTATION in source_code_info.file_level_annotations: return anchor + format_header( style, source_code_info.file_level_annotations[annotations.DOC_TITLE_ANNOTATION] - ) + v2_link + "\n\n" + formatted_extension, stripped_comment + ) + "\n" + v2_link + "\n\n" + formatted_extension, stripped_comment return v2_link + anchor + format_header( style, proto_name) + formatted_extension, stripped_comment From 57bc603ae7d2b52422f5e63bb18bf3a1d839b97d Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Fri, 7 May 2021 15:17:08 +0100 Subject: [PATCH 18/19] tools/ Signed-off-by: Ryan Northey --- tools/protodoc/protodoc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/protodoc/protodoc.py b/tools/protodoc/protodoc.py index 1baa98a23fd2..0dbfe44db664 100755 --- a/tools/protodoc/protodoc.py +++ b/tools/protodoc/protodoc.py @@ -297,9 +297,9 @@ def format_header_from_file(style, source_code_info, proto_name, v2_link): if annotations.DOC_TITLE_ANNOTATION in source_code_info.file_level_annotations: return anchor + format_header( style, source_code_info.file_level_annotations[annotations.DOC_TITLE_ANNOTATION] - ) + "\n" + v2_link + "\n\n" + formatted_extension, stripped_comment - return v2_link + anchor + format_header( - style, proto_name) + formatted_extension, stripped_comment + ) + v2_link + "\n\n" + formatted_extension, stripped_comment + return anchor + format_header( + style, proto_name) + v2_link + "\n\n" + formatted_extension, stripped_comment def format_field_type_as_json(type_context, field): From be34c7435ee04164a6f4468429b3d35ca03f4717 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Fri, 7 May 2021 15:37:10 +0100 Subject: [PATCH 19/19] docs/ Signed-off-by: Ryan Northey --- docs/root/_static/css/envoy.css | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/root/_static/css/envoy.css b/docs/root/_static/css/envoy.css index 5c4eaa33d73d..4cc8d11cfdf3 100644 --- a/docs/root/_static/css/envoy.css +++ b/docs/root/_static/css/envoy.css @@ -36,11 +36,3 @@ table.docutils div.line-block { padding: 2px 2px; border: solid #eee 1px; } - -.inline-tip, -.inline-note, -.inline-warning { - clear: none !important; - display: inline-block !important; - max-width: 50%; -}