test: functional test for putBucketIndexes error handling + bump test mongo to 8.0.23#2634
Open
delthas wants to merge 2 commits into
Open
test: functional test for putBucketIndexes error handling + bump test mongo to 8.0.23#2634delthas wants to merge 2 commits into
delthas wants to merge 2 commits into
Conversation
Contributor
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development/8.4 #2634 +/- ##
================================================
Coverage 73.92% 73.92%
================================================
Files 229 229
Lines 18480 18480
Branches 3847 3822 -25
================================================
Hits 13661 13661
Misses 4814 4814
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
913367f to
a281059
Compare
Align the functional-test MongoDB version with what Artesca 4.1+ runs in production (the 8.0.x line). The mongodb-memory-server library defaults to 7.0.14, which does not enforce indexBuildMinAvailableDiskSpaceMB — the new putBucketIndexes error-handling test (ARSN-588) needs 7.1+ behavior to exercise the disk-space refusal path. Issue: ARSN-588
Cover three failure modes in MongoClientInterface.putBucketIndexes: - Happy path: valid spec → success - indexBuildMinAvailableDiskSpaceMB exceeds available disk: MongoDB 8.0+ refuses with OutOfDiskSpace (code 14031), Arsenal must map to errors.InternalError. The Backbeat conductor's putBucketIndexesFailed metric (ZENKO-5286) fires on this InternalError. - Spec conflict: existing index name + different keys → IndexKeySpecsConflict → errors.InternalError. The disk-kill test reads the current indexBuildMinAvailableDiskSpaceMB value, sets it to 100 TiB during the test, and restores the original value in finally. Issue: ARSN-588
a281059 to
c807144
Compare
|
LGTM |
SylvainSenechal
approved these changes
Jun 8, 2026
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.
Summary
Adds a functional test for
MongoClientInterface.putBucketIndexeserror handling — including the case where MongoDB 7.1+ refuses an index build because available disk falls belowindexBuildMinAvailableDiskSpaceMB.Companion to ZENKO-5286 (Backbeat metric for index-creation failures, PR #2750) and ZENKO-5285 (alert for sustained failures).
Commits
test: pin mongodb-memory-server to MongoDB 8.0.23— version bump inpackage.json. The library default (7.0.14) doesn't enforceindexBuildMinAvailableDiskSpaceMB; the test needs 7.1+ behavior. 8.0.23 also aligns with what Artesca 4.1+ will run in production.test: add functional test for putBucketIndexes error handling— new spec covering three cases:indexBuildMinAvailableDiskSpaceMBrefusal: MongoDB returnsOutOfDiskSpace(code 14031) → Arsenal maps toerrors.InternalError. The BackbeatputBucketIndexesFailedmetric on ZENKO-5286 fires on this.IndexKeySpecsConflict→errors.InternalError.Empirical observation
The disk-kill test confirms MongoDB returns:
Arsenal's existing catch handler at
MongoClientInterface.putBucketIndexescorrectly maps this toerrors.InternalError— same path used by all non-NamespaceNotFoundMongoDB errors. The Backbeat conductor's metric is cause-agnostic (fires on anyputBucketIndexeserror), so this gives us the signal regardless of the specific code.Notes
indexBuildMinAvailableDiskSpaceMBvalue viagetParameter, sets it to 100 TiB during the test, and restores the original infinally— does not leak state to other tests.diskUsage.spec.json 8.0.23 — passes (no regressions on the version bump).Issue: ARSN-588