-
Notifications
You must be signed in to change notification settings - Fork 25
ERA-60184 : Name based resolution #205
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: main
Are you sure you want to change the base?
Conversation
…pshot - Add name fields (clusterName, sourceDatabaseName, snapshotName) to API types - Make UUID fields optional when name is provided - Add NDB API functions to resolve names to UUIDs - Update validation to accept either UUID or name - Integrate name resolution in controller before API calls - Maintain backward compatibility with UUID inputs
- Add optional name fields (clusterName, sourceDatabaseName, snapshotName) to test configs - Keep clusterId/sourceDatabaseId/snapshotId for backward compatibility - Update test setup to support both UUID and name inputs via env vars - Update cloning helpers to respect names if provided - Update README documentation with name examples
- Update test expectations to match new validation messages - Fix variable shadowing in instance_manager (err assignment) - Tests now expect 'Either X or Y must be provided' messages
- Update RBAC role with latest controller-gen v0.18.0 - Format code with go fmt
b415875 to
85cf47f
Compare
When multiple snapshots share the same name, the operator now correctly picks the most recent snapshot instead of the first one encountered. Changes: - Added SnapshotTimeStampDate field to SnapshotResponse struct - Modified ResolveSnapshotNameToId to collect all matching snapshots, compare timestamps, and return the ID of the most recent one Verified: Clone operation now uses cb7d85f2... (Feb 05) instead of aa34c323... (Jan 23) when given snapshotName "era_auto_snapshot" Co-authored-by: Cursor <[email protected]>
shivaprasadmb
left a comment
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.
Most of the changes look good. Please check on below points:
- image name and tag for controller
- run go fmt (format) once for all go files.
Also please update PR description with thorough testing details done for provisioning/cloning DBs using operator logic (not automation test logic)
| - name: controller | ||
| newName: ghcr.io/nutanix-cloud-native/ndb-operator/controller | ||
| newTag: v0.5.2 | ||
| newName: mrshivaprasad/ndb-operator-test |
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.
please keep this as
newName: ghcr.io/nutanix-cloud-native/ndb-operator/controller
newTag: v0.5.3
because the github workflow will create a new container image using these values.
Jira ticket link : ERA-60184
Implementation as part of the PR:
###Tests
In Progress:
MongoDB Provision :
MSSQL Provisioning :
PGSI Cloning :
Mysql Cloning:
Cloning with snapshot name and source database name using "kubectl apply -f yaml" :
Yaml File :