Legacy - Denoise your source control commits
Summarize
Summary of Legacy - Denoise your source control commits
ServiceNow Studio’s Source Control feature packages application files as XML payloads for Git repositories. When merging Git branches, users often encounter conflicts in system-generated fields (e.g.,sysupdatedby) within these XML files. These conflicts can create unnecessary noise, complicating the merge process. This feature helps developers denoise commits by excluding certain auto-updated fields from XML payloads, making merges cleaner and easier to manage.
Show less
Important: The legacy version of ServiceNow Studio is being deprecated starting with the Xanadu release and will be hidden on new instances, though still supported. Customers are encouraged to use the current version of ServiceNow Studio for building and editing apps.
Key Features
- Saver Exempt Attribute: Certain system-generated fields are marked with the
saverexemptattribute, preventing them from being written into XML during application packaging. This reduces noise in source control commits. - Fields Excluded from XML: Fields such as
sysupdatedon,sysupdatedby,sysmodcount, and others in system tables are excluded by default, as they are auto-generated and do not require version control tracking. - Loader Exempt Fields: Fields marked with
loaderexempt=trueare always excluded from XML, as they are not loaded into instances and thus irrelevant for source control. - Sysid Handling: The
sysidfield for tables is saved separately in dictionary XML files to avoid regeneration during installation, reducing noise from references to table IDs. - Configurable Tracking Property: Administrators can disable the exclusion of system-generated update fields by setting the property
glide.sourcecontrol.disabletrackingofupdatefieldstoFalse. This causes system-generated values like commit user and commit time to be written to XML, if desired.
Practical Benefits for ServiceNow Customers
- Reduces merge conflicts caused by system-generated data changes in Git branches, streamlining development workflows.
- Makes it easier to identify meaningful user-generated changes by filtering out noise from auto-updated fields.
- Allows customization of source control behavior via system properties, giving admins control over how update fields are handled.
- Supports continued use of legacy Studio during the transition period but encourages migration to the latest Studio for future-proof development.
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.