0
0
GCPcloud~20 mins

Workflows for orchestration in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Workflow Orchestration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Understanding Workflow Execution Behavior

You have a Google Cloud Workflow that calls two HTTP endpoints sequentially. The first call succeeds, but the second call returns a 500 error. What will be the overall status of the workflow execution?

GCP
steps:
  - callFirst:
      call: http.get
      args:
        url: https://example.com/api/first
  - callSecond:
      call: http.get
      args:
        url: https://example.com/api/second
AThe workflow execution status will be 'FAILED' because the second call returned an error.
BThe workflow execution status will be 'SUCCEEDED' because the first call succeeded.
CThe workflow execution status will be 'RUNNING' indefinitely until manually stopped.
DThe workflow execution status will be 'CANCELLED' automatically after the error.
Attempts:
2 left
💡 Hint

Think about how workflows handle errors in sequential steps.

Architecture
intermediate
2:00remaining
Choosing Workflow for Event-Driven Orchestration

You want to automate a process that triggers when a file is uploaded to Cloud Storage, then processes the file and updates a database. Which architecture best uses Google Cloud Workflows?

AUse Cloud Scheduler to run a Workflow every hour to check for new files and process them.
BUse a Compute Engine VM to poll Cloud Storage and run the processing logic directly.
CUse Cloud Storage trigger to start a Cloud Function that calls a Workflow to process the file and update the database.
DUse Pub/Sub to send messages to a Workflow that runs continuously processing files.
Attempts:
2 left
💡 Hint

Consider event-driven triggers and how Workflows integrate with other services.

security
advanced
2:00remaining
Securing Workflow Access to Cloud Resources

You have a Workflow that needs to access a Cloud SQL database. What is the best practice to securely grant the Workflow access?

AAssign the Workflow's service account the Cloud SQL Client role and use IAM authentication in the Workflow.
BEmbed the database username and password directly in the Workflow definition.
CUse a public IP for Cloud SQL and allow all IPs to connect.
DRun the Workflow on a Compute Engine VM with the database credentials stored in environment variables.
Attempts:
2 left
💡 Hint

Think about least privilege and secure authentication methods.

Configuration
advanced
2:00remaining
Identifying Workflow Syntax Error

Which option contains a syntax error in the Google Cloud Workflow YAML definition?

GCP
steps:
  - step1:
      call: http.get
      args:
        url: https://example.com/api
  - step2:
      call: http.get
      args:
        url: https://example.com/api2
AThe YAML is invalid because 'args' must be a list, not a map.
BThe YAML is valid and will run without errors.
CThe YAML is invalid because 'call' should be 'calls'.
DThe YAML is invalid because 'step2' is missing a colon after the dash.
Attempts:
2 left
💡 Hint

Check YAML syntax carefully, especially colons and indentation.

Best Practice
expert
2:00remaining
Optimizing Workflow for Cost and Performance

You have a long-running Workflow that calls multiple APIs with some steps that can run in parallel. What is the best practice to optimize cost and performance?

ADuplicate the Workflow for each API call to run them in separate executions.
BUse parallel steps in the Workflow to run independent API calls concurrently and handle errors individually.
CUse a single step that calls all APIs in one combined request to reduce steps.
DRun all API calls sequentially to avoid complexity and reduce errors.
Attempts:
2 left
💡 Hint

Think about how parallelism affects execution time and cost.