exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 233 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 233
Topic #: 1
[All Professional Cloud Developer Questions]

Your team is developing a Cloud Function triggered by Cloud Storage events. You want to accelerate testing and development of your Cloud Function while following Google-recommended best practices. What should you do?

  • A. Create a new Cloud Function that is triggered when Cloud Audit Logs detects the cloudfunctions.functions.sourceCodeSet operation in the original Cloud Function. Send mock requests to the new function to evaluate the functionality.
  • B. Make a copy of the Cloud Function, and rewrite the code to be HTTP-triggered. Edit and test the new version by triggering the HTTP endpoint. Send mock requests to the new function to evaluate the functionality.
  • C. Install the Functions Frameworks library, and configure the Cloud Function on localhost. Make a copy of the function, and make edits to the new version. Test the new version using curl.
  • D. Make a copy of the Cloud Function in the Google Cloud console. Use the Cloud console's in-line editor to make source code changes to the new function. Modify your web application to call the new function, and test the new version in production
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
braska
5 months ago
Selected Answer: C
Making a copy of the function for edits ensures that your changes do not affect the original function in production. It provides a controlled environment for development and testing. curl Testing: Testing the new version using curl is a simple and effective way to send mock requests and evaluate the functionality of your Cloud Function locally. Using the Functions Frameworks library and local testing provides a development environment that is both efficient and aligned with Google-recommended best practices for Cloud Functions development.
upvoted 2 times
...
purushi
8 months, 2 weeks ago
Selected Answer: C
Option C is well suited for testing cloud functions in the local environment. https://cloud.google.com/functions/docs/running/function-frameworks
upvoted 1 times
...
AlizCert
8 months, 4 weeks ago
Not B because "Local testing Many development paradigms depend on being able to test your code relatively quickly. Because testing code on Cloud Functions itself involves waiting for deployed code and log entries to become available, running and testing your function on your development machine can make the testing process (and, in turn, the development process) significantly faster." C because: https://cloud.google.com/functions/docs/running/function-frameworks
upvoted 1 times
...
closer89
1 year ago
Selected Answer: C
https://cloud.google.com/functions/docs/running/calling#cloudevent_functions
upvoted 1 times
...
Pime13
1 year, 1 month ago
Selected Answer: C
https://cloud.google.com/functions/docs/running/overview#choosing_an_abstraction_layer https://cloud.google.com/functions/docs/running/function-frameworks https://cloud.google.com/functions/docs/running/calling#cloudevent-function-curl-tabs-storage
upvoted 1 times
...
TNT87
1 year, 2 months ago
Selected Answer: B
https://cloud.google.com/functions/docs/writing/write-event-driven-functions https://cloud.google.com/functions/docs/calling/storage
upvoted 2 times
TNT87
1 year, 2 months ago
https://firebase.google.com/docs/functions/gcp-storage-events
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago