Skip to content

Commit 864163d

Browse files
fix(search): replace placeholder data returns with Atlas SDK limitati… (#5)
* fix(search): replace placeholder data returns with Atlas SDK limitation errors (#4) Replace all placeholder data implementations in search service methods with proper error messages that inform users about Atlas Admin API limitations. **Changes Made:** - Modified `GetSearchAnalyzers()` to return error instead of placeholder data - Modified `GetSearchFacets()` to return error instead of placeholder data - Removed helper functions that contained placeholder implementations: - `extractAnalyzersFromDefinition()` - `extractFacetsFromDefinition()` - `analyzeIndexDefinition()` - Updated error messages to guide users to Atlas UI for unsupported features **Affected Methods:** - `GetSearchAnalyzers`: Returns error about SDK not exposing analyzer details - `GetSearchFacets`: Returns error about SDK not exposing facet details - `GetSearchMetrics`: Already properly returns limitation error (unchanged) - `AnalyzeSearchIndex`: Already properly returns limitation error (unchanged) - `ValidateSearchQuery`: Already properly returns limitation error (unchanged) **Error Message Pattern:** All errors now follow consistent format: 1. Structured logging with context (project_id, cluster_name, reason) 2. Clear error message explaining the Atlas SDK limitation 3. Guidance to use Atlas UI for the specific functionality **Files Modified:** - `internal/services/atlas/search.go`: Core service method changes (-84 lines) - `cmd/atlas/search/search.go`: Minor comment updates - `internal/output/advanced_search.go`: Retained placeholder handling for compatibility **Backward Compatibility:** Yes - methods still exist but now return informative errors This change prevents users from receiving misleading placeholder data and provides clear guidance on how to access these features through the Atlas UI. Refs: Atlas SDK limitation handling Co-authored-by: Danny Teller <danny.teller@tipalti.com> * fix: go formatting --------- Co-authored-by: Danny Teller <danny.teller@tipalti.com>
1 parent 58a5188 commit 864163d

File tree

15 files changed

+1593
-253
lines changed

15 files changed

+1593
-253
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
## [Unreleased]
22

33
### Added
4+
- **Comprehensive Backup Features**: Complete backup and Point-in-Time Recovery implementation
5+
- Point-in-Time Recovery (PIT) support with proper validation workflow
6+
- CLI backup management (`--backup` and `--pit` flags for cluster create/update)
7+
- YAML backup configuration (`backupEnabled` and `pitEnabled` fields)
8+
- Cross-field validation ensuring PIT requires backup to be enabled
9+
- Backup workflow validation preventing PIT during cluster creation
10+
- Comprehensive backup test suite with CLI and YAML validation testing
11+
- Cross-region backup support via multi-region cluster configurations
412
- **MongoDB Atlas Alerting System**: Complete alert configuration and management system
513
- Alert configuration CLI commands (`matlas atlas alert-configurations list/get/delete/matcher-fields`)
614
- Alert management CLI commands (`matlas atlas alerts list/get/acknowledge`)

0 commit comments

Comments
 (0)