Legacy - Denoise your source control commits
As a source control developer, you can merge the Git branches, without getting noise from the fields that are auto-updated by the system.
Try building and editing apps in the current version of ServiceNow Studio instead. For more information, see Building applications with ServiceNow Studio.
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.