rosera / pet-theory

Pet Theory (Qwiklabs Quest)
GNU General Public License v3.0
98 stars 95 forks source link

Use GET method instead of POST to display billing to the frontend service #31

Closed gvu0110 closed 1 year ago

gvu0110 commented 2 years ago

I completed the following lab but there are some bugs that doesn't allow the frontend service to display billing from billing API. Serverless Cloud Run Development: Challenge Lab

- Bugs in lab instruction: There is a misunderstand between private billing service and prod billing service.

In Task 5: Deploy the Billing Service, we're deploying a prod service from pet-theory/lab07/prod-api-billing, so the PROD_BILLING_URL should be the prod service URL, not private one. So the private billing service is redundant and can be removed from the system

So, this should be changed:

Note: Replace PRIVATE_BILLING_SERVICE inside the code-block with Private billing service
PROD_BILLING_URL=$(gcloud run services \
describe PRIVATE_BILLING_SERVICE \
--platform managed \
--region us-central1 \
--format "value(status.url)")

to

Note: Replace PROD_BILLING_SERVICE inside the code-block with Prod billing service
PROD_BILLING_URL=$(gcloud run services \
describe PROD_BILLING_SERVICE \
--platform managed \
--region us-central1 \
--format "value(status.url)")

- Bug in code: To be able to display the billing table as the final screenshot in Task 7: Redeploy the Frontend Service, we need to use GET method instead of POST. This PR is going to fix this bug.

Without these changes, all the lab checkmarks are still green though. But it causes confusion for learners and doesn't bring up the correct lab objectives

rosera commented 1 year ago

These are changes for the lab not the source code. Please raise a PR on the lab.