From 185f22949d49c6da60e15e6589935135a612ea16 Mon Sep 17 00:00:00 2001 From: Christine Kim <35876108+ckim328@users.noreply.github.com> Date: Thu, 3 Feb 2022 10:36:03 -0500 Subject: [PATCH 1/3] cleanup: add region tags to yaml and sh (#684) * Added region tags to yaml and sh, edited the asm and gke files * Fix skaffold artifacts * make-release adds region tag to istio and k8 manifest * Addressed comments, changed gke to container per discussion * Replaced instances of container with gke, discarded uncessecary white space changes * Remove changes in github workflow, captured cloudbuild yaml tag --- .github/snippet-bot.yml | 5 +++-- .github/workflows/ci-pr.yaml | 2 +- cloudbuild.yaml | 4 ++++ hack/make-release-artifacts.sh | 4 ++++ src/adservice/genproto.sh | 3 +++ src/checkoutservice/genproto.sh | 4 ++++ src/currencyservice/genproto.sh | 4 ++++ src/emailservice/genproto.sh | 4 ++++ src/frontend/genproto.sh | 4 ++++ src/paymentservice/genproto.sh | 4 ++++ src/productcatalogservice/genproto.sh | 4 ++++ src/recommendationservice/genproto.sh | 4 ++++ src/shippingservice/genproto.sh | 4 ++++ 13 files changed, 47 insertions(+), 3 deletions(-) diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml index 6f36eeccc91..26d99f1aa29 100644 --- a/.github/snippet-bot.yml +++ b/.github/snippet-bot.yml @@ -1,4 +1,5 @@ -# Copyright 2022 Google LLC + +# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -10,4 +11,4 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and -# limitations under the License. \ No newline at end of file +# limitations under the License. diff --git a/.github/workflows/ci-pr.yaml b/.github/workflows/ci-pr.yaml index 3cc63409342..ff4e190849d 100644 --- a/.github/workflows/ci-pr.yaml +++ b/.github/workflows/ci-pr.yaml @@ -141,4 +141,4 @@ jobs: -H "Content-Type: application/json" \ -H "Authorization: token $GITHUB_TOKEN" \ --data '{ "body": "🚲 PR staged at '"http://${EXTERNAL_IP}"'"}' - sleep 60 + sleep 60 \ No newline at end of file diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 72ff1d017a4..7299e10150c 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START cloudbuild_microservice_demo_cloudbuild] + # This configuration file is used to build and deploy the app into a # GKE cluster using Google Cloud Build. # @@ -37,3 +39,5 @@ steps: timeout: '3600s' options: machineType: 'N1_HIGHCPU_8' + +# [END cloudbuild_microservice_demo_cloudbuild] \ No newline at end of file diff --git a/hack/make-release-artifacts.sh b/hack/make-release-artifacts.sh index 10fcb25c8b9..959815a2d5f 100755 --- a/hack/make-release-artifacts.sh +++ b/hack/make-release-artifacts.sh @@ -76,13 +76,17 @@ mk_kubernetes_manifests() { print_license_header print_autogenerated_warning + echo '# [START gke_release_kubernetes_manifests_microservices_demo]' echo "${out_manifest}" + echo "# [END gke_release_kubernetes_manifests_microservices_demo]" } mk_istio_manifests() { print_license_header print_autogenerated_warning + echo '# [START servicemesh_release_istio_manifests_microservices_demo]' read_manifests "${SCRIPTDIR}/../istio-manifests" + echo '# [END servicemesh_release_istio_manifests_microservices_demo]' } main() { diff --git a/src/adservice/genproto.sh b/src/adservice/genproto.sh index 57a060810d6..c80b5ea931b 100755 --- a/src/adservice/genproto.sh +++ b/src/adservice/genproto.sh @@ -14,7 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START gke_adservice_genproto] # protos are needed in adservice folder for compiling during Docker build. mkdir -p proto && \ cp ../../pb/demo.proto src/main/proto + +# [END gke_adservice_genproto] \ No newline at end of file diff --git a/src/checkoutservice/genproto.sh b/src/checkoutservice/genproto.sh index 18b0beabae9..b8062a2ecde 100755 --- a/src/checkoutservice/genproto.sh +++ b/src/checkoutservice/genproto.sh @@ -14,7 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START gke_checkoutservice_genproto] + PATH=$PATH:$GOPATH/bin protodir=../../pb protoc --go_out=plugins=grpc:genproto -I $protodir $protodir/demo.proto + +# [END gke_checkoutservice_genproto] \ No newline at end of file diff --git a/src/currencyservice/genproto.sh b/src/currencyservice/genproto.sh index a9609fd1534..9d28adaffaf 100755 --- a/src/currencyservice/genproto.sh +++ b/src/currencyservice/genproto.sh @@ -14,6 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START gke_currencyservice_genproto] + # protos are loaded dynamically for node, simply copies over the proto. mkdir -p proto cp -r ../../pb/* ./proto + +# [END gke_currencyservice_genproto] \ No newline at end of file diff --git a/src/emailservice/genproto.sh b/src/emailservice/genproto.sh index 7f0f4ff47eb..f35887b7afe 100755 --- a/src/emailservice/genproto.sh +++ b/src/emailservice/genproto.sh @@ -14,4 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START gke_emailservice_genproto] + python -m grpc_tools.protoc -I../../pb --python_out=. --grpc_python_out=. ../../pb/demo.proto + +# [END gke_emailservice_genproto] \ No newline at end of file diff --git a/src/frontend/genproto.sh b/src/frontend/genproto.sh index 18b0beabae9..4e5619a61db 100755 --- a/src/frontend/genproto.sh +++ b/src/frontend/genproto.sh @@ -14,7 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START gke_frontend_genproto] + PATH=$PATH:$GOPATH/bin protodir=../../pb protoc --go_out=plugins=grpc:genproto -I $protodir $protodir/demo.proto + +# [END gke_frontend_genproto] \ No newline at end of file diff --git a/src/paymentservice/genproto.sh b/src/paymentservice/genproto.sh index a9609fd1534..a980703ab0e 100755 --- a/src/paymentservice/genproto.sh +++ b/src/paymentservice/genproto.sh @@ -14,6 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START gke_paymentservice_genproto] + # protos are loaded dynamically for node, simply copies over the proto. mkdir -p proto cp -r ../../pb/* ./proto + +# [END gke_paymentservice_genproto] \ No newline at end of file diff --git a/src/productcatalogservice/genproto.sh b/src/productcatalogservice/genproto.sh index 18b0beabae9..4ba0d36caf2 100755 --- a/src/productcatalogservice/genproto.sh +++ b/src/productcatalogservice/genproto.sh @@ -14,7 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START gke_productcatalogservice_genproto] + PATH=$PATH:$GOPATH/bin protodir=../../pb protoc --go_out=plugins=grpc:genproto -I $protodir $protodir/demo.proto + +# [END gke_productcatalogservice_genproto] \ No newline at end of file diff --git a/src/recommendationservice/genproto.sh b/src/recommendationservice/genproto.sh index 22ed156a10a..fc9660c6c91 100755 --- a/src/recommendationservice/genproto.sh +++ b/src/recommendationservice/genproto.sh @@ -14,9 +14,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START gke_recommendationservice_genproto] + # script to compile python protos # # requires gRPC tools: # pip install -r requirements.txt python -m grpc_tools.protoc -I../../pb --python_out=. --grpc_python_out=. ../../pb/demo.proto + +# [END gke_recommendationservice_genproto] \ No newline at end of file diff --git a/src/shippingservice/genproto.sh b/src/shippingservice/genproto.sh index 18b0beabae9..d94a80f82c7 100755 --- a/src/shippingservice/genproto.sh +++ b/src/shippingservice/genproto.sh @@ -14,7 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START gke_shippingservice_genproto] + PATH=$PATH:$GOPATH/bin protodir=../../pb protoc --go_out=plugins=grpc:genproto -I $protodir $protodir/demo.proto + +# [END gke_shippingservice_genproto] \ No newline at end of file From 8f39e3152f7d46d21d221a8c0617cb88c537851b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 20:47:40 -0500 Subject: [PATCH 2/3] Bump node-fetch from 2.6.6 to 2.6.7 in /src/paymentservice (#707) Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7) --- updated-dependencies: - dependency-name: node-fetch dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/paymentservice/package-lock.json | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/paymentservice/package-lock.json b/src/paymentservice/package-lock.json index 703ea39921c..9284f5ed080 100644 --- a/src/paymentservice/package-lock.json +++ b/src/paymentservice/package-lock.json @@ -2636,14 +2636,22 @@ "dev": true }, "node_modules/node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dependencies": { "whatwg-url": "^5.0.0" }, "engines": { "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, "node_modules/node-forge": { @@ -6067,9 +6075,9 @@ "dev": true }, "node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "requires": { "whatwg-url": "^5.0.0" } From 128ca374258285edfaac0fbf9d2e69e1f4fc90ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 21:14:59 -0500 Subject: [PATCH 3/3] Bump node-fetch from 2.6.6 to 2.6.7 in /src/currencyservice (#708) Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7) --- updated-dependencies: - dependency-name: node-fetch dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shabir Mohamed Abdul Samadh <7249208+Shabirmean@users.noreply.github.com> --- src/currencyservice/package-lock.json | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/currencyservice/package-lock.json b/src/currencyservice/package-lock.json index b3d7301ff93..d820dcc8959 100644 --- a/src/currencyservice/package-lock.json +++ b/src/currencyservice/package-lock.json @@ -2846,14 +2846,22 @@ "dev": true }, "node_modules/node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dependencies": { "whatwg-url": "^5.0.0" }, "engines": { "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, "node_modules/node-forge": { @@ -6621,9 +6629,9 @@ "dev": true }, "node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "requires": { "whatwg-url": "^5.0.0" }