Migrate (v12 to v13)
This guide has been written for developers with existing VIKTOR application(s) on v12 who want to upgrade to v13. It provides a general overview of the necessary actions and links to relevant documents for more information.
Breaking changes
VIKTOR uses semantic versioning, which means that a major version upgrade (such as v12 -> v13) contains backwards incompatible (breaking) changes: you might need to make changes in your app code to ensure that it functions as expected after the upgrade.
Under Removed in v13 we have listed all the changes:
- a description of the change
- reason for the change
- necessary steps to update your code
For some upgrades we provide an automated code fix which helps you in applying the necessary steps, e.g.:
viktor-cli fix -u ID
Upgrade steps
Steps to upgrade:
- Upgrade to the latest v12 version. This is backwards compatible, so you can change the version number and run your app without any changes needed.
- Check the upgrade list below and update your app code accordingly.
- As a check: run your code + run your tests. It should not emit any deprecation warnings introduced by the SDK.
- Change the version to 13.0.0. This is backwards incompatible, but you have already implemented the necessary changes, so you're ready to go.
- Flags that were added to resolve v12 deprecations can automatically be removed by using
viktor-cli fix -u 76
The absence of deprecation warnings when running your app does not mean that all updates have been applied correctly, so make sure to check the list. You might not cover all your code when testing (warning is not triggered) and sometimes we cannot raise the warning at all
On average, we expect this upgrade to take less than 2 hours per app. It depends on the size of the app and how many
open updates need to be applied. In case you are experiencing difficulties upgrading, either manually or using the
provided fix
command, please contact VIKTOR.
The table below shows an overview of the upgrades introduced in v12 and the estimated duration to fix:
ID | Deprecation | Upgrade duration | deprecated since | codemod available |
---|---|---|---|---|
75 | Remove name and filename from params | 15 minutes | SDK v12.12.0 | partly |
74 | Store table OptionField value in params | 15 minutes | SDK v12.12.0 | partly |
73 | GeometryResult visualization_group renamed to geometry | 5 minutes | SDK v12.12.0 | yes |
72 | Removed viktor.api module | 30-60 minutes | SDK v12.11.0 | no |
71 | Workspace background image moved from manifest to interface | 5 minutes | Connector v5.11.1 | yes |
70 | Removed Polyline.from_dict() | 5 minutes | SDK v12.10.0 | no |
69 | Autoselect single option in OptionField | 5 minutes | SDK v12.10.0 | yes |
68 | Remove require_all_fields on buttons | 5 minutes | SDK v12.9.0 | yes |
67 | GEOLIB hosting by VIKTOR will be terminated | 5 minutes | Connector v5.9.2 | yes |
66 | NumberField.Variant replaced with str-type | 5 minutes | SDK v12.8.0 | yes |
65 | Entity selection fields return Entity object | 15 minutes | SDK v12.8.0 | partly |
64 | Replace PrivilegedAPI by explicit privileged flag | 15 minutes | SDK v12.6.0 | no |
63 | Remove prefix and suffix on DateField | 5 minutes | SDK v12.5.0 | no |
62 | Renamed threejs_visualisation() to visualize_geometry() | 5 minutes | SDK v12.5.0 | yes |
61 | Move entity-type information from manifest to Controller | 5 minutes | SDK v12.3.0 | yes |