Versioning operations#

Warning

Not available in Factory Lite license.

In this page all the versioning operations of primary resources are described.

Note

To fully understand the content of this page a standard terminology of Git versioning is needed. The concepts of repository, branch, commit, tag, push and pull operation are not explained here. For more information about Git versioning please refer to: this standard guide.

The possible versioning operations are:


Add Resource#

The Add <primary resource> operation adds the resource to the version control system.

To version your primary resource, click on the Add icon in the toolbar, if the resource is already opened, otherwise perform the operation from the resource context menu in the Explorer menu. A tick sign is then added to the versioned resource in the resource list in the Explorer menu.

When you make and commit changes to the resource, this icon becomes an asterisk, indicating that the local and the remote versions of the resource are no longer aligned, so pushing the changes is required to align local and server versions.

Once the primary resource has been added to version control, the hash name is provided. Make sure you copy and save it, as you may need it if someone wants to clone the primary resource, and helps you to locate the primary resource in the repo.


Clone Resource#

The operation of Clone <primary resource> clones in the selected environment of a resource which has already been versioned.

To clone an existing versioned resource, select an environment and click the Clone icon in its context menu, then enter the hash name of the versioned resource and a new name for the copied resource. The hash name of the versioned resource is provided once the resource has been added to version control and can be retrieved at any time with the Info command. Make sure you have it.


Merge Resource#

The operation of Merge <primary resource> merges two different branches into a single one.

The information you need to provide is a hash name for a versioned resource, and optionally a tag name (assume to get the latest commit without it).

However, the merge operation has different applications in these two use cases:

  1. The operation is performed by selecting Merge <primary resource> from an environment. A new versioned resource is created aligned with the branch given at the selected tag point (the latest if no tag entry is provided). Since a new resource has been created, a name for the new created resource is also required.

  2. The operation is performed by selecting Merge from an already versioned resource context menu. In this case a real merge operation between the inserted branch and the branch contained the selected versioned resource is performed. If some conflicts occur, a policy request will be made to the user. The possible Resolution policies are:

    • Default - ours (variables) + theirs (all the rest) - solves any merge conflict by using the resource variables present in the current resource, and taking all other conflicting elements from the flow you have selected with the branch hash.

    • Local first - ours (everything) - solves any merge conflict by taking all conflicting elements from the current flow.

    • Remote first - theirs (everything) - solves any merge conflict by taking all conflicting elements from the flow you have selected with the branch hash.


Info Resource#

The operation of Info <primary resource> simply returns the unique hash name associated to the selected versioned resource.

It is necessary to retrieve the crucial information required for the Merge and Clone operations.


Pull Resource#

The operation of Pull <primary resource> retrieves the latest version of the versioned resource from the version control system, merging it with the local changes.

If some conflicts occur a warning message is displayed, allowing you to decide how to continue by selecting a Resolution Policy. The possible Resolution policies are:

  • Default - ours (variables) + theirs (all the rest) - solves any merge conflicts by using the resource variables present in the current resource, and taking all other conflicting elements from the flow you have selected with the branch hash.

  • Local first - ours (everything) - solves any merge conflict by taking all conflicting elements from the current flow.

  • Remote first - theirs (everything) - solves any merge conflict by taking all conflicting elements from the flow you have selected with the branch hash.


Push Resource#

The operation of Push <primary resource> aligns the remote version of the resource present on the repository with the local one.

To update the remote version a preceding Pull operation is needed, and it is performed under the hood. For this reason even Push operations can lead to conflicts and to modification of the local resource version.

If some conflicts occur, a warning message is displayed, allowing you to decide how to continue by selecting a Resolution Policy. The possible Resolution policies are:

  • Default - ours (variables) + theirs (all the rest) - solves any merge conflicts by using the resource variables present in the current resource, and taking all other conflicting elements from the flow you have selected with the branch hash.

  • Local first - ours (everything) - solves any merge conflict by taking all conflicting elements from the current flow.

  • Remote first - theirs (everything) - solves any merge conflict by taking all conflicting elements from the flow you have selected with the branch hash.


Log Resource#

The operation of Log <primary resource> retrieves a list of all the commit operations performed on the current flow, together with any corresponding tags.

Information is displayed in a separated window as in the image below.

https://cdn.rulex.ai/docs/Factory/versioning_log.webp

Revert Resource#

The operation of Revert <primary resource> reverts the local resource to a previous version of the same one. The previous version is selected by clicking it from the Log panel presented in the image above.

Warning

The revert is only performed on the local resource. After the operation the status of the resource shows an asterisk, meaning that the local and the remote versions are no longer aligned. Perform a Push operation to revert also the version of the resource on the repository.


Tag Resource#

The operation of Tag <primary resource> assigns a label to a particular commit in versioned resource history. This label allows the user to identify important parts of the history or stable versions.

Tags are used in Merge operations, Import from Repository operations and Revert operations to identify immediately important status in your version history.


Update Repository#

The operation of Update repository allows the user to change the Repository connection saved inside a versioned resource.

This operation can be useful for example if the repository password has expired and the connection needs to be renewed.

Note

If you have used a Repository resource to define the connection, you need to have modify permission set to allow to update the connection.

Information about configuration option of Repository connection can be found in this configuration page.


Importing from Repository#

The operation of Import <primary resource> can be performed to import the primary resource not only from an external file but also directly from a versioned version present on a repository.

Prerequisites

  • you need the hash name of the versioned resource you want to import.

  • you need to insert optionally a tag name, if you do not want to import the latest version of the resource.

  • you need to navigated to the correct environment where you want to create the new resource.

Procedure

  1. Click the Explore resources icon to open the Explorer panel.

  2. Hover over the Plus icon.

  3. Select Import <primary resource>; a dedicated import panel opens.

  4. Select from the radio button in the upper part of the panel: Repository.

  5. From the SOURCE slider, select whether the Repository is in a previously Saved resource, or you want to define it here (Custom). If the source is Custom fill the dedicated panel (opened by clicking on the pencil icon button) following the repository configuration guide.

  6. Insert the hash name of the versioned resource to be imported.

  7. Optionally insert the tag name, if you do not want to import the latest version.

  8. Click Import to complete the import operation.

The imported resource is NOT versioned differently from the Merge operation. This allows you to import a particular version of the remote resource to be used as starting template or production grade state in subsequent analysis.