Courseiva
Configure processes and communicationsmediumMultiple ChoiceObjective-mapped

Rolling Back Automatically When Post-Deployment Smoke Tests Fail

Your team uses Azure Pipelines to deploy a web app. They want to automatically roll back the deployment if the post-deployment smoke tests fail. What is the recommended approach?

Quick Answer

A deployment gate wired to a monitoring tool like Azure Monitor or Application Insights is what enables an automatic rollback here — the gate evaluates post-deployment health signals, and if smoke tests or health checks fail, it triggers a rollback to the previous stable version without any manual intervention.

⚠ Common exam trap

Test-takers frequently confuse manual approval gates or manual intervention steps with automated rollback, failing to recognize that only a deployment gate with a monitoring tool can provide the continuous health evaluation and automatic rollback required for a fully automated recovery process.

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

Use a deployment gate with a monitoring tool that automatically initiates a rollback if health check fails.

Azure Pipelines supports deployment gates that can integrate with monitoring tools (e.g., Azure Monitor, Application Insights) to evaluate health metrics after deployment. If the gate detects a failure (e.g., a smoke test health check fails), it can automatically trigger a rollback to the previous stable version, ensuring zero manual intervention and faster recovery.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Define an approval gate that requires manual sign-off after deployment.

    Why it's wrong here

    Approval gates are for pre-deployment, not post-deployment.

  • Use a deployment gate with a monitoring tool that automatically initiates a rollback if health check fails.

    Why this is correct

    Gates can evaluate health and trigger rollback.

  • Set up a manual intervention step in the pipeline to decide rollback.

    Why it's wrong here

    Manual intervention is not automatic.

  • Configure a release variable that toggles between deployment slots.

    Why it's wrong here

    Variables do not automate rollback on failure.

Go deeper

Related to this question

About these practice questions

This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on AZ-400

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. You are using Azure Pipelines to deploy a function app. You need to automatically roll back the deployment if the post-deployment smoke tests fail. What should you do?

easy
  • A.Add a stage that runs only when the previous stage fails, executing a rollback script.
  • B.Configure the pipeline to retry the deployment on failure.
  • C.Use a pre-deployment approval gate to validate the build before deployment.
  • D.Set up a manual validation gate that requires operations to initiate a rollback.

Why A: Azure Pipelines supports conditional stage execution using expressions like `eq(variables['Build.Reason'], 'IndividualCI')` or `failed()`. By adding a stage that runs only when the previous deployment stage fails (e.g., `condition: failed()`), you can execute a rollback script that reverts the function app to its previous stable version. This ensures automatic rollback upon smoke test failure without manual intervention.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft 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 AZ-400 exam.