Deleting a record in DevOps Change Velocity
Cascade record deletion is implemented to delete all dependent lower level DevOps records whenever a parent or higher level DevOps entity is deleted. Confirmation popups ensure that you understand that data will be lost when you delete a record (for example, the record of a tool connection).
For example, when a Plan record is deleted, all dependent Work Item, Plan Version, and many-to-many relation (like App to Plan, and Work Item to Plan Version) records are deleted.
DevOps cascade deletion is implemented for these tables.
- Pipeline, Pipeline Execution, Step, Orchestration Task, Task Execution
- Repository, Commit, Branch, Tag
- Plan, Work item, Plan Version
- DevOps Tool, Artifact Repository, Artifact, Test Summary / Performance test summary
Delete action on a DevOps form
A user with the sn_devops.admin role can delete a DevOps record, but only if it meets the defined ACL criteria.
| Entity | Scripted ACL criteria |
|---|---|
| Pipeline | A Pipeline record can be deleted only if no other pipeline executions from other pipelines are dependent on the artifact versions generated by the pipeline executions of this pipeline. |
| Pipeline Execution | A Pipeline Execution record can be deleted only if no other pipeline executions are dependent on the artifact versions generated by this pipeline execution. |
| Task Execution | A Task Execution record can be deleted if ALL of these conditions are met.
|
| Step | A Step record can be deleted only if there are no orchestration tasks or step executions referencing this step. |
| Orchestration Task | If the orchestration task has a step associated, it can be deleted only if there are no task executions referencing this orchestration task. If the orchestration task does not have a step associated (example Jenkins freestyle job), it can be deleted only if no other pipeline executions are dependent on the artifact versions generated by the task executions of this orchestration task. |
| Repository | A Repository record can be deleted only if none of the commits of this repository are associated to the artifact versions (Artifact Version to Commit table) or task executions (Run Commit table). Therefore, before cleaning up the repository, delete the dependent pipeline entities. |
| Branch | A Branch record can be deleted only if there are no commits associated to it in the Branch To Commit table. |
| Tag | A Tag record cannot be deleted by a sn_devops.admin. |
| Commit | A Commit record can be deleted if ALL of these conditions are met.
|
| Plan | A Plan record can be deleted only if none of the work items of this plan are associated or referenced by any commits. |
| Work Item | A Work Item record can be deleted if ALL of these conditions are met.
|
| Plan Version | A Plan Version record can be deleted only if there are no work items associated to it in the Work Item To Plan Version table. |
| Test Summary / Performance Test Summary | A Test Summary record can be deleted only if it doesn’t have an associated related record (Artifact version/Package/Task Execution) in the Test Summary Relations table. |
| Artifact | An Artifact Record can be deleted only if all the artifact versions belonging to it are deletable. |
| Artifact Repository | An Artifact Repository record can be deleted only if all the artifacts belonging to it are deletable. |
| Artifact Version | An Artifact Version record can be deleted only if it's built by task execution field is empty. |
| Artifact Staged Request | An Artifact Staged Request record can be deleted when it is either an orphaned record, or the state is Processed / Error. |
| Package | A Package record can be deleted if ALL of these conditions are met.
|
| DevOps Tool | A DevOps Tool record cannot be deleted by a sn_devops.admin. |
Build Test Summary Build Test Result Commit Details Event Inbound Event |
These entities cannot be deleted by a sn_devops.admin. |
DevOps record delete cascade
Deleting a record in a parent table cascade deletes all the child records in the hierarchy.
| Parent record being deleted | Cascade deleted child records |
|---|---|
| Pipeline | Step: Orchestration Task Pipeline Execution:
|
| Pipeline Execution | Step Execution Callback Task Execution:
|
| Step | None. A Step record can be deleted only if there are no Orchestration Task or Step Execution records associated to it. |
| Orchestration Task | Task Execution
|
| Repository | Tag Branch: Branch to Commit Commit:
|
| Branch | Branch to Commit |
| Tag | No dependent child records. |
| Commit | Commit Details Branch to Commit Tag |
| Plan | Work Item App to Plan Plan Version: Work Item to Plan Version |
| Work Item | Work Item to Plan Version |
| Plan Version | Work Item to Plan Version |
| Test Summary / Performance Test Summary | Test Summary Relations |
| Artifact | Artifact Version
|
| Artifact Repository | Artifact Artifact Version:
|
| DevOps Tool | Event Inbound Event Test Summary / Performance Test Summary: Test Summary Relations Plan:
Artifact Repository Artifact Artifact Version:
Repository:
Pipeline
|
DevOps record delete cascade exceptions
These records are always deleted in the foreground.
| Parent record being deleted | Cascade deleted child records |
|---|---|
| Artifact Version | These records are deleted along with Artifact Version.
|
| Build Test Summary | These records are deleted along with Build Test Summary. |
| Package | These records are deleted along with Package.
|
Foreground deletion threshold property
Deletion of DevOps records occurs in the foreground (synchronously) by default. Meaning, other UI actions cannot be performed during synchronous deletion. Because the deletion of a parent record can result in the deletion of multiple child records, you can set a threshold value so the remaining records are deleted in the background.
To set the DevOps Cascade delete threshold property, navigate to . Define the total number of records that can be cascade deleted in the foreground, after which the remaining records are deleted in the background. Default is 1000.
DevOps record deletions do not trigger any business rules or workflows.
DevOps record deletion
Cascade delete of a DevOps record triggers multiple confirmation approvals.