Support for database clone operations#136
Draft
sl-at-ibm wants to merge 4 commits into
Draft
Conversation
…latest devops; better env detection for testing (thanks clun)
clun
approved these changes
Jun 24, 2026
clun
left a comment
Collaborator
There was a problem hiding this comment.
Nice and clean.
You also inegrated the environment support getEnvironment(), great.
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.
This PR adds support for database self-service clone operations to the SDK.
To do so, two new clients are introduced, to which the main
DbOpsClientdelegates:DbSnapshotClient, for snapshot-related actions (list snapshots)DbCloneClient, for clone-related actions (initiate clone and, later, inspect the status of a clone operation)The snapshot client only allows listing the snapshots for the current DB (with or without filter parameters).
The clone client offers methods to:
The reason to keep these two as separate clients is that the snapshots are focused on the source DB (hence you create the client pointing at that DB), while the clone (+get status) essentially forget about the source and work "on" the target DB. So for a full clone interaction the user would have to spawn two DbOpsClient instances, true, but for a good reason (to keep their mind organized around how the two DB do what).
Testing and such
Clone, right now, is testable mostly on DEV. (and even there, it often fails...)
So this PR also extends the general fixtures in
AbstractDevopsApiTest.javato ensure DEV is properly targeted - this was needed by me in order to launch some tests.The PR adds three tests, which however are probably not becoming ordinary tests that one runs frequently! They require quite some setup and some configuration (some of it, currently hardcoded in the test functions - let's see what should happen). My main goal was to see them working, it can then be decided later what to do of those.
some trouble with me building/testing
Note: not impacting the PR itself.
Right now, I could not properly build the repo with
skipTests=trueand succeed in later running a single test. Probably my limited knowledge. (note I did not commit this pom change to this PR.)I could not run the tests at all unless I changed the pom to say,
<skipTests>false</skipTests>, so that I could later run e.g.But without skipping the tests, the build process (
mvn clean install -DskipTests=true) would try to run the tests each time, despite the command-line flag.So I Ctrl-C'd out of the build process as soon as the tests started (ahem, not very elegant, I know. Likely one can do better).