Denoise your source control commits
Summarize
Summary of Denoise your source control commits
The Denoise feature in ServiceNow's Studio allows developers to merge Git branches while minimizing unwanted changes caused by system-generated fields during application development. This helps streamline the process of resolving conflicts in XML files that are exported to Git repositories.
Show less
Key Features
- Saver Exempt Attribute: Automatically excludes certain system-generated fields from being included in the XML representation during Git commits, reducing noise and simplifying conflict resolution.
- Default Exclusions: Fields such as
sysupdatedon,sysupdatedby, and others are set to be exempt by default as they are auto-generated. - Admin Control: Administrators can disable the tracking of update fields by changing the
glide.sourcecontrol.disabletrackingofupdatefieldsproperty, allowing for customization of field visibility during commits.
Key Outcomes
By utilizing the Denoise feature, ServiceNow customers can expect clearer Git commit histories with reduced conflicts, allowing for more efficient application development workflows. This results in improved collaboration among developers, as the noise from system-generated fields is minimized, leading to a focus on user-generated changes.
As a source control developer, you can merge the Git branches, without getting noise from the fields that are auto-updated by the system.
Overview
In Studio, the Source Control feature packages application files as XML payloads, when they are exported to Git repositories. When a user merges Git branches in a Git repository as part of the application development workflow, the user must resolve any conflicts in the XML files. These conflicts are typically in the fields that are system generated, like sys_updated_by, and represent non-user generated changes. The user must be careful when they are resolving conflicts in these fields because this process might create more noise.
Saver Exempt attribute
Features have been added in Source Control to de-noise the XML payloads, to assist the user in resolving the conflicts when the Git branches are merged.
By default, the system sets the saver_exempt attribute for certain fields in tables whose values are auto-generated by the system. For more information on the saver_exempt attribute, see Dictionary attributes.
The following table contains the saver_exempt values.
| Fields | System Tables | saver_exempt values | Outcome expected |
|---|---|---|---|
|
|
exempt_vcs_only | The fields are not written to the corresponding XML representation of a record for the table during the packaging of the application for Git commits. |
| Sys_id |
|
exempt_vcs_only | The sys_id field is not written in the XML representation of the record of three tables during the packaging of the application for Git commits. |
| Fields with loader_exempt=true | exempt_always | The fields that have loader_exempt set to True are not loaded in the instance. They are not written to the XML representation of the records in the tables during the packaging of the application for Git commits |
Disabling the tracking property
An admin can disable the
glide.source_control.disable_tracking_of_update_fields so that the fields do
not display user-generated values.
glide.source_control.disable_tracking_of_update_fields to
False.The following fields are the system-generated values that the admin sees:
- sys_updated_by = commit user
- sys_updated_on = commit time
- sys_mod_count = zero
sys_id fields for tables
The sys_id field for tables are saved in the corresponding “dictionary/<tablename>.xml” so that they are not regenerated during the installation in the instance, other than when tables are created. The result is that the noise is reduced from all the XML files that reference the sys_id of the table or represent the sys_db_object record for this table.