Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-8859] Refactoring backup controller for create and restore to a…
…dd helper methods that allow calling from non API context. Summary: Refactoring backup controller for create and restore to add helper methods that allow calling from non API ocntext. This will make calling these functions from the backup reconciler much easier and allow us to not remimplement this code. This will also keep backup/restore functionality consistent between operator and the API clients. Test Plan: itest build Fixed Failing UT ``` OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectNFSNonYBC(false, true) [0] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectNFSNonYBC(true, false) [1] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectNFSNonYBC(true, true) [2] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectNFSNonYBC(false, false) [3] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testValidateBackupRequestYCQLSameKeyspaceInvalid started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testValidateBackupRequestYCQLSameKeyspaceValid started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testValidateBackupRequestYCQLDifferentKeyspaceValid started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightResponseWithYSQLBackupObjectExists(true, YB_CONTROLLER) [0] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightResponseWithYSQLBackupObjectExists(false, YB_CONTROLLER) [1] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightResponseWithYSQLBackupObjectExists(true, YB_BACKUP_SCRIPT) [2] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightResponseWithYSQLBackupObjectExists(false, YB_BACKUP_SCRIPT) [3] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectYBCWithYCQLIndexTables(backup/ybc_success_file_with_index_tables.json, true, false) [0] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectYBCWithYCQLIndexTables(backup/ybc_success_file_with_index_tables.json, true, true) [1] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectYBCWithYCQLIndexTables(backup/ybc_success_file_with_index_tables.json, false, true) [2] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectYBCWithYCQLIndexTables(backup/ybc_success_file_with_index_tables.json, false, false) [3] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectS3NonYBC(false, true) [0] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectS3NonYBC(true, false) [1] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectS3NonYBC(true, true) [2] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightWithoutBackupObjectS3NonYBC(false, false) [3] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testValidateMapToRestoreWithUniverseNonRedisYBC_OverwriteYCQL started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testValidateMapToRestoreWithUniverseNonRedisYBC_OverwriteYSQL started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightResponseWithYCQLBackupObjectExists(true, YB_CONTROLLER) [0] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightResponseWithYCQLBackupObjectExists(false, YB_CONTROLLER) [1] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightResponseWithYCQLBackupObjectExists(true, YB_BACKUP_SCRIPT) [2] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testRestorePreflightResponseWithYCQLBackupObjectExists(false, YB_BACKUP_SCRIPT) [3] started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testValidateMapToRestoreWithUniverseNonRedisYBC_NoOverwriteYCQL started [info] Test com.yugabyte.yw.common.backuprestore.BackupHelperTest.testValidateMapToRestoreWithUniverseNonRedisYBC_NoOverwriteYSQL started [info] Test run finished: 0 failed, 0 ignored, 27 total, 86.92s [info] Passed: Total 27, Failed 0, Errors 0, Passed 27 ``` Reviewers: #yba-api-review, hzare Reviewed By: #yba-api-review, hzare Subscribers: sneelakantan, hzare, yugaware Differential Revision: https://phorge.dev.yugabyte.com/D27207
- Loading branch information