From 5427b279398db7353bbe88e7ee3a51efc2e6936e Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Wed, 17 Jul 2019 23:23:45 -0700 Subject: [PATCH 01/10] Update repokitteh.star --- repokitteh.star | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/repokitteh.star b/repokitteh.star index 9c90e4986673..0be5414d70c4 100644 --- a/repokitteh.star +++ b/repokitteh.star @@ -2,5 +2,12 @@ use("github.com/repokitteh/modules/assign.star") use("github.com/repokitteh/modules/review.star") use("github.com/repokitteh/modules/wait.star") use("github.com/repokitteh/modules/circleci.star", secret_token=get_secret('circle_token')) +use( + "github.com/repokitteh/modules/ownerscheck.star", + paths=[ + 'htuch!', 'api/', + 'itayd', 'api/', + ], +) alias('retest', 'retry-circle') From 826d3a054bac439e385c75f0ff9ec067e2348bc2 Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Wed, 17 Jul 2019 23:24:43 -0700 Subject: [PATCH 02/10] Update STYLE.md --- api/STYLE.md | 151 +-------------------------------------------------- 1 file changed, 1 insertion(+), 150 deletions(-) diff --git a/api/STYLE.md b/api/STYLE.md index 0289c5f85af2..217985fbf91b 100644 --- a/api/STYLE.md +++ b/api/STYLE.md @@ -1,150 +1 @@ -# API style guidelines - -Generally follow guidance at https://cloud.google.com/apis/design/, in -particular for proto3 as described at: - -* https://cloud.google.com/apis/design/proto3 -* https://cloud.google.com/apis/design/naming_convention -* https://developers.google.com/protocol-buffers/docs/style - -In addition, the following conventions should be followed: - -* For protos that are [frozen](https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/v2_overview#status), - the following guidelines are followed: - - * Fields should not be renumbered or have their types changed. This is standard proto development - procedure. - * If fields are deleted, the following syntax should be put in their place: - - ```proto - reserved ; - ``` - - E.g., - - ```proto - reserved 15; - ``` - - * Renaming of fields or package namespaces for a proto must not occur. This is inherently dangerous, since: - * Fields renames break wire compatibility. This is stricter than standard proto development procedure - in the sense that it does not break binary wire format. However, it **does** break loading - of YAML/JSON into protos as well as text protos. Since we consider YAML/JSON to be first class - inputs, we must not change field names. - - * For service definitions, the gRPC endpoint URL is inferred from package - namespace, so this will break client/server communication. - - * For a message embedded in an `Any` object, the type URL, which the package - namespace is a part of, may be used by Envoy or other API consuming code. - Currently, this applies to the top-level resources embedded in - `DiscoveryResponse` objects, e.g. `Cluster`, `Listener`, etc. - - * Consuming code will break and require source change to match the changes. - -* Non-frozen fields should be tagged with `[#not-implemented-hide:]`, `[#not-implemented-warn:]`, - `[#proto-status: draft]` or `[#proto-status: experimental]`. - -* Protos for configs and services that are not implemented immediately in - Envoy, or are under active design and development should be versioned - "v2alpha". If several iterations of the alpha API are expected, then versions - "v2alpha1", "v2alpha2", and so on are preferred. Alpha-versioned protos are - considered experimental and are not required to preserve compatibility. - -* Every proto directory should have a `README.md` describing its content. See - for example [envoy.service](envoy/service/README.md). - -* The data plane APIs are primarily intended for machine generation and consumption. - It is expected that the management server is responsible for mapping higher - level configuration concepts to concrete API concepts. Similarly, static configuration - fragments may be generated by tools and UIs, etc. The APIs and tools used - to generate xDS configuration are beyond the scope of the definitions in this - repository. - -* Use [wrapped scalar - types](https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto) - where there is a real need for the field to have a default value that does not - match the proto3 defaults (0/false/""). This should not be done for fields - where the proto3 defaults make sense. All things being equal, pick appropriate - logic, e.g. enable vs. disable for a `bool` field, such that the proto3 - defaults work, but only where this doesn't result in API gymnastics. - -* Always use plural field names for `repeated` fields, such as `filters`. - -* Due to the fact that we consider JSON/YAML to be first class inputs, we cannot easily change a - a singular field to a repeated field (both due to JSON/YAML array structural differences as well - as singular vs. plural field naming). If there is a reasonable expectation that a field may need - to be repeated in the future, but we don't need it to be repeated right away, consider making it - repeated now but using constraints to enforce a maximum repeated size of 1. E.g.: - - ```proto - repeated OutputSink sinks = 1 [(validate.rules).repeated = {min_items: 1, max_items: 1}]; - ``` - -* Always use upper camel case names for message types and enum types without embedded - acronyms, such as `HttpRequest`. - -* Prefer `oneof` selections to boolean overloads of fields, for example, prefer: - - ```proto - oneof path_specifier { - string simple_path = 1; - string regex_path = 2; - } - ``` - - to - - ```proto - string path = 1; - bool path_is_regex = 2; - ``` - - This is more efficient, extendable and self-describing. - -* The API includes two types for representing [percents](envoy/type/percent.proto). `Percent` is - effectively a double value in the range 0.0-100.0. `FractionalPercent` is an integral fraction - that can be used to create a truncated percentage also in the range 0.0-100.0. In high performance - paths, `FractionalPercent` is preferred as randomness calculations can be performed using integral - modulo and comparison operations only without any floating point conversions. Typically, most - users do not need infinite precision in these paths. - -* For enum types, if one of the enum values is used for most cases, make it the - first enum value with `0` numeric value. Otherwise, define the first enum - value like `TYPE_NAME_UNSPECIFIED = 0`, and treat it as an error. This design - pattern forces developers to explicitly choose the correct enum value for - their use case, and avoid misunderstanding of the default behavior. - -* Proto fields should be sorted logically, not by field number. For large protos, place a comment - at the top that specifies the next free field number. E.g., - - ``` - // [#comment:next free field: 28] - ``` - -* The [Breaking Change - Policy](https://github.com/envoyproxy/envoy/blob/master/CONTRIBUTING.md#breaking-change-policy) describes - API versioning, deprecation and compatibility. - -## Package organization - -API definitions are layered hierarchically in packages from top-to-bottom: - -- `envoy.service` contains gRPC definitions of supporting services; -- `envoy.config` contains definitions for service configuration, filter -configuration, and bootstrap; -- `envoy.api.v2` contains definitions for EDS, CDS, RDS, LDS, and top-level -resources such as `Cluster`; -- `envoy.api.v2.endpoint`, `envoy.api.v2.cluster`, `envoy.api.v2.route`, -`envoy.api.v2.listener`, `envoy.api.v2.ratelimit` define sub-messages of the top-level resources; -- `envoy.api.v2.core` and `envoy.api.v2.auth` hold core definitions consumed -throughout the API. - -Dependencies are enforced from top-to-bottom using visibility constraints in -the build system to prevent circular dependency formation. Package group -`//envoy/api/v2:friends` selects consumers of the core API package (services and configs) -and is the default visibility for the core API packages. The default visibility -for services and configs should be `//docs` (proto documentation tool). - -Extensions should use the regular hierarchy. For example, configuration for network filters belongs -in a package under `envoy.config.filter.network`. +who needs style anyway From 3eae9b32e065118c4974e488a24bd7f1030f8654 Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Wed, 17 Jul 2019 23:25:28 -0700 Subject: [PATCH 03/10] Update repokitteh.star --- repokitteh.star | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repokitteh.star b/repokitteh.star index 0be5414d70c4..cfab5f26ea4a 100644 --- a/repokitteh.star +++ b/repokitteh.star @@ -5,8 +5,8 @@ use("github.com/repokitteh/modules/circleci.star", secret_token=get_secret('circ use( "github.com/repokitteh/modules/ownerscheck.star", paths=[ - 'htuch!', 'api/', - 'itayd', 'api/', + ('htuch!', 'api/'), + ('itayd', 'api/'), ], ) From 7755096464efd60f8fdb11d6cd7ac74d4eb637fc Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Fri, 19 Jul 2019 22:04:37 -0700 Subject: [PATCH 04/10] Update repokitteh.star --- repokitteh.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repokitteh.star b/repokitteh.star index cfab5f26ea4a..ef7a063ca9b7 100644 --- a/repokitteh.star +++ b/repokitteh.star @@ -6,7 +6,7 @@ use( "github.com/repokitteh/modules/ownerscheck.star", paths=[ ('htuch!', 'api/'), - ('itayd', 'api/'), + ('envoy/testers', 'api/'), ], ) From b06064931c14414933e8449ac4d158813bc2e0d8 Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Fri, 19 Jul 2019 22:05:29 -0700 Subject: [PATCH 05/10] Update repokitteh.star --- repokitteh.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repokitteh.star b/repokitteh.star index ef7a063ca9b7..cb86a4d52677 100644 --- a/repokitteh.star +++ b/repokitteh.star @@ -6,7 +6,7 @@ use( "github.com/repokitteh/modules/ownerscheck.star", paths=[ ('htuch!', 'api/'), - ('envoy/testers', 'api/'), + ('envoyproxy/testers', 'api/'), ], ) From 7f71e6f5f3ba6dfd2e3040bb4996ffcff41ff85d Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Fri, 19 Jul 2019 22:11:14 -0700 Subject: [PATCH 06/10] Update repokitteh.star --- repokitteh.star | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repokitteh.star b/repokitteh.star index cb86a4d52677..0fd43f5c929b 100644 --- a/repokitteh.star +++ b/repokitteh.star @@ -5,8 +5,8 @@ use("github.com/repokitteh/modules/circleci.star", secret_token=get_secret('circ use( "github.com/repokitteh/modules/ownerscheck.star", paths=[ - ('htuch!', 'api/'), - ('envoyproxy/testers', 'api/'), + ('htuch', 'api/'), + ('envoyproxy/testers!', 'api/'), ], ) From dad4e6ab63f39baab05743a0314b88e3c05602f7 Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Fri, 19 Jul 2019 22:12:13 -0700 Subject: [PATCH 07/10] Update repokitteh.star --- repokitteh.star | 1 + 1 file changed, 1 insertion(+) diff --git a/repokitteh.star b/repokitteh.star index 0fd43f5c929b..28d9d5df2c83 100644 --- a/repokitteh.star +++ b/repokitteh.star @@ -7,6 +7,7 @@ use( paths=[ ('htuch', 'api/'), ('envoyproxy/testers!', 'api/'), + ('rktest2', 'api/'), ], ) From 93ad0173dc168c24478c8a753d12c410126efaaf Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Fri, 19 Jul 2019 22:12:34 -0700 Subject: [PATCH 08/10] Update repokitteh.star --- repokitteh.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repokitteh.star b/repokitteh.star index 28d9d5df2c83..804484bb7c03 100644 --- a/repokitteh.star +++ b/repokitteh.star @@ -7,7 +7,7 @@ use( paths=[ ('htuch', 'api/'), ('envoyproxy/testers!', 'api/'), - ('rktest2', 'api/'), + ('rktest2!', 'api/'), ], ) From 3cbb1389e372766419c19d76c805dc1dba025a59 Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Fri, 19 Jul 2019 22:14:44 -0700 Subject: [PATCH 09/10] Update repokitteh.star --- repokitteh.star | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/repokitteh.star b/repokitteh.star index 804484bb7c03..17aa4fa71127 100644 --- a/repokitteh.star +++ b/repokitteh.star @@ -3,9 +3,8 @@ use("github.com/repokitteh/modules/review.star") use("github.com/repokitteh/modules/wait.star") use("github.com/repokitteh/modules/circleci.star", secret_token=get_secret('circle_token')) use( - "github.com/repokitteh/modules/ownerscheck.star", + "github.com/repokitteh/modules/ownerscheck.star#o2", paths=[ - ('htuch', 'api/'), ('envoyproxy/testers!', 'api/'), ('rktest2!', 'api/'), ], From 7de05a845edf39306dc78f5ed8b0fe756ac7cd31 Mon Sep 17 00:00:00 2001 From: Itay Donanhirsh Date: Fri, 19 Jul 2019 22:30:09 -0700 Subject: [PATCH 10/10] Update STYLE.md --- api/STYLE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/api/STYLE.md b/api/STYLE.md index 217985fbf91b..27c51a86c78c 100644 --- a/api/STYLE.md +++ b/api/STYLE.md @@ -1 +1,2 @@ who needs style anyway +