-
Notifications
You must be signed in to change notification settings - Fork 573
introduce api/mixer/adapter/model/v1beta #359
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
Conversation
mixer/adapter/model/v1beta/BUILD
Outdated
@@ -0,0 +1,26 @@ | |||
load("@io_bazel_rules_go//go:def.bzl", "go_library") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nuke this file, no bazel no more!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D
package istio.mixer.adapter.model.v1beta; | ||
import "google/protobuf/descriptor.proto"; | ||
|
||
// Specifies the variety of the the Template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// The available varieties of templates, controlling the semantics of what an adapter does with each instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D
|
||
// Specifies the variety of the the Template. | ||
enum TemplateVariety { | ||
// TEMPLATE_VARIETY_CHECK makes the template applicable for Mixer's check calls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to repeat the enum's name in the description text, it doesn't look good in the generated docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D
|
||
syntax = "proto3"; | ||
|
||
package istio.mixer.adapter.model.v1beta; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the protos in this package needs to have a package-level comment. This will be used at the top of the page on istio.io.
Additionally, one of the protos needs to have a comment that contains $location, $title, and $overview which are used to drive code gen. See other protos in istio/api for examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix it. Do you think we should fail the BUILD if the package is missing these necessary stuff. I remember you already have warnings for that stuff in your tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @geeknoid for the feedback. PTAL at the update.
package istio.mixer.adapter.model.v1beta; | ||
import "google/protobuf/descriptor.proto"; | ||
|
||
// Specifies the variety of the the Template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D
|
||
// Specifies the variety of the the Template. | ||
enum TemplateVariety { | ||
// TEMPLATE_VARIETY_CHECK makes the template applicable for Mixer's check calls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D
mixer/adapter/model/v1beta/BUILD
Outdated
@@ -0,0 +1,26 @@ | |||
load("@io_bazel_rules_go//go:def.bzl", "go_library") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D
|
||
syntax = "proto3"; | ||
|
||
package istio.mixer.adapter.model.v1beta; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix it. Do you think we should fail the BUILD if the package is missing these necessary stuff. I remember you already have warnings for that stuff in your tool.
|
||
syntax = "proto3"; | ||
|
||
package istio.mixer.adapter.model.v1beta; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D
|
||
// Value is used inside templates for fields that have dynamic types. The actual datatype | ||
// of the field depends on the datatype of the expression used in the operator configuration. | ||
message Value {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to define standard types, you should define it under istio.type package and promise never making any breaking change. Don't call it standard if you cannot commit to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are meant to be used only for templates, so putting inside istio.type might be too much. However, I agree standard is not necessary, I can fix it, will rename it to type.proto. WDYT ?
// are used to describe the type of Attributes at run time, describe the type of | ||
// the result of evaluating an expression, and to describe the runtime type of | ||
// fields of other descriptors. | ||
enum ValueType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we use attribute type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wora which attribute type. AttributeManifest is actually using ValueType. Am I missing something ?
|
||
syntax = "proto3"; | ||
|
||
// This proto describes the types that can be used inside Mixer templates. These message types are used to specify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one package-level comment per package, not one per file.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. This was already there, forgot to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL
* transcoding: Remove MethodInfo * fix test lib path * fix test
Automatic merge from submit-queue. [DO NOT MERGE] Auto PR to update dependencies of mixerclient This PR will be merged automatically once checks are successful. ```release-note none ```
introduce api/mixer/adapter/model/v1beta
As per the plan https://docs.google.com/document/d/1C_NMYj9ZhdUWwZMWUoX_SLU8VoiV8U8V6yUJVYcdSS8/edit?ts=5a7220f9#