Every save makes a new version, and a saved version never changes. Version numbers follow semantic versioning, and the platform proposes the number from what you changed, so a workflow can safely follow your fixes without picking up a change that would break it.
Make a new version
- Open the algorithm from Algorithms (Owner → Team) and choose Edit. The editor opens on the saved code, marked "New version from 1.0.0".
- Change the code or the panels and run a test.
- In Version, read Suggested and What changed, for example "Minor change" with the list of changes. Version to save can be raised, never lowered.
- Choose Save version. If nothing changed, Save version is off and the line under it says "No changes since 1.0.0. Change the code to save a new version."
How the number is chosen
| What you changed | Bump | Example |
|---|---|---|
| The category, the inputs or outputs, the level, Runs when, the declared features, labels or check ids, or a parameter removed or retyped | Major | 1.2.0 → 2.0.0 |
| A parameter added, a default, limit or title changed, a check title, Resources or Requirements | Minor | 1.2.0 → 1.3.0 |
| Only the code, the title or the description | Patch | 1.2.0 → 1.2.1 |
Saving an interface change as a minor version is refused with ALGORITHM_INTERFACE_CHANGED.
Which version a workflow runs
A workflow step names an algorithm by its major version, for example team/motion-energy@1. Each run uses the newest saved version of that major at the moment it starts, and keeps it for the whole run. So:
- A patch or minor version reaches every workflow on that major at its next run. Test before you save.
- A major version reaches no workflow by itself. To use it, edit the workflow, point the step at
@2, test and publish. - Runs that already finished keep the results of the version they ran. Reprocess recordings to get results from the new version.
Undo a bad version
A saved version can't be edited or deleted. To go back, save the previous code as the next version: open the algorithm, choose Edit, paste the earlier code and save. From the terminal, fetch the earlier version and save it again:
ef algorithm pull motion-energy@1.0.0 motion-energy-1.0.0
ef algorithm save motion-energy-1.0.0The new version, for example 1.1.1, holds the old code, and workflows on @1 run it from their next run.
See what uses an algorithm
The algorithm's page lists its Versions, newest first, and Used in workflows, the workflows that refer to it. Check that list before you save a change.
- What the algorithm reads.
- Its parameters: adding one is a minor version.
- Its saved versions, the newest first.
Archive or delete an algorithm
A team algorithm's name is permanent and a saved version never changes, but you can clear away algorithms you no longer want. On the algorithm's page open Algorithm actions (the … button) and choose:
- Archive: the algorithm leaves Algorithms and the step library, so no new step can take it. Workflows that already use it keep running, its versions and results stay, and a banner on its page has Unarchive. Archived algorithms are under the Status filter. You can't save a new version of an archived algorithm until you unarchive it.
- Delete: removes the algorithm, all its versions and their build records, and frees its name. Images already pushed to your team's registry and the build logs stay. It works only when nothing uses it. If a workflow revision names it, a run used one of its versions, or a data format converts with one, the page lists what uses it, the API answers
ALGORITHM_IN_USEand the dialog offers Archive instead.
Both need the algorithm:write permission. From the terminal:
ef algorithm archive motion-energy
ef algorithm list --archived
ef algorithm unarchive motion-energy
ef algorithm delete motion-energy