-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Add mysql db to ratings service in bookinfo app. #574
Conversation
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
Hi @saumoh. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Confirmed |
/ok-to-test |
Please sync with master |
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 do we need another rule for reviews?
samples/apps/bookinfo/BUILD
Outdated
@@ -11,6 +11,7 @@ filegroup( | |||
"route-rule-reviews-50-v3.yaml", | |||
"route-rule-reviews-test-v2.yaml", | |||
"route-rule-reviews-v2-v3.yaml", | |||
"route-rule-ratings-test-v2.yaml" |
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.
Rename to ...ratings-mysql.yaml for clarity ?
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.
yup
--- | ||
type: route-rule | ||
spec: | ||
name: reviews-test-v2 |
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.
What if this for?
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 reviews version v1 does not query the micro service ratings only version 2 and 3 of reviews services do that.
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.
right.. But to keep in line with the tutorials and story flow, I suggest picking up from last step of request routing task (all traffic goes to reviews v3). You wont even need a rule here for reviews
@saumoh CLA please |
cc @frankbu |
@@ -0,0 +1,17 @@ | |||
type: route-rule | |||
spec: | |||
name: ratings-test-v2 |
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.
Since the rule has no specific (test related) match criteria and just sends 100% of traffic to v2, I think it might be better to just name this rule ratings-default
and use istioctl replace
rather than creating a second rule with higher precedence. I guess it depends on how we integrate this with the tasks and story flow. If we plan to run it and then delete before moving on to the next task, then I guess it's fine as is.
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 main goal of this rule was to be able to write a e2e test where I can use rule(s) to direct traffic to v2/v3 of reviews and ratings(v2).
I can write a new route-rule file which is specific to the tasks and story flow. My preference is to separate that out to a different pr if thats ok with you folks. wdyt?
samples/apps/bookinfo/bookinfo.yaml
Outdated
@@ -82,6 +82,34 @@ spec: | |||
ports: | |||
- containerPort: 9080 | |||
--- | |||
apiVersion: extensions/v1beta1 | |||
kind: Deployment |
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.
Should we move this deployment to a separate yaml file (e.g., bookinfo-ratings-v2.yaml)? Starting all versions of all services up front with one yaml file is not such a good idea, especially as we continue to add more versions with additional prereqs.
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 e2e testing be able to load multiple services, at init time. if so then i can move it over these new services to a different file.
samples/apps/bookinfo/bookinfo.yaml
Outdated
app: mysqldb | ||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment |
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.
Would it be better to launch mysql outside of the mesh? A more realistic scenario? I wonder if it even works, since several users have been noticing issues with accessing non-istiofied TCP and/or headless services. Would be a good test anyway.
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.
afaik today there is no easy way to bypass the sidecar at reviews(v3) specific to a version of ratings(v2). Right off the bat there wouldn't be a way to test(e2e) this out right now?
implementation wise there would be 2 versions of the bookinfo-ratings-(x|y).yaml. One where the mysql is loaded with annotation to skip sidecar and one with sidecar enabled.
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.
What I meant is to run the mysqldb service and deployment outside of the mesh, that is, put them into a separate yaml file and apply without kube-inject
. Ratings v3 will still use the sidecar, it will just be calling an ordinary mysqldb service instead of an istiofied one.
* make http runner available as library Moved a lot of the code from fortio main to the library so #517 can be better/easier (This is same as #519 with attempt at preserving history and without the grpc wip) * Added test, moved echosrv code to lib, ... Added test, moved echosrv code to lib, created DynamicHTTP for test, renames per @douglas-reid code review comments * Better initialization syntax * Add a negative testing
* Upgrade mixer to 0.2.0-c570a67 * Fix linter issue in devel/fortio/httprunner_test.go
* Upgrade rules_go to 0.5.2 * Fix bazel_to_go.py to vendor go_repository
Automatic merge from submit-queue Add PR template PR template to help adding release-note
* Fix devel linters issue * Move TestDefaultRouting to Setup * Increase retries on mixer test
/release-note-none |
/lgtm |
can we fix |
/test all |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ldemailly, rshriram The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
I just noticed a bunch of
can we change that to istio ? @saumoh would you mind filling a followup - tia! |
@saumoh: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Automatic merge from submit-queue Add mysql db to ratings service in bookinfo app. Tracked in #573 and discussed in #473, adding mysql db access to the ratings service. cc @rshriram @AnthonyAmanse @ldemailly Former-commit-id: 7b5271d
Automatic merge from submit-queue Add mysql db to ratings service in bookinfo app. Tracked in istio#573 and discussed in istio#473, adding mysql db access to the ratings service. cc @rshriram @AnthonyAmanse @ldemailly Former-commit-id: 7b5271d
Automatic merge from submit-queue Add mysql db to ratings service in bookinfo app. Tracked in #573 and discussed in #473, adding mysql db access to the ratings service. cc @rshriram @AnthonyAmanse @ldemailly Former-commit-id: 7b5271d
* Update common files * Update installer SHA * Remove protoc_gen_k8s_support_plugins It is causing errors like this: ``` istio.io/operator/pkg/apis/istio/v1alpha1 imports github.com/gogo/protobuf/protobuf/google/protobuf: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/protobuf/google/protobuf common/Makefile.common.mk:67: recipe for target 'tidy-go' failed make: *** [tidy-go] Error 1 make: *** [Makefile:111: gen-check] Error 2 ``` * make gen-check * update golden files
Tracked in #573 and discussed in #473, adding mysql db access to the ratings service.
cc @rshriram @AnthonyAmanse @ldemailly