Repository navigation
feat(dora): link an incident to its component's deployment - #9413
Merged
Merged
Conversation
ConnectIncidentToDeployment ties every incident to the latest successful production deployment of the whole project before the incident started. In a project with many repositories that is often an unrelated repository that happened to deploy last, so change failure rate and failed deployment recovery time point at the wrong release. When an incident's component matches a CI/CD scope of the project (its name, such as "owner/repo", or its id, case-insensitive), only that scope's production deployments are considered. If the component matches no scope, or that scope has no earlier production deployment, the project-wide lookup is used as before, so no incident loses its deployment and incidents without a component behave exactly as today.
Contributor
Author
|
@klesh Thanks for the review. Docs update is up: apache/devlake-website#840 It covers the webhook plugin page (how incidents relate to deployments, and the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ConnectIncidentToDeploymentties every incident to the latest successful production deployment of the whole project before the incident started. In a project with many repositories, that is often an unrelated repository that happened to deploy last, so change failure rate and the project's incident-to-deployment links point at the wrong release.This PR uses the incident's
componentwhen it matches a CI/CD scope of the project, by the scope's name (such asowner/repo) or its id, case-insensitive. Only that scope's production deployments are then considered. If the component matches no scope, or that scope has no earlier production deployment, the project-wide lookup runs as before. So incidents without a component, or with a component that is not a repository (a Jira component, for example), behave exactly as today.A webhook incident can set
componentalready, so no API change is needed: a team that knows which repository caused an incident sends it ascomponentand the incident lands on that repository's release.Does this close any open issues?
No open issue. Found on a multi-repository project: an incident caused by one service's release was tied to another service's deploy a few minutes later.
Screenshots
Not applicable (subtask logic and a test).
Other Information
Tested:
TestConnectIncidentToDeploymentByComponentDataFlowcovers a match by scope name, by name in another case, by scope id, an unknown component, no component, a scope whose latest deployment is older than the project's, and a scope with no deployment before the incident (falls back to the project-wide lookup). The existingTestConnectIncidentToDeploymentDataFlowis unchanged and passes.plugins/doratests pass on MySQL 8.4 and PostgreSQL 18.Suggested label:
pr-type/feature-development.