-
Notifications
You must be signed in to change notification settings - Fork 5
feat: retry restore #222
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
Open
Logaka
wants to merge
18
commits into
main
Choose a base branch
from
feat/retry-restore
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: retry restore #222
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
07e49bd
feat: expand filtering
Logaka 9765ff6
refactor: rewrite dynamic SQL filter
Logaka e0963a5
Merge branch 'main' into feat/backupV2-add-complex-filtering
Logaka f665ab3
feat: add NotEmptyFilter validation to Filter class
Logaka af1004a
feat: expanded filtering for external databases
Logaka 5563e44
feat: add dryRun
Logaka b011b17
Merge branch 'refs/heads/main' into feat/restore-dryRun
Logaka 31e33e7
feat: change restore classifier variable
Logaka 891c12f
fix: prevent state-changing logic during dry-run in findSimilarDbByCl…
Logaka 9ba3487
test: add tests for dry-run
Logaka 7380508
refactor: reorganize packages
Logaka d279bd2
refactor: remove attemptCount, duration fields
Logaka 987e061
Merge branch 'main' into feat/retry-restore
Logaka 398e385
feat: implement retry restore
Logaka ed61408
refactor: conditional return to stream map
Logaka a20d0e6
Merge branch 'feat/restore-dryRun' into feat/retry-restore
Logaka ea34805
refactor: prevent lock method duplication
Logaka e912a3f
refactor: add validation for RestoreRequest
Logaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
2 changes: 1 addition & 1 deletion
2
...dbaas-aggregator/src/main/java/com/netcracker/cloud/dbaas/dto/backupV2/BackupRequest.java
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
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
17 changes: 17 additions & 0 deletions
17
...-aggregator/src/main/java/com/netcracker/cloud/dbaas/dto/backupV2/ClassifierResponse.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package com.netcracker.cloud.dbaas.dto.backupV2; | ||
|
|
||
| import com.netcracker.cloud.dbaas.enums.ClassifierType; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.util.SortedMap; | ||
|
|
||
| @Data | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class ClassifierResponse { | ||
| private ClassifierType type; | ||
| private SortedMap<String, Object> classifier; | ||
| private SortedMap<String, Object> classifierBeforeMapper; | ||
| } |
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
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
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
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
2 changes: 1 addition & 1 deletion
2
...baas-aggregator/src/main/java/com/netcracker/cloud/dbaas/dto/backupV2/RestoreRequest.java
Logaka marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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
4 changes: 2 additions & 2 deletions
4
.../src/main/java/com/netcracker/cloud/dbaas/entity/dto/backupV2/BackupDatabaseDelegate.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| package com.netcracker.cloud.dbaas.entity.dto.backupV2; | ||
|
|
||
| import com.netcracker.cloud.dbaas.entity.pg.backupV2.Classifier; | ||
| import com.netcracker.cloud.dbaas.entity.pg.backupV2.BackupDatabase; | ||
|
|
||
| import java.util.List; | ||
| import java.util.SortedMap; | ||
|
|
||
|
|
||
| public record BackupDatabaseDelegate(BackupDatabase backupDatabase, | ||
| List<SortedMap<String, Object>> classifiers) {} | ||
| List<Classifier> classifiers) {} |
9 changes: 9 additions & 0 deletions
9
.../src/main/java/com/netcracker/cloud/dbaas/entity/dto/backupV2/BackupExternalDelegate.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.netcracker.cloud.dbaas.entity.dto.backupV2; | ||
|
|
||
| import com.netcracker.cloud.dbaas.entity.pg.backupV2.Classifier; | ||
| import com.netcracker.cloud.dbaas.entity.pg.backupV2.BackupExternalDatabase; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public record BackupExternalDelegate(BackupExternalDatabase backupExternalDatabase, List<Classifier> classifiers) { | ||
| } |
29 changes: 29 additions & 0 deletions
29
...as-aggregator/src/main/java/com/netcracker/cloud/dbaas/entity/pg/backupV2/Classifier.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| package com.netcracker.cloud.dbaas.entity.pg.backupV2; | ||
|
|
||
| import com.netcracker.cloud.dbaas.enums.ClassifierType; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.util.Objects; | ||
| import java.util.SortedMap; | ||
|
|
||
| @Data | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class Classifier { | ||
| private ClassifierType type; | ||
| private SortedMap<String, Object> classifier; | ||
| private SortedMap<String, Object> classifierBeforeMapper; | ||
|
|
||
| @Override | ||
| public boolean equals(Object o) { | ||
| if (!(o instanceof Classifier that)) return false; | ||
| return type == that.type && Objects.equals(classifier, that.classifier) && Objects.equals(classifierBeforeMapper, that.classifierBeforeMapper); | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(type, classifier, classifierBeforeMapper); | ||
| } | ||
| } |
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
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
5 changes: 5 additions & 0 deletions
5
dbaas/dbaas-aggregator/src/main/java/com/netcracker/cloud/dbaas/enums/ClassifierType.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package com.netcracker.cloud.dbaas.enums; | ||
|
|
||
| public enum ClassifierType { | ||
| NEW, REPLACED, TRANSIENT_REPLACED | ||
| } |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.