Legacy - Using MID Server with source control
Summarize
Summary of Legacy - Using MID Server with source control
The ServiceNow® MID Server facilitates secure communication and data transfer between a ServiceNow instance and external systems. In the context of source control, it enables the packaging and transmission of application repositories via bundle files, streamlining integration with remote repositories.
Show less
Note that starting with the Xanadu release, the legacy ServiceNow Studio is being phased out and hidden on new instances, though still supported. Customers are encouraged to transition to the current version of ServiceNow Studio for application building and editing.
How bundle files work with MID Server
- .bundle files package local Git repositories into single files, simplifying sharing and transfer to the MID Server, which then forwards them to remote repositories.
- There are two types of bundle files:
- outgoing.bundle – created on the ServiceNow instance during commit operations;
- incoming.bundle – created on the MID Server when applying remote changes.
- Both bundle types are stored as attachments in the eccagentattachment table for requests involving the MID Server.
- After successful operations, the bundle file is promoted to a golden.bundle, attached to the sysrepoconfig table. This golden.bundle initializes repositories on nodes without prior source control operations.
- The Auto Flush tool regularly cleans up old bundle attachments (older than 30 days) from the system, maintaining storage efficiency.
- Bundle files reside temporarily in the MID Server’s Import directory (configurable via the system property user.dir) and are removed after each operation completes.
Working with the MID Server
- Source control operations using the MID Server may take longer for large applications because the entire app is bundled after export, with processing time dependent on app size.
- To prevent conflicts, especially with Discovery processes, it is recommended to create files within the sysattachment table, and understand system property restrictions related to attachments.
This information helps ServiceNow customers effectively manage source control operations involving MID Servers, enabling smoother integration with external Git repositories while maintaining system health through automated cleanup and configuration options.
The ServiceNow® MID Server enables communication and the movement of data between a ServiceNow instance and external applications, data sources, and services.
Try building and editing apps in the current version of ServiceNow Studio instead. For more information, see Building applications with ServiceNow Studio.
How bundle files work with MID Server
The .bundle file helps source control function with a MID Server. A bundle file is the way Git packages a local repository in a single file. This makes sharing or moving the repository simpler and more streamlined. The file is then sent to the MID Server, which passes it on to the remote repository.
The outgoing.bundle (commit operations) and incoming.bundle
(apply remote changes) are attached to the MID Server attachment table [ecc_agent_attachment]
for any request that goes to the MID Server. The outgoing.bundle is created on
the instance while the incoming.bundle is created on the MID Server.
After an operation completes successfully, the bundle file is “promoted” into a
golden.bundle that is attached to the Repository configuration table
[sys_repo_config]. It’s used to initialize the repository on a node that has not performed any
Source Control operations yet.
The Auto Flush tool [sys_auto_flush] is a "table cleaner" that removes any
ecc_agent_attachment record older than 30 days. This action removes the
corresponding attachment as well.
The bundle files are kept on the MID Server and then saved to the Import directory on the MID Server.
On the MID Server, the bundle file is saved in the Import folder. This folder is under the user directory defined by the system property (user.dir), which users can configure. The bundle file is removed as part of the system flushing at the end of every operation.
Working with the MID Server
- Avoid conflicts with Discovery and create files for the system attachment [sys_attachment] table: MID Server
- Learn about system properties restrictions: Configure attachment system properties