Legacy - Using MID Server with source control

  • Release version: Xanadu
  • Updated August 1, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    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 full answer 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.

    Important:
    Starting with the Xanadu release, the legacy version of ServiceNow Studio is being prepared for future deprecation. It will be hidden and no longer activated on new instances but will continue to be supported. For details on the deprecation process, see the Deprecation Process [KB0867184] article in the Now Support Knowledge Base.

    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

    Note:
    Source control operations can take more time for larger applications when using an MID server, as the entire app is bundled after an export and is dependant on the size of the app.