Implement bootstraping code for submessage support inside templates (part2).#1702
Merged
guptasu merged 8 commits intoistio:masterfrom Nov 28, 2017
Merged
Implement bootstraping code for submessage support inside templates (part2).#1702guptasu merged 8 commits intoistio:masterfrom
guptasu merged 8 commits intoistio:masterfrom
Conversation
istio-merge-robot
pushed a commit
that referenced
this pull request
Nov 16, 2017
Automatic merge from submit-queue. Fix submessage support part1 **What this PR does / why we need it**: NOTE: The changes in this PR were already approved by @douglas-reid @geeknoid. Old PR contained 12 files (#1617) but was reverted because of missing 2 generated pb.go file. I have added the missing 2 generated file in this PR (this PR therefore contains 14 files). Note this is part 1 of sub message support. It is based on the proposal https://docs.google.com/document/d/1GL_EOitfBJDfgbQJOSROceK5RdqNPuiggeAebaNqyf8/edit# This PR contains the code generation for the go Instances and the augmented proto messages (Type and InstanceParam) Part 2 (following [PR](#1702)) will contain the bootstraping code generation (code that runs at run-time, inside Mixer framework and instantiates these sub-message artifacts generated in this PR). **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note none ```
Contributor
Author
|
@ozevren @geeknoid @douglas-reid @mandarjog friendly ping |
Codecov Report
@@ Coverage Diff @@
## master #1702 +/- ##
==========================================
- Coverage 81.67% 81.15% -0.53%
==========================================
Files 201 187 -14
Lines 20447 18889 -1558
==========================================
- Hits 16701 15329 -1372
+ Misses 3275 3128 -147
+ Partials 471 432 -39
Continue to review full report at Codecov.
|
Contributor
Author
|
@geeknoid friendly ping |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: geeknoid The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
ozevren
reviewed
Nov 28, 2017
mixer/pkg/config/manager_test.go
Outdated
ozevren
approved these changes
Nov 28, 2017
This reverts commit 06ffe78f47a3aa33c925fddd6b9541a09bb4ebb1.
Contributor
Author
SRohitRaj
pushed a commit
to SRohitRaj/Istio
that referenced
this pull request
Jun 7, 2024
Automatic merge from submit-queue. Fix submessage support part1 **What this PR does / why we need it**: NOTE: The changes in this PR were already approved by @douglas-reid @geeknoid. Old PR contained 12 files (istio/istio#1617) but was reverted because of missing 2 generated pb.go file. I have added the missing 2 generated file in this PR (this PR therefore contains 14 files). Note this is part 1 of sub message support. It is based on the proposal https://docs.google.com/document/d/1GL_EOitfBJDfgbQJOSROceK5RdqNPuiggeAebaNqyf8/edit# This PR contains the code generation for the go Instances and the augmented proto messages (Type and InstanceParam) Part 2 (following [PR](istio/istio#1702)) will contain the bootstraping code generation (code that runs at run-time, inside Mixer framework and instantiates these sub-message artifacts generated in this PR). **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note none ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
NOTE Please read the entire description before reviewing. I can bet that it will help in the review.
This PR implements code generation of template bootstraping code (code that gets compiled in Mixer. It instantiates instances and types from config for all templates and dispatches them to adapter). Previous part 1 PR was responsible for generating definitions of instance and type constructs from templates with sub-messages. This PR is responsible for instantiating those generated artifacts based on user config. It finishes the submessage support work.
To support submessages, the generated code is restructured in this PR so that we can do recursions. Changes are in the following generated functions :
InferTypeandProcessCheck,ProcessQuotaandProcessReport. The new layout is something like this :NOTE: This PR is tricky to review because it is hard to visualize the diff of golang template file and the corresponding generated code. I recommend start reviewing the tests first and the baseline generated code after that (sample test files (check.proto, quota.proto and report.proto) and baseline generated file is AllTemplate.go.golden).
Also NOTE : There are two types of tests that are implemented in this PR:
/tools/codegen/pkg/bootstrapwhich just compares the generated code with baseline view.Release note: