Conflicts between changeset commits
Summarize
Summary of Conflicts between changeset commits
In ServiceNow, service delivery often involves multiple teams simultaneously making numerous configuration changes. Conflicts can arise when changes overlap or contradict earlier commits by different users. The Change and Deployment Management (CDM) system manages changeset commits and snapshots to detect and block conflicting commits, notifying users to help resolve these conflicts effectively.
Show less
Important: Starting with the Washington D.C. release, DevOps Config is being phased out. It will no longer be activated on new instances but will remain supported for existing ones.
How Conflicts Occur and Handling Them
When committing a changeset, the system checks for conflicts with prior commits. If a conflict is detected, users can either selectively keep some changes or discard all conflicting changes and start a new changeset. To facilitate rework, it is recommended to copy large changes to a text editor before closing a conflicted changeset.
How to Avoid Conflicts
- Keep changesets open only briefly. If research or additional information gathering is required, close the current changeset and start a new one afterward.
- Coordinate editing tasks with coworkers to prevent simultaneous updates to the same configuration items.
Types of Changeset Conflicts
The conflicts generally involve configuration data items (CDIs) and include:
- Conflicting commits: Another user’s commit conflicts with your changes.
- Stale data: The CDI value was changed in another changeset, or the item was removed from collections or deployables in other changesets.
- Data corruption: Items modified incorrectly in the data table, causing references to previous versions or invalid states.
- Changed parent or parent/child relationships: Orphaned items due to parent deletion/renaming or new child items added concurrently.
- Changed references: Items included in collections or deployables in other changesets, preventing deletion.
- Duplicates: Items with the same name already exist, causing conflicts.
- Invalid includes: Components or collections referred to were deleted or renamed in other changesets, or descendants are already included elsewhere.
Understanding these conflict types helps you anticipate and resolve commit issues, ensuring smoother collaboration and consistent configuration management across teams.
Service delivery can include multiple teams working at the same time on config data with potentially hundreds of configuration changes every day. Because changes can be in conflict with earlier changes by a different user, CDM manages commits and snapshots to block commits that conflict. You are notified of changeset conflicts to help you to resolve them.
When a conflict happens
Every time you attempt to commit a changeset, the system determines whether there are conflicts with other earlier commits. If the system reports a conflict, you can choose to attempt to keep some of the changes or discard all conflicted changes and start from a new changeset. For this reason, to ease the task of recreating your work, you might copy-paste larger changes to a text editor before closing a conflicted changeset.
How to avoid conflicts
- Try to keep a changeset open for a brief period. If you need to do research, close the changeset and start a new changeset after you have the information.
- Coordinate your code editing tasks with coworkers. This enables you to avoid updating the same configuration item at the same time.
Types of conflicts
- Stale data in your working changeset
- The value of the item was changed in another changeset.
- The item is no longer included in a collection or deployable in another changeset.
- Data corruption caused by an incorrect change in the data table: The newly added item in your open changeset was modified in the data table to incorrectly refer to a previous version. The item in your open changeset was superseded by a change in the data table. The updated or deleted item in your open changeset was incorrectly modified in the data table to not refer to the previous version.
- Changed parent
- The item is an orphan because its parent was deleted or renamed in another changeset.
- Changed parent/child relationship
- New items were added in another changeset while you made changes to the parent data item.
- Changed references
- The Item was included in a collection or deployable in another changeset.
- The item cannot be deleted because it is included in a collection or deployable in another changeset.
- Duplicate
- An item with the same name already exists.
- Invalid includes
- The component or collection to which the include referred was deleted in another changeset.
- The component or collection to which the include referred was renamed in another changeset.
- A descendent of the component to be included is already included in the collection in another changeset.