Snapshots and Patches


What is a snapshot?

Solano CI caches a copy of a repo to accelerate the build start-up process. The exact process by which a cached copy is generated depends upon the SCM in question. For instance, with git, Solano CI will store a bare mirrior clone of the repo. Solano CI will attempt to use this cache to speed up the checking out of a repo before a build begins. If the cache can not be used, the cached copy will be discarded and the system will attempt to clone the repo from upstream.

Why are snapshots used?

Snapshots are used to improve repo checkout performance. They are also used in cases where Solano does not know the repo’s upstream, or if an upstream has not been set up yet. If a build is initiated from the command line, there may not be an upstream at an SCM hosting provider or the user may not register one with Solano CI.

When are snapshots created

Normally a snapshot is created after a build has run. Solano CI will automatically refresh snapshots from upstream as needed.

Creating snapshots locally

You can force the creation of a snapshot by checking out the desired branch and running solano run with the --force_snapshot flag.


This can be slow as it requires the creation of the snapshot locally followed by the the uploading of the snapshot.


What is a patch?

A patch is a diff a repo’s state between two different commits. The Solano CLI will attempt to create a patch for any local changes needed to run a build.

Why are patches used?

The Solano CLI uses patches to run builds on changes that do not yet exist upstream.

When are patches created?

Patches are created as needed after a user runs solano run to start a build. Solano CI will create a patch if there are local changes not present upstream.

Issues with patches

The easist way to avoid issues with patches is to check code into the upstream; doing so avoids the need for a patch altogether. Patch creation becomes less reliable as local changes accumulate, causing divergence from the cached copy of the repo. If patches are failing to apply or create, you can create a repo snapshot based on your current branch. To create a snapshot based on your local branch add the --force_snapshot flag. The CLI will attempt to do this automatically if it runs into trouble with patch creation.