Skip to content

Added MySQL support back to ratings microservice #811

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 18 commits into from
Sep 14, 2017

Conversation

ErikWittern
Copy link
Contributor

Release note:

NONE

@istio-testing
Copy link
Collaborator

Hi @ErikWittern. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@istio-merge-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
We suggest the following additional approver: ldemailly

Assign the PR to them by writing /assign @ldemailly in a comment when ready.

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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

Copy link
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

Thanks!

@rshriram
Copy link
Member

don't merge yet

@rshriram
Copy link
Member

/ok-to-test

@@ -1,2 +1,2 @@
{rating: 5}
{rating: 6}
Copy link
Member

Choose a reason for hiding this comment

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

it's fine to have something different so you can visually tell which one you get

@@ -10,4 +10,4 @@ CREATE TABLE `ratings` (
PRIMARY KEY (`ReviewID`)
);
INSERT INTO ratings (ReviewID, Rating) VALUES (1, 5);
INSERT INTO ratings (ReviewID, Rating) VALUES (2, 6);
INSERT INTO ratings (ReviewID, Rating) VALUES (2, 4);
Copy link
Member

Choose a reason for hiding this comment

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

is 6 breaking the UI in some way ?

Copy link
Contributor Author

@ErikWittern ErikWittern Sep 14, 2017

Choose a reason for hiding this comment

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

@ldemailly Yes, the UI only shows up to 5 "empty" stars. So, while the UI can display more than five "filled" stars, it would exceed the maximum a user would expect.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it looks pretty bad. May be use blue stars as next iteration?

if (process.env.SERVICE_VERSION === 'v2') {
var MongoClient = require('mongodb').MongoClient
var url = process.env.MONGO_DB_URL
if (process.env.DB_TYPE === 'mysql') {
Copy link
Member

Choose a reason for hiding this comment

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

thanks!
is this mostly reverting to what it was before ?

Copy link
Member

Choose a reason for hiding this comment

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

yes. Reverting and cleaning up. We can now use API driven tests and no longer need html comparators

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ldemailly In this implementation, the DB_TYPE variable needs to be set to mysql for MySQL to be used. This is in line with changes @rshriram did here: 22014c8#diff-6a25b9bedba073dde47bfc3559d560a1

@rshriram rshriram merged commit 584ab1b into istio:master Sep 14, 2017
rshriram pushed a commit that referenced this pull request Oct 30, 2017
* revised source code of microservices so they communicate in JSON and expose an API

* make API accessible via ingress controller

* added swagger definition of new API

* removed HTML status pages of microservices; aligned their health endpoints to return JSON

* do not display anything when ratings data is not present to address comment by @frankbu on pull request #693

* added back support for MySQL into ratings microservice

* fixed trailing line

* fixed space

* fixed ratings data in mongo db

* fixed ratings data in mysql db


Former-commit-id: 584ab1b
vbatts pushed a commit to vbatts/istio that referenced this pull request Oct 31, 2017
* revised source code of microservices so they communicate in JSON and expose an API

* make API accessible via ingress controller

* added swagger definition of new API

* removed HTML status pages of microservices; aligned their health endpoints to return JSON

* do not display anything when ratings data is not present to address comment by @frankbu on pull request istio#693

* added back support for MySQL into ratings microservice

* fixed trailing line

* fixed space

* fixed ratings data in mongo db

* fixed ratings data in mysql db


Former-commit-id: 584ab1b
mandarjog pushed a commit that referenced this pull request Nov 2, 2017
* revised source code of microservices so they communicate in JSON and expose an API

* make API accessible via ingress controller

* added swagger definition of new API

* removed HTML status pages of microservices; aligned their health endpoints to return JSON

* do not display anything when ratings data is not present to address comment by @frankbu on pull request #693

* added back support for MySQL into ratings microservice

* fixed trailing line

* fixed space

* fixed ratings data in mongo db

* fixed ratings data in mysql db


Former-commit-id: 584ab1b
0x01001011 pushed a commit to thedemodrive/istio that referenced this pull request Jul 16, 2020
* Doc fixes.

* Add high-level overview and diagrams for MCP (istio#805)

* document MCP

* add additional note on NACK behavior

* add a note about ignoring stale nonces

* Add envoy metrics service configuration to ProxyConfig (istio#803)

* Add envoy metrics service configuration to ProxyConfig

Similar to the statsd sink config, this change is in preparation for adding support for the envoy metrics service API.

* Update proto.lock

* Reorder metrics_service_address just after statsd_udp_address

* Update comment in the authN API to match with 1.1 behavior (istio#808)

* Rename metrics_service_address to clarify that it is for Envoy's API (istio#809)

Since "metrics service" is so ambiguous, this change specifically denotes that the config is for Envoy's metrics service API. The comments also now link to detailed info about the metrics service API.

* Generate separate HTML page per proto under networking (istio#811)

* Generate separate pages for each networking proto

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* update

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* tweaks

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* Fix interdoc references

* separate doc and go gen

* change dash to underscore

* fix

* more fixes

* makefile fix

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* remove bad target

* Revert "change dash to underscore"

This reverts commit 7fbced66f620fb60b0d5e18af916567e313a0109.

* final update

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* Revert "Generate separate HTML page per proto under networking (istio#811)"

This reverts commit 5f14eadd since it breaks the ability
to generate reference docs in istio.io

* Update to latest tools.

* Revert "Update to latest tools."

This reverts commit 231fadc5 which I accidentally pushed to the
wrong place.

* fix mcp update error diagram (istio#810)

* update istio/tools (istio#815)

* Revert "Revert "Generate separate HTML page per proto under networking (istio#811)"" (istio#818)

* Minor updates for building docker images. (istio#817)

* Add spell checking for docs. (istio#819)

* Add a bunch of words to the custom dictionary.

* Document exportTo restrictions (istio#820)

* Doc fixes. (istio#821)

* Proxy config: Add tls_certs_to_watch field (istio#824)

* Proxy config: Add tls_certs_to_watch field

* Address PR comment

* Revert "Proxy config: Add tls_certs_to_watch field (istio#824)" (istio#825)

This reverts commit e613e358ae8d4f331dd48904b0a2b176e11bf7f5.

* Update gateway and sidecar hosts doc (istio#826)

* Update gateway and sidecar hosts doc

* regen

* review comments

* Update API docs (service entry, gateway, sidecar) (istio#831)

* Update sidecar and gateway docs

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* gen docs

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* update service entry

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* updates

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* add configurable dns refresh rate to mesh for strict dns cluster,  (istio#832)

* add configurable dns refresh rate to mesh for strict dns cluster, issue istio#12181

* add lock file

* Post-merge generation
0x01001011 pushed a commit to thedemodrive/istio that referenced this pull request Jul 16, 2020
* Doc fixes.

* Add high-level overview and diagrams for MCP (istio#805)

* document MCP

* add additional note on NACK behavior

* add a note about ignoring stale nonces

* Add envoy metrics service configuration to ProxyConfig (istio#803)

* Add envoy metrics service configuration to ProxyConfig

Similar to the statsd sink config, this change is in preparation for adding support for the envoy metrics service API.

* Update proto.lock

* Reorder metrics_service_address just after statsd_udp_address

* Update comment in the authN API to match with 1.1 behavior (istio#808)

* Rename metrics_service_address to clarify that it is for Envoy's API (istio#809)

Since "metrics service" is so ambiguous, this change specifically denotes that the config is for Envoy's metrics service API. The comments also now link to detailed info about the metrics service API.

* Generate separate HTML page per proto under networking (istio#811)

* Generate separate pages for each networking proto

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* update

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* tweaks

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* Fix interdoc references

* separate doc and go gen

* change dash to underscore

* fix

* more fixes

* makefile fix

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* remove bad target

* Revert "change dash to underscore"

This reverts commit 7fbced66f620fb60b0d5e18af916567e313a0109.

* final update

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* Revert "Generate separate HTML page per proto under networking (istio#811)"

This reverts commit 5f14eadd since it breaks the ability
to generate reference docs in istio.io

* Update to latest tools.

* Revert "Update to latest tools."

This reverts commit 231fadc5 which I accidentally pushed to the
wrong place.

* fix mcp update error diagram (istio#810)

* update istio/tools (istio#815)

* Revert "Revert "Generate separate HTML page per proto under networking (istio#811)"" (istio#818)

* Minor updates for building docker images. (istio#817)

* Add spell checking for docs. (istio#819)

* Add a bunch of words to the custom dictionary.

* Document exportTo restrictions (istio#820)

* Doc fixes. (istio#821)

* Proxy config: Add tls_certs_to_watch field (istio#824)

* Proxy config: Add tls_certs_to_watch field

* Address PR comment

* Revert "Proxy config: Add tls_certs_to_watch field (istio#824)" (istio#825)

This reverts commit e613e358ae8d4f331dd48904b0a2b176e11bf7f5.

* Update gateway and sidecar hosts doc (istio#826)

* Update gateway and sidecar hosts doc

* regen

* review comments

* Update API docs (service entry, gateway, sidecar) (istio#831)

* Update sidecar and gateway docs

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* gen docs

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* update service entry

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* updates

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>

* add configurable dns refresh rate to mesh for strict dns cluster,  (istio#832)

* add configurable dns refresh rate to mesh for strict dns cluster, issue istio#12181

* add lock file

* Hosts are not ignored in ServiceEntry for HTTPs (istio#833)

* Hosts are not ignored in ServiceEntry for HTTPs

* Clarify

* Reword

* Generate protos

* Address code review comments

* Fix typo

* generate

* make mixer config marshal deterministic (istio#846)

Signed-off-by: Kuat Yessenov <kuat@google.com>

* Fix some doc errors. (istio#854)

This started out to just fix a bad link to unblock work on
istio.io, but I ended up fixing a bunch of typos/incorrect format
throughout.

* Fix two more broken links. (istio#856)

* Fix CRD examples for release-1.1 (istio#859)

* fix MeshNetworks demo (istio#841)

* fix MeshNetworks demo

* generate

* update

* last minute doc fixes (istio#865)

Signed-off-by: Shriram Rajagopalan <rshriram@gmail.com>

* Clarify comment for server_name field in Mixer oop auth config (istio#800)

* add mixerclient config to istio.io reference docs (istio#827)

* Envoyfilter docs fix (istio#867)

* Tweaks to get the mixer client config docs to be published. (istio#868)

* Change where the Mixer client docs are published.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants