Skip to content

Conversation

@agarwal-navin
Copy link
Contributor

Currently, in the end-to-end tests, we only install and use the latest version of the shared tree package. So, irrespective of the compatibility mode that the test runs in, it doesn't really test any compaibility for shared tree.
In this change, I added the support to actually run shared tree tests in different compatibility mode. I also added a simple tree test that will run in full compat mode.

The details on the changes:

  • Added logic to install @fluidframework/tree package In test-version-utils and expose it via DataRuntimeApi. This package was exported starting in version 2.0.0, so I added a workaround to install the latest version when the compat version if < 2.0.0. This means that in cross-client compat mode where one of the versions is < 2.0.0, the test won't really be testing compatibility. This is acceptable because we don't expect collaboration between these tree versions.
    An alternative approach could be to not install the tree package in these scenarios and let the tests skip running in these scenarios. This way, tests don't accidentally assume that the scenario with a version < 2.0.0 is actually supported. However, that turns out to be complicated because the test infra assumes all packages to be installed. It is possible to change the test infra but I don't think it's worth doing that.
  • Removed a workaround in the createGetDataStoreFactoryFunction function that was added because the @fluidframework/tree package was not installed by the test infra.
  • The tree test creates a container, creates a view for a tree with a simple schema and initializes it. A second container is loaded which validates that the changes to the tree are reflected. This test should provide with cross-client compat coverage when one of the clients is older than current version and >= 2.0.0.
    The test skips running in the mdoe when one of the clients is supposed to be < 2.0.0. It does this because 1/ as described above, in this case, latest version of tree is used and 2/ id compressor is not supported by the runtime in < 2.0.0 and tree requires this.

@github-actions github-actions bot added area: tests Tests to add, test infrastructure improvements, etc dependencies Pull requests that update a dependency file labels Nov 24, 2025
@github-actions github-actions bot added the base: main PRs targeted against main branch label Nov 24, 2025
Comment on lines +79 to +80
versionForLoading !== undefined &&
(lt(version, "2.0.0") || lt(versionForLoading, "2.0.0"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not skip when versionForLoading === undefined even if lt(version, "2.0.0") === true.
Is that intentional? What happens when the test runs in that configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants