Skip to content

PCSM-201 Add some configurability to local environment scripts#160

Closed
chupe wants to merge 4 commits intomainfrom
pcsm-201
Closed

PCSM-201 Add some configurability to local environment scripts#160
chupe wants to merge 4 commits intomainfrom
pcsm-201

Conversation

@chupe
Copy link
Collaborator

@chupe chupe commented Dec 9, 2025

PCSM-201 Powered by Pull Request Badge

The PR adds infrastructure improvements to support testing PCSM replication from a ReplicaSet source to a Sharded cluster target. This configuration validates that PCSM can replicate collections from RS topology to sharded topology.

  • hack/rs/run.sh: Made replica set count configurable via RS_COUNT environment variable (default: 2, max: 2). Added dynamic service initialization based on count.

  • hack/sh/run.sh: Added support for skipping source or target cluster creation via SRC_SHARDS=0 or TGT_SHARDS=0. This enables RS→Sharded testing by using hack/rs/run.sh for the source and hack/sh/run.sh with SRC_SHARDS=0 for the target.

  • hack/cleanup.sh: Improved cleanup to remove networks and volumes created by both environments, ensuring clean teardown between test runs.

  • tests/test_documents.py: Fixed typo in test name (trucatedtruncated)

Testing:

RS→Sharded configuration validated locally with:

RS_COUNT=1 ./hack/rs/run.sh
SRC_SHARDS=0 TGT_SHARDS=2 ./hack/sh/run.sh

E2E test suite ran against MongoDB 6.0, 7.0, and 8.0.

@chupe chupe requested a review from inelpandzic as a code owner December 9, 2025 00:06
@inelpandzic
Copy link
Collaborator

When I read, it is a bit strange:

RS_COUNT=1 ./hack/rs/run.sh
SRC_SHARDS=0 TGT_SHARDS=2 ./hack/sh/run.sh

RS_COUNT I read as number of replika sets, but it actually controls do we deploy source+target or just source target. The same thing goes for SRC_SHARDS=0 and TGT_SHARDS=2.

Since this task was just one-time testing that we support RS->SH sync, we don't have to think about improving this at the time. I'll close this one and when we start working on fully supporting RS-SH sync, we can address this and improve our scripts.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants