-
Notifications
You must be signed in to change notification settings - Fork 920
GODRIVER-3704 Fix search index failure on empty "Options". #2247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
🧪 Performance ResultsCommit SHA: 1373cf2The following benchmark tests for version 692dc1709bc46e00075de220 had statistically significant changes (i.e., |z-score| > 1.96):
For a comprehensive view of all microbenchmark results for this PR's commit, please check out the Evergreen perf task for this patch. |
API Change ReportNo changes found! |
1c96085 to
ee65456
Compare
ee65456 to
86957b1
Compare
| assume-test-secrets-ec2-role: | ||
| - command: ec2.assume_role | ||
| params: | ||
| role_arn: ${aws_test_secrets_role} | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate of L175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where search index creation failed when SearchIndexModel.Options is nil. The fix ensures that the document element is always started before checking for optional fields.
Key changes:
- Moved
AppendDocumentElementStartcall outside theOptions != nilcheck to ensure proper BSON document construction - Added integration test to verify search index creation with empty options
- Standardized environment variable naming from
TEST_INDEX_URItoSEARCH_INDEX_URI
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
mongo/search_index_view.go |
Fixed bug by moving AppendDocumentElementStart before the Options != nil check, ensuring proper BSON document structure regardless of Options value |
internal/integration/search_index_test.go |
Added new integration test to verify search index creation with empty Options |
internal/integration/search_index_prose_test.go |
Updated environment variable name from TEST_INDEX_URI to SEARCH_INDEX_URI for consistency |
Taskfile.yml |
Updated test runner to execute both TestSearchIndex and TestSearchIndexProse tests |
.evergreen/config.yml |
Updated environment variable naming to SEARCH_INDEX_URI and removed duplicate assume-test-secrets-ec2-role function definition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
58bc4c2 to
1373cf2
Compare
GODRIVER-3704
Summary
Background & Motivation