Contract Versions¶
Use versions to change a contract in reviewed steps. Prepare changes in a draft, preview them against your data, and freeze the draft as the next version. Teams that depend on the contract work against the active version, which stays fixed until the next version is frozen.
How versions work¶
A contract's versions are numbered in order: v1, v2, v3, and so on. Each version is in one of three states.
- draft — The version you edit. A contract has at most one draft, and it is always the highest-numbered version.
- active — The highest frozen version.
- superseded — A frozen version that a later frozen version replaced.
A contract that has never been frozen has only a draft.
View a version¶
- Select Test Suites from the menu.
- On the contract, click View N test definitions .
- Select a version in Version.
The page opens on the version you can edit: the draft, or the active version when there is no draft. Other versions are read-only. On a read-only version, you can filter, export, and run the tests, and view and add notes.
Edit a draft¶
Make your changes on the Quality Rules and Contract Metadata tabs. Every change is saved to the draft.
When there is no draft, your first change creates one as a copy of the active version, and the page switches to it. Importing tests, editing the contract document, and regenerating the contract also create a draft.
Freeze a draft¶
Freeze a draft when its tests are ready to become the active version.
- With the draft selected, click Freeze Version N.
- Optional. Enter a Label for the version.
- Click Freeze Version.
The draft becomes the active version, and the version it replaces becomes superseded. Freezing cannot be undone. If the draft cannot be frozen, the dialog lists the problems to fix in the draft first.
Discard a draft¶
Discard a draft to drop its changes and return to the active version. You cannot discard the draft of a contract that has never been frozen.
Warning
Discarding permanently deletes the draft's tests and changes. This action cannot be undone.
- With the draft selected, click Discard Draft.
- Optional. Click Compare vN with vM to review the draft's changes.
- Select the confirmation checkbox, and click Discard.
Review version history¶
Click History to list every version, newest first, with each frozen version's label. Select a version to see its state, its number of tests, its runs, and, for a frozen version, who froze it and when.
Click Compare to see what changed between two versions. Choose the versions in Compare and with.
- Changes lists the tests added, removed, or changed, and each changed field of the contract document.
- Document shows the two exported documents side by side, with the differences highlighted.
Run a version¶
Each run checks one version of the contract, and a version with no active tests cannot be run. What kind of run it is depends on that version when the run starts.
- Verification — The version is the active version.
- Preview — The version is a draft. A preview stays a preview after its version is frozen.
- Out of force — The version has already been superseded.
Only a verification updates the contract's results: Latest Verification on the Test Definitions page, the latest results on the Project Dashboard and in the Data Catalog, the Testing Score, and test run notifications.
| Started from | Version it runs |
|---|---|
| Run Tests on the Test Definitions page | The version selected in Version |
| Run Tests on the Test Suites or Test Runs page | The active version, or the draft when no version has been frozen |
| A schedule | The active version, or the draft when no version has been frozen |
The Test Runs page lists verifications. To also see previews and out-of-force runs, select Show runs of all versions.