daml/compatibility
mziolekda 90d90ea759
remove scala bindings and ledger-api-client (#18301)
* remove scala bindings from daml-script

* remove bindings-pekko

* clean test-common

* clean rx-java

* clean the rest

* remove ledger and scala-bindings

* format

* correcting from code-review
2024-01-29 17:28:14 +00:00
..
bazel_tools Pb/build daml against canton3 (#18103) 2024-01-17 18:11:24 +01:00
head_sdk Remove ledger api test tool (#18088) 2024-01-10 16:48:12 +00:00
versions fix compat update script (#18270) 2024-01-25 11:50:24 +01:00
.bazelignore Extend compatibility tests to test against HEAD (#5714) 2020-04-24 14:43:35 +02:00
.bazelrc increase bazel memory to 3Gb (#17572) 2023-10-16 10:02:04 +00:00
bazel-haskell-deps.bzl update copyright (#18167) 2024-01-15 20:27:42 +01:00
BUILD Pb/build daml against canton3 (#18103) 2024-01-17 18:11:24 +01:00
build-release-artifacts-windows.ps1 remove create-daml-app (#18173) 2024-01-17 12:33:59 +00:00
build-release-artifacts.sh remove create-daml-app (#18173) 2024-01-17 12:33:59 +00:00
build-ts-libs.sh update copyright (#18167) 2024-01-15 20:27:42 +01:00
deps.bzl update copyright (#18167) 2024-01-15 20:27:42 +01:00
maven_install.json remove scala bindings and ledger-api-client (#18301) 2024-01-29 17:28:14 +00:00
new_cache Supporting version splitting in Daml Assistant and Daml Compiler (#17682) 2023-11-22 14:24:13 +00:00
old_cache Supporting version splitting in Daml Assistant and Daml Compiler (#17682) 2023-11-22 14:24:13 +00:00
README.md remove create-daml-app (#18173) 2024-01-17 12:33:59 +00:00
releases-github-api.json Remove triggers (#18142) 2024-01-12 17:55:05 +01:00
stack-snapshot.yaml update copyright (#18167) 2024-01-15 20:27:42 +01:00
stackage_snapshot_windows.json Fix compat job on Windows (#12711) 2022-02-02 16:34:57 +01:00
stackage_snapshot.json Upgrade to GHC 9.0.2 (#12300) 2022-02-01 11:27:11 +01:00
test-all-installs.sh Pb/build daml against canton3 (#18103) 2024-01-17 18:11:24 +01:00
test-daml-version-and-install.sh update copyright (#18167) 2024-01-15 20:27:42 +01:00
test-windows.ps1 Remove ledger api test tool (#18088) 2024-01-10 16:48:12 +00:00
test.sh update copyright (#18167) 2024-01-15 20:27:42 +01:00
update-versions.sh fix compat update script (#18270) 2024-01-25 11:50:24 +01:00
versions.bzl Pb/build daml against canton3 (#18103) 2024-01-17 18:11:24 +01:00
WORKSPACE remove scala bindings and ledger-api-client (#18301) 2024-01-29 17:28:14 +00:00

This directory contains the infrastructure and test setup for cross-version compatibility testing. We make this a separate Bazel workspace to make it easier to enforce that we only depend on release artifacts.

How to

Before using this, make sure to always run the scripts that build the SDK, namely ./build-release-artifacts.sh and ./build-ts-libs.sh. These should be run every time there is a relevant change you want to be there for this workspace to use.

Any Bazel command can then be used afterwards. ./test.sh are the tests run on CI.

What is currently being tested?

We include the following SDK versions in our tests:

  1. All stable SDK versions.
  2. All snapshots x.y.z-snapshot-* for which there is no stable release x.y.z
  3. HEAD.

Since running all tests can be rather slow, we run them in a daily cron job. On each PR we only include HEAD and the latest stable release.

Data-continuity for Sandbox classic

We have migration tests that work as follows:

  1. Start the oldest Sandbox version and upload a DAR.

  2. Iterate over SDK versions in order. For each version:

    1. Start sandbox of that SDK version.

    2. Run a custom Scala binary that interacts with the ledger to create contracts, exercise choices and query the ACS and the transaction service.

    3. Validates the results. This includes verifying that the transaction streams are the same after the migration and that the ACS is the same + additional test-specific checks.

We have two tests here: One that includes snapshot versions and one that only iterates through stable versions up to HEAD. This ensures that both individual migrations are correct as well as the migrations from one stable version to the next work as a whole.

Backwards-compatibility for Daml Script

We test that the Daml Script runner from a given SDK version can load DARs built against the Daml Script library from an older SDK. We only guarantee backwards compatibility here.

Backwards-compatibility for data-dependencies

We test that we can import DARs built in older SDK versions via data-dependencies. We only test backwards compatibility here.