This document describes the versioning system used for Functions. Versions for Function releases are chosen by their publishers and are immutable after creation. Applying appropriate versions is critical to providing consumers of your Functions with a stable and reliable experience.
The versioning system for Functions distinguishes between backward compatible changes and breaking changes. Backward compatible changes are changes that do not disrupt existing consumers of your Functions. A change that is not backward compatible can be referred to as a backward incompatible or a breaking change.
Some examples of backward compatible changes are:
Some examples of breaking changes are:
When considering whether a change to an existing version is backward compatible, ask yourself if the change would cause disruption to or require explicit attention from a consumer of the existing version. Remember that you are ultimately in charge of dictating the expected consumption patterns of your Functions.
Functions are versioned according to the Semantic Versioning ↗ system.
In Semantic Versioning, versions take the form X.Y.Z
where X
, Y
, and Z
—known as the major, minor, and patch versions respectively—are non-negative integers (for instance, 1.2.3
). A version may also include a prerelease identifier comprised of alphanumeric characters by appending a hyphen immediately following the patch version (for example, 1.2.3-rc1
).
This page provides a brief summary of Semantic Versioning; we encourage you to read the full specification ↗ since adhering to the specification is an important aspect of publishing Functions that can be reliably consumed in other applications.
When publishing a new version of a Function, consider the following points from the Semantic Versioning specification:
0
(0.y.z
) is for initial development. During initial development, the Function may change at any time and your Functions should not be considered stable by consumers.Backward compatibility checks are performed for your Functions before you publish a new version. In particular, you will be warned about any of the following breaking changes:
If these checks fail for any reason, it is recommended that you release a major version, unless you are still in the initial development phase (that is, you are still at major version 0
).
Palantir's built-in checks are not exhaustive of all types of breaking changes (for instance, breaking changes from your internal implementation may not be detected), so it is not safe to release a minor or patch version based solely on a successful outcome from these checks.
The internal Functions data type representation currently lacks sufficient information regarding the optionality of custom type fields. As a result, you may notice that for custom type inputs and outputs, the backward compatibility checks will warn you when removing or adding any fields, including optional fields (such as quantity?: Integer
in Typescript or quantity: Integer = 0
in Python).
We are currently making changes so that going forward you will not be warned when:
Note that you will still receive a warning when:
It is common practice that any breaking changes be made in a minor release and any backward compatible changes be made in a patch release. This is an assumption made by consumers in many development spheres, such as the Node/NPM ecosystem, as demonstrated by their wide use of caret ranges ↗.
As soon as you realize that you’ve released a breaking change, you should correct the problem and restore backward compatibility in a new minor version.
Consider the following example.
myFunction
at version 1.0.0
which takes a single string input.myFunction
and accidentally release this change in a minor version release 1.1.0
.To remediate this, you can revert the breaking change to the signature (that is, remove the new required input you added in 1.1.0
) and release this change in version 1.2.0
.
In the case of Typescript or Python Functions, your Functions may fail or take a few minutes to publish. In either of these cases, the built-in backward compatibility checks will be unable to run. If you want to see the results of these checks before making a new release, you have the following options: