Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rollback detection docs | SDCD-952 #28215

Merged
merged 5 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/_default/menus/main.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4511,6 +4511,11 @@ menu:
identifier: cd_features_code_changes_detection
parent: cd_features
weight: 301
- name: Rollback Detection
url: continuous_delivery/features/rollbacks_detection
identifier: cd_features_rollbacks_detection
parent: cd_features
weight: 302
- name: Test Optimization
url: tests/
pre: ci
Expand Down
1 change: 1 addition & 0 deletions content/en/continuous_delivery/features/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ CD Visibility collects deployment events so that Datadog can identify key metric

{{< whatsnext desc="" >}}
{{< nextlink href="/continuous_delivery/features/code_changes_detection" >}}Detect code changes between deployments{{< /nextlink >}}
{{< nextlink href="/continuous_delivery/features/rollbacks_detection" >}}Automatically detect rollbacks{{< /nextlink >}}
{{< /whatsnext >}}
56 changes: 56 additions & 0 deletions content/en/continuous_delivery/features/rollbacks_detection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: Rollback Detection
description: Learn how CD Visibility detects deployment rollbacks.
further_reading:
- link: "/continuous_delivery/deployments/"
tag: "Documentation"
text: "Learn about Deployment Visibility"
- link: "/continuous_delivery/explorer"
tag: "Documentation"
text: "Learn how to query and visualize deployments"
---

{{< site-region region="gov" >}}
<div class="alert alert-warning">CD Visibility is not available in the selected site ({{< region-param key="dd_site_name" >}}) at this time.</div>
{{< /site-region >}}

{{< callout url="https://docs.google.com/forms/d/e/1FAIpQLScNhFEUOndGHwBennvUp6-XoA9luTc27XBwtSgXhycBVFM9yA/viewform?usp=sf_link" btn_hidden="false" header="Join the Preview!" >}}
CD Visibility is in Preview. If you're interested in this feature, complete the form to request access.
{{< /callout >}}

## Overview

Knowing when specific deployments are performing a rollback is useful to:
- Understand deployment stability and the frequency of rollbacks across your services.
- Identify patterns in deployment issues that lead to rollbacks.

To detect rollbacks, Datadog compares the current deployment version with the previous versions deployed for the same service and environment. A rollback is identified when both of the following occur:
- The current version is different from the previous version. This ensures that redeploying the same version does not constitute a rollback.
- The current version matches a version that was previously deployed.

You can search for rollback deployments in [Deployment Executions][1], using the `@deployment.is_rollback` tag:

{{< img src="continuous_delivery/features/rollbacks-deployment-executions.png" alt="Rollback indicator in Deployment Executions page" style="width:100%;">}}

You can also see more detailed information in the event detail:

{{< img src="continuous_delivery/features/rollbacks-detail.png" alt="Rollback detail" style="width:100%;">}}

## Requirements

Rollback detection works for deployments that have all of the following:
- A service (`@deployment.service`)
- An environment (`@deployment.env`)
- A version identifier (`@deployment.version`)

### Version for CI-based providers
For CI-based providers, Datadog uses the `--revision` parameter that you pass to the `datadog ci` command. This parameter should contain the version identifier for your deployment (such as a commit SHA, image tag, or version number).

### Version for Argo CD
For Argo CD deployments, Datadog uses the `revision` value to detect rollbacks. Note that when using Argo CD's revert functionality, a new revision is created, which means Datadog won't detect it as a rollback. To properly track rollbacks in Datadog with Argo CD, you need to redeploy using an older revision.

## Further Reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: https://app.datadoghq.com/ci/deployments/executions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading