Skip to content
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

API-enabled BookInfo sample application #693

Merged
merged 11 commits into from
Sep 8, 2017
Merged

Conversation

ErikWittern
Copy link
Contributor

@ErikWittern ErikWittern commented Sep 7, 2017

This pull request adds a JSON API to the BookInfo application. Changed details, ratings, and reviews microservices now return JSON responses. The productpage microservice fetches JSON responses and either renders them in HTML productpage, or exposes them via API endpoints. Added a swagger.yaml file documenting the API. Exposed the API via ingress controller through changes in bookinfo.yaml.

The motivations behind this pull request are to more closely follow best practices of microservices communicating in a lean, machine-understandable data format, and to allow experiments with an API as discussed with @rshriram.

Updated bookinfo services to support proper REST responses (JSON format). You can now use swagger UI to access bookinfo API on your cluster.

@googlebot
Copy link
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@googlebot googlebot added the cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. label Sep 7, 2017
@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: rshriram

Assign the PR to them by writing /assign @rshriram 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

@rshriram
Copy link
Member

rshriram commented Sep 7, 2017

/ok-to-test

@ErikWittern
Copy link
Contributor Author

I signed it!

@googlebot
Copy link
Collaborator

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. labels Sep 7, 2017
Copy link
Contributor

@frankbu frankbu left a comment

Choose a reason for hiding this comment

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

Overall, this looks great, but one problem is that when reviews-v1 is being used, the productpage now displays "no ratings available" messages, where previously it didn't show anything at all, and only showed the message in the case that the ratings service was failing (unavailable). Since we're running a version of the reviews service where the ratings feature doesn't even exists, we shouldn't be displaying the concept in the UI either.

@ErikWittern
Copy link
Contributor Author

@frankbu Good point! I have committed a change in 04ee5fa to display nothing if no ratings are present, rather than displaying an error-message.

@istio-merge-robot
Copy link

@ErikWittern PR needs rebase

@istio-merge-robot istio-merge-robot added the needs-rebase Indicates a PR needs to be rebased before being merged label Sep 8, 2017
@istio-merge-robot istio-merge-robot removed the needs-rebase Indicates a PR needs to be rebased before being merged label Sep 8, 2017
@rshriram
Copy link
Member

rshriram commented Sep 8, 2017

Updated bookinfo app with proper REST style API and Swagger files

Copy link
Contributor

@frankbu frankbu left a comment

Choose a reason for hiding this comment

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

LGTM

@rshriram
Copy link
Member

rshriram commented Sep 8, 2017

All necessary tests pass again.. Phew! merging..

@rshriram rshriram merged commit 2ffc8ed into istio:master Sep 8, 2017
@istio-testing
Copy link
Collaborator

@ErikWittern: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/e2e-suite-no_rbac-no_auth.sh a6d9c5d link /test e2e-suite-no_rbac-no_auth
prow/e2e-suite-rbac-auth.sh faae06e link /test e2e-suite-rbac-auth

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.


if (process.env.SERVICE_VERSION == "v2") {
if (process.env.DB_TYPE == "mysql") {
Copy link
Contributor

Choose a reason for hiding this comment

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

please restore this ASAP

rshriram pushed a commit that referenced this pull request Sep 14, 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
mandarjog pushed a commit to mandarjog/istio that referenced this pull request Oct 30, 2017
* Docker tag to be short-sha-date to ease release

Updating version of jenkins library.

* Using origin as remote name in Jenkins


Former-commit-id: 895fd1aeadabe48e0fc598dac7bde97b1ced5c94
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


Former-commit-id: 2ffc8ed
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
mandarjog pushed a commit that referenced this pull request Oct 31, 2017
* Docker tag to be short-sha-date to ease release

Updating version of jenkins library.

* Using origin as remote name in Jenkins


Former-commit-id: 11845b1251fed4748530c0756d88bdcb1a701593
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


Former-commit-id: 2ffc8ed
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 Oct 31, 2017
)

* istioctl: Use cobra.Command::Example for documenting example usage

* add missing word in comment
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


Former-commit-id: 2ffc8ed
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
howardjohn pushed a commit to howardjohn/istio that referenced this pull request Jan 12, 2020
0x01001011 pushed a commit to thedemodrive/istio that referenced this pull request Jul 16, 2020
This commit adds a TcpClusterRewrite proto to be used in the upcoming
TCP cluster rewrite filter on istio/proxy.

Signed-off-by: Venil Noronha <veniln@vmware.com>
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.

None yet

7 participants