Pinned federation backend fixtures¶
Local federation tests use pinned backend binaries to verify interoperability with released Wire Server versions. A pinned fixture must use the service configuration from the same release as its container images. Do not use the current development configuration as the baseline for an older binary.
Choosing the release¶
Before creating a fixture:
- Identify the release in which the federation API version was finalized.
- Treat that finalized release as the stable baseline for the version.
- Record the exact chart tag and image tag used by the fixture.
The tag is the source of truth for the service configuration. Create a temporary worktree at that tag, for example:
Building the fixture¶
Use the tagged service integration configurations as the baseline. The usual inputs are:
Use the configurations for the services that are started by the local federation Compose fixture. Other integration configurations in the release tag are not part of this fixture.
Adapt the tagged configurations for the local Docker environment only:
- container hostnames and ports;
- unique Cassandra keyspaces and database names;
- RabbitMQ vhosts and queue names;
- local AWS-compatible service endpoints;
- local certificate, key, and secret paths;
- federation domains and DNS records;
- Redis topology and connection mode.
Do not add configuration introduced after the selected release merely because it exists in the current development configuration.
Registering the version¶
Update all shared local-test wiring for the new version:
- add the
federation-vN.yamlCompose overlay and its configuration directory; - add the version to
deploy/dockerephemeral/run.sh; - create its RabbitMQ vhost and queues;
- add required DynamoDB, S3, SES, SNS, and SQS resources;
- add DNS SRV records for the new version to every CoreDNS fixture;
- add the backend and RabbitMQ settings to
services/integration.yaml; - add
RABBITMQ_USERNAME_VNandRABBITMQ_PASSWORD_VNto.envrcso local test cleanup can delete queues for the pinned backend; - add the domain and queue cleanup handling to the integration test harness;
- include the version in the parameterized federation tests.
The version should be optional through its ENABLE_FEDERATION_VN environment variable, so tests can run against one pinned version or several versions.
Validation checklist¶
Run the following checks before running the integration tests:
Also verify that the new fixture has no stale identifiers from the source version, all images use the selected release tag, all DNS records and queues are present, and every enabled container becomes healthy.
Finally, run the federation API-version and cross-backend smoke test with only the new version enabled, then run the broader federation use-case tests with the required version combinations.
Starting and testing one pinned version¶
Replace 3 below with the pinned federation version being tested:
After the containers are healthy, run the API-version and cross-backend smoke test:
CI and Kubernetes setup¶
Pinned federation backends used by the Kubernetes integration tests are deployed by the Cailleach repository. Add the new backend to the backend integration-test target in Cailleach:
- add the
wire-federation-vNnamespace and domain locals; - add a
wire_server_federation_vNmodule based ontf-modules/wire-server-with-bells, using the finalized chart version and the configuration required by that release; - configure the pinned backend with the federation test helper, federation CA, dedicated ingress, and any release-specific dependencies;
- add the namespace to the per-version ingress controller map.
See the Cailleach V3 deployment change as a reference implementation.
The wire-server repository must also contain the matching integration setup:
- add
federation-vNandrabbitmq-vNto the integration ConfigMap; - enable
ENABLE_FEDERATION_VNand provide its RabbitMQ credentials; - copy the RabbitMQ secret from the pinned namespace before running tests.
Make the Cailleach change available in the CI environment before opening or updating the wire-server PR. The PR pipeline then starts the test deployment and runs the existing service suites plus the main integration suite against the pinned backends. Verify the pinned namespace, services, certificates, and RabbitMQ secret as part of that pipeline when diagnosing setup failures.