CLOUDP-321075: fail to reconcile mongo db search for version 1.47.0 #244
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
This pull request introduces validation for unsupported MongoDBSearch image versions and adds a corresponding test case. The key changes include implementing a new validation method, updating the reconciliation logic, and adding constants for unsupported versions.
Validation for unsupported MongoDBSearch image versions:
New validation method: Added
ValidateSearchImageVersion
toMongoDBSearchReconcileHelper
to check if the specified or container image version matches an unsupported version (1.47.0
). If so, it returns an error.Integration into reconciliation workflow: Updated the
reconcile
method to invokeValidateSearchImageVersion
before proceeding with other validations.Constants for unsupported version: Introduced
unsupportedSearchVersion
andunsupportedSearchVersionErrorFmt
constants to centralize the unsupported version logic and error formatting.Test case for validation:
TestMongoDBSearchReconcile_InvalidSearchImageVersion
to validate the error handling for unsupported MongoDBSearch versions. This ensures the reconciliation fails with the appropriate error message.Proof of Work
Test pass
Checklist
Reminder (Please remove this when merging)