PCSM. Add cross version test#562
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds cross-version MongoDB test support by separating source and destination MongoDB images and updating data integrity checks to avoid dbHash false positives for capped collections.
Changes:
- Adds
mongodb-srcandmongodb-dstcompose services with per-side image overrides. - Updates test fixtures/examples to pass explicit source or destination MongoDB images.
- Adds record-by-record capped collection comparison and excludes capped collections from
dbHash.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pcsm-pytest/docker-compose.yaml |
Defines separate source/destination MongoDB build targets. |
pcsm-pytest/readme.md |
Documents cross-version image configuration. |
pcsm-pytest/data_integrity_check.py |
Adds capped collection comparison and filters capped collections from dbHash. |
pcsm-pytest/conftest.py |
Uses source/destination MongoDB images in shared fixtures. |
pcsm-pytest/test_arguments_and_env_vars.py |
Uses explicit MongoDB images in cluster fixtures. |
pcsm-pytest/test_connection_rs.py |
Uses explicit MongoDB images for replica set tests. |
pcsm-pytest/test_connection_shard.py |
Uses explicit MongoDB images for sharded tests. |
pcsm-pytest/test_failcommands_rs.py |
Uses explicit MongoDB images for failcommand tests. |
pcsm-pytest/test_load_rs.py |
Uses explicit MongoDB images for load test clusters. |
pcsm-pytest/example_cluster.py |
Updates example cluster image selection. |
pcsm-pytest/example_rs.py |
Updates replica set example image selection. |
pcsm-pytest/example_shard.py |
Updates sharded example image selection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
olexandr-havryliak
approved these changes
May 28, 2026
365e301 to
7342196
Compare
7342196 to
d395ed5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for running tests with different MongoDB versions for source and target clusters, enabling cross-version replication and data integrity testing. The changes include updates to the Docker Compose setup, test cluster instantiation, and significant improvements to the data integrity check logic, especially for capped collections.
Key changes:
Cross-version cluster support and Docker Compose updates:
mongodbservice indocker-compose.yamlintomongodb-srcandmongodb-dst, allowing independent builds and images for source and destination clusters. Environment variablesMONGODB_SRC_IMAGEandMONGODB_DST_IMAGEare now supported for per-cluster version selection.readme.mdto explain how to configure and run tests with different MongoDB versions for source and target.Test and fixture updates for explicit image selection:
Clusterobjects) in test files and fixtures now explicitly set themongo_imageparameter to eithermongodb-src/localormongodb-dst/local, ensuring correct image usage throughout the test suite.Data integrity check improvements:
compare_capped_collections), addressing issues wheredbHashis not portable across MongoDB versions or clusters due to natural order hashing. This ensures capped collections are validated for correctness regardless of version differences.These changes collectively enable reliable cross-version testing and more accurate data integrity validation, especially for capped collections, across independently configured MongoDB source and target clusters.