| name | upgrade-agent |
|---|---|
| description | Couchbase Server upgrade test suite — validates online/offline upgrade strategies, mixed-mode cluster behavior, storage migration, guardrails, CDC, durability, indexing, and analytics across version chains. |
| model | inherit |
Upgrade test suite. Validates all upgrade strategies (swap, incremental, failover, offline) across multi-hop version chains, with concurrent data load, SyncWrite validation, and post-upgrade feature verification.
| File | Class(es) | Purpose |
|---|---|---|
upgrade_base.py |
UpgradeBase |
Shared base — installs initial version, builds upgrade chain, provides all upgrade strategy methods |
durability_upgrade.py |
UpgradeTests |
Primary upgrade test class — KV durability, SyncWrites, Magma, collections, storage migration, guardrails, CDC, GSI |
cbas_upgrade.py |
UpgradeTests |
Analytics (CBAS) upgrade — dataverse/dataset/index survival, replica, CBO samples |
kv_upgrade_tests.py |
KVUpgradeTests |
KV-specific scenarios: sample buckets + failover-upgrade, tombstone + XDCR |
luks_upgrade.py |
LuksUpgrade |
LUKS disk encryption upgrade — mixed-mode SyncWrite failure expectations |
mem_compression_upgrade.py |
MemCompressionUpgradeTests |
Memory compression + Plasma GSI index upgrade |
system_event_logs.py |
SystemEventLogs |
System event log API compatibility across mixed-mode and fully-upgraded cluster |
e2e_upgrade.py |
E2EUpgrade |
End-to-end multi-service upgrade (KV + 2i + Eventing + N1QL + CBAS) with GSI abort validation |
Full class hierarchy, all upgrade strategies, test_upgrade step-by-step flow,
configuration parameters reference, upgrade chain configuration, cluster_features
lifecycle, and debugging patterns:
→ agents/skills/test-flow-map/upgrade.md
-
Check the test-flow-map for constraints before writing code. Key invariants:
cluster_featuresguards — do not remove without checking the full chain. Guards likeif "collections" in self.cluster_featuresexist becauseupgrade_chainmay start from a version that predates the feature. Removing them based on the target version alone is incorrect — check whether every entry in every conf file that uses this test is ≥ the feature's introduction version. See the WARNING block inupgrade.md— Upgrade Chain Configuration.Guard Safe to assume True only when every chain entry is ≥ "collections" in cluster_features7.0 "magma" in cluster_features7.1 "system_event_logs" in cluster_features7.1 "cdc" in cluster_features7.2 "durability_impossible_fallback" in cluster_features8.0 "10K_collections" in cluster_features8.1 "file_based_rebalance" in cluster_features8.1 Other invariants:
self.spare_nodeiscluster.servers[nodes_init]at setUp and rotates after eachonline_swap— new upgrade methods must maintain this rotation.upgrade_functiondispatch dict mapsupgrade_type→ method — new upgrade strategies must be registered here before__validate_upgrade_type()is called in setUp.validate_encryption_operations(expected_to_fail=True)must be called inside the per-node upgrade loop (mixed-mode), andvalidate_encryption_operations(expected_to_fail=False)after full upgrade only — do not invert this order.add_system_scope_to_all_buckets()is triggered by version crossing 7.6 — new tests that validate bucket schema post-7.6 upgrade must account for the_systemscope in collection counts.attempt_10k_collection_creation()returnsTrueonly on 8.1+ — assertingFalseduring upgrade andTrueafter is the correct pattern.- CBAS
UpgradeTests(cbas_upgrade.py) callscluster_cleanup()in tearDown to force-clean nodes; KVUpgradeBase.tearDowndoes not — do not rely on base tearDown for CBAS node cleanup.
-
Update
agents/skills/test-flow-map/upgrade.mdto reflect:- New file → add a row to the Files table and a new section with class, setUp extras, and test method table.
- New test method → add a row to the relevant class test table with purpose.
- New helper method in
UpgradeBaseorUpgradeTests→ add a row to the relevant helper methods table. - New configuration param → add a row to the appropriate Configuration Parameters table with default and description.
- New upgrade strategy → add a row to the upgrade strategy dispatch table and document the mechanism.
- New
cluster_featuresguard → add a row to the guard safety table in both the Upgrade Chain Configuration section and the Debugging Patterns table. - New failure pattern or debugging gotcha → add a row to the Common Debugging Patterns table.
- Re-read the corresponding section in the flow map to verify the change doesn't violate a documented invariant (especially
cluster_featuresguards andspare_noderotation). - Update the flow map if the flow, params, guards, or helper methods change.