Skip to content

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

Merged
merged 6 commits into from
Feb 6, 2018

Conversation

guptasu
Copy link
Contributor

@guptasu guptasu commented Feb 6, 2018

@guptasu guptasu requested a review from rshriram as a code owner February 6, 2018 00:26
@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Feb 6, 2018
@@ -0,0 +1,26 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
Copy link
Contributor

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!

Copy link
Contributor Author

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D

Copy link
Contributor Author

@guptasu guptasu left a 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.
Copy link
Contributor Author

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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D

@@ -0,0 +1,26 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
Copy link
Contributor Author

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;
Copy link
Contributor Author

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;
Copy link
Contributor Author

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 {}
Copy link
Contributor

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.

Copy link
Contributor Author

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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

@guptasu guptasu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

@guptasu guptasu merged commit 12edb32 into istio:master Feb 6, 2018
incfly pushed a commit to incfly/api that referenced this pull request Jun 13, 2018
* transcoding: Remove MethodInfo

* fix test lib path

* fix test
incfly pushed a commit to incfly/api that referenced this pull request Jun 13, 2018
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
```
nacx added a commit to nacx/api that referenced this pull request Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants