Open
Conversation
* feat: support name-based inputs for cluster, source database, and snapshot - 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 * test: update test configs to support name-based 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 * fix: update webhook tests for name-based validation - 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 * chore: update generated files - Update RBAC role with latest controller-gen v0.18.0 - Format code with go fmt * fix: restore original webhook test setup from v0.5.2 * fix: update webhook test expectations for name-based validation * Fix snapshot name resolution to pick latest snapshot 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" * Update test configurations to use name-based resolution by default - Updated all provisioning and cloning test configs (Mongo, MSSQL, MySQL, PostgreSQL) to use name-based inputs (clusterName, sourceDatabaseName, snapshotName) as the default - UUID-based fields (clusterId, sourceDatabaseId, snapshotId) are now commented out as alternatives - Enhanced test suite utilities to properly handle name-based resolution testing - Updated kustomization.yaml with latest operator image configuration - Minor improvements to name resolution controller adapter All tests have been validated for both provisioning and cloning operations across all four database types. * Add .env template and update .gitignore * Update README comments Co-authored-by: Cursor <cursoragent@cursor.com> * Update README secret comment Co-authored-by: Cursor <cursoragent@cursor.com> * Run go fmt Co-authored-by: Cursor <cursoragent@cursor.com> * Fix snapshot index bug in cloning helpers Co-authored-by: Cursor <cursoragent@cursor.com> * Refactor name resolution code Reorganize NDB API functions by entity and fix env file handling Co-authored-by: Cursor <cursoragent@cursor.com> * empty commit Co-authored-by: Cursor <cursoragent@cursor.com> * empty commit * Replace Synopsys Black Duck workflows with new implementation --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
How Has This Been Tested?:
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and test output
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: