Deleting a record in DevOps Change Velocity

  • Release version: Washingtondc
  • Updated August 1, 2024
  • 6 minutes to read
  • 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.

    Note:
    To see the Delete button on a form, you must have the sn_devops.admin role, and the current record must meet the criteria defined in the scripted ACL.
    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.
    • There are no step executions referencing it.
    • There are no downstream task executions referencing it.
    • There are no pipeline executions dependent on the artifact versions built by this task execution.
    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.
    • The commit is not associated to the artifact version (Artifact Version to Commit table).
    • The commit is not associated to task executions (Run Commit table).
    • The commit is not being referenced by other commits as a revert commit.
    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.
    • The work item is not being referenced by another work item as parent.
    • There are no commits referencing or associated to this work item.
    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.
    • There are no pipeline executions referenced to it.
    • The built by task execution value on the Package record is null.
    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:
    • Step Execution
    • Callback
    • Task Execution
      • Package
      • Run Commit
      • Test Summary Relations
      • Build Test Summary: Build Test Result
      • Artifact Version
        • Artifact Staged Request
        • Artifact Version To Commit
        • Artifact Version To Package
    Pipeline Execution

    Step Execution

    Callback

    Task Execution:
    • Package
    • Run Commit
    • Test Summary Relations
    • Build Test Summary: Build Test Result
    • Artifact Version
      • Artifact Staged Request
      • Artifact Version To Commit
      • Artifact Version To Package
    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
    • Package
    • Run Commit
    • Test Summary Relations
    • Build Test Summary: Build Test Result
    • Artifact Version
      • Artifact Staged Request
      • Artifact Version to Commit
      • Artifact Version to Package
    Repository

    Tag

    Branch: Branch to Commit

    Commit:
    • Commit Details
    • Branch to Commit
    • Tag
    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 Staged Request
    • Artifact Version to Commit
    • Artifact Version to Package
    Artifact Repository

    Artifact

    Artifact Version:
    • Artifact Staged Request
    • Artifact Version to Commit
    • Artifact Version to Package
    DevOps Tool

    Event

    Inbound Event

    Test Summary / Performance Test Summary: Test Summary Relations

    Plan:
    • Work Item
    • App to Plan
    • Plan Version: Work Item to Plan Version

    Artifact Repository

    Artifact

    Artifact Version:
    • Artifact Staged Request
    • Artifact Version to Commit
    • Artifact Version to Package
    Repository:
    • Tag
    • Branch: Branch to Commit
    • Commit
      • Commit Details
      • Branch to Commit
      • Tag
    Pipeline
    • Step: Orchestration Task

    • Pipeline Execution
      • Step Execution
      • Callback
      • Task Execution
        • Package
        • Run Commit
        • Test Summary Relations
        • Build Test Summary: Build Test Result
        • Artifact Version
          • Artifact Staged Request
          • Artifact Version To Commit
          • Artifact Version To Package

    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.
    • Artifact Staged Request
    • Artifact Version To Commit
    • Artifact Version to Package
    Build Test Summary

    These records are deleted along with Build Test Summary.

    Package
    These records are deleted along with Package.
    • Artifact Staged Request
    • Artifact Version to 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.

    Note:
    Artifact Version, Build Test Summary, and Package records are always deleted in the foreground.

    To set the DevOps Cascade delete threshold property, navigate to DevOps > Administration > Properties. 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.

    Note:
    The records of tables in a hierarchy are deleted in a bottom-up manner. For example, it might be possible that even after triggering the delete action on a Repository record, it will still be available for read, write, and update in the system until deletion is complete.

    DevOps record deletions do not trigger any business rules or workflows.

    DevOps record deletion UI

    Cascade delete of a DevOps record triggers multiple confirmation approvals.

    DevOps delete record

    DevOps delete record warning

    DevOps delete record cascade