Conversation
bbrks
requested changes
Dec 23, 2025
6 tasks
ee1f2a9 to
bbc67b1
Compare
Redocly previews |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds the ability to pass a custom import filter function to the diagnostic API's /_import_filter endpoint, allowing users to test import filter behavior with different filter implementations without modifying the database configuration.
Key changes:
- Changed the HTTP method from GET to POST for the
/_import_filterendpoint to support request body - Added support for custom import filter functions via the request body
- Refactored and expanded unit tests to cover various scenarios with and without custom import filters
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| rest/routing.go | Changed HTTP method from GET to POST for the /_import_filter endpoint |
| rest/diagnostic_doc_api_test.go | Removed old test function and added comprehensive table-driven tests for import filter dry run |
| rest/diagnostic_doc_api.go | Refactored handler to accept custom import filter in request body and improved error handling |
| docs/api/paths/diagnostic/keyspace-import_filter.yaml | Updated API specification to reflect POST method and document new request body parameters |
| db/import.go | Modified ImportFilterDryRun to accept custom import filter function and handle both default and custom filters |
| base/error.go | Added new error type ImportFilterDryRunError for import filter dry run errors |
bbrks
requested changes
Dec 24, 2025
bbrks
requested changes
Jan 5, 2026
Member
bbrks
left a comment
There was a problem hiding this comment.
Mostly looks good. See inline comments for specific changes/comments.
RIT3shSapata
added a commit
that referenced
this pull request
Jan 21, 2026
RIT3shSapata
added a commit
that referenced
this pull request
Jan 21, 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.
CBG-4412
Describe your PR here...
Pre-review checklist
fmt.Print,log.Print, ...)base.UD(docID),base.MD(dbName))docs/apiDependencies (if applicable)
Integration Tests
GSI=true,xattrs=truehttps://jenkins.sgwdev.com/job/SyncGatewayIntegration/208/GSI=true,xattrs=truehttps://jenkins.sgwdev.com/job/SyncGatewayIntegration/211/