PDE Maintaining and Automating Data Workloads Practice Question
You manage a Cloud Composer environment that runs a critical DAG every hour. The DAG includes a task that calls a Cloud Function to process data. Recently, the Cloud Function started taking longer than expected, causing the DAG to exceed its SLA. You need to detect this delay and automatically retry the task if it fails due to timeout, while minimizing changes to the DAG. What should you do?
⚠ Common exam trap
The trap here is focusing on the Cloud Function's timeout instead of the Airflow task's execution_timeout, which controls retries at the orchestration level.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Set the task's execution_timeout parameter to a value slightly above the expected runtime and configure retries with a delay.
Using the task's execution_timeout parameter allows Airflow to enforce a time limit on the task. If the task exceeds this limit, it fails and can be automatically retried based on the retries and retry_delay settings. This requires only a small change to the DAG's task definition and leverages native Airflow features, effectively addressing both detection of delays and automatic retries.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a Cloud Monitoring alert on the Cloud Function's execution time and manually trigger the DAG upon alert.
Why it's wrong here
Manual intervention is not automatic and does not meet the requirement to automatically retry the task. While monitoring is useful, it adds operational overhead and delays recovery. This approach does not minimize changes to the DAG; it introduces an external process and does not guarantee timely retries, making it unsuitable for a critical hourly DAG.
- ✗
Increase the Cloud Function's timeout setting to the maximum allowed and rely on the DAG's default retry behavior.
Why it's wrong here
Increasing the Cloud Function's timeout may allow it to run longer, but it does not address the DAG's SLA or provide automatic retries if the function fails due to other issues. The DAG's default retry behavior may not be configured, and this change alone does not ensure detection of delays or retries on timeout. It also shifts the problem without solving the orchestration aspect.
- ✓
Set the task's execution_timeout parameter to a value slightly above the expected runtime and configure retries with a delay.
Why this is correct
The execution_timeout parameter defines the maximum time a task can run before it is killed and marked as failed. Setting it appropriately allows the task to be retried if it exceeds the timeout. Configuring retries ensures automatic retry on failure. This approach requires minimal changes to the DAG and directly addresses the timeout issue, making it the most efficient solution.
- ✗
Add a Python operator that polls the Cloud Function's status and raises an exception if it exceeds a threshold, then set retries on that operator.
Why it's wrong here
This custom polling operator adds complexity and code to the DAG, violating the requirement to minimize changes. It also duplicates functionality that Airflow already provides through execution_timeout. While it could work, it is less efficient and more error-prone than using built-in parameters, making it a poor choice for a simple timeout and retry scenario.
About these practice questions
One of 747 original PDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.