Skip to content

Commit

Permalink
Remove unverified parts
Browse files Browse the repository at this point in the history
  • Loading branch information
paia0720 committed Dec 11, 2024
1 parent 6b7c0f1 commit 9c2d2fc
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 38 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.idea
.gitlab-ci
.gitlab-ci.yml
README.md
.gitignore
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ This API requests to collect backup for specified database prefixes.
Request:

```
curl -u <username>:<password> -XPOST http://dbaas-opensearch-adapter:8080/api/v1/dbaas/adapter/opensearch/backups/collect -d'["db1"]'
curl -u <username>:<password> -XPOST http://dbaas-opensearch-adapter:8080/api/v1/dbaas/adapter/opensearch/backups/collect -d '["db1"]'
```

Response:
Expand Down
3 changes: 0 additions & 3 deletions backup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ func (bp BackupProvider) RestoreBackup(backupId string, dbs []string, fromRepo s
var err error
maxLen := 0

// We leave this code as is, yet it's not supported currently. It should be fixed after the problem with Users and DB names for DBaaS
if regenerateNames {
indices, err = bp.getActualIndices(backupId, fromRepo, map[string]string{}, ctx)
if err != nil {
Expand Down Expand Up @@ -468,7 +467,6 @@ func (bp BackupProvider) RestoreBackup(backupId string, dbs []string, fromRepo s
}
} else {
logger.InfoContext(ctx, "Maximum index name allows to perform bulk restoration")
//TODO add recognition of dbaas generated names and prevent name overflow
err := bp.requestRestore(
ctx,
indices,
Expand Down Expand Up @@ -604,7 +602,6 @@ func (bp BackupProvider) TrackRestoreIndices(ctx context.Context, backupId strin
if foundOneDone {
return restoreTrack(backupId, "SUCCESS", changedNameDb)
}
// this is a possibly dangerous hack
return restoreTrack(backupId, "PROCEEDING", changedNameDb)
}

Expand Down
9 changes: 0 additions & 9 deletions backup/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ func TestRestoreBackup(t *testing.T) {
assert.Nil(t, restoreInfo)
}

// Disable renaming test, we're not going to use this functionality until we fix the Users fix
//func TestRestoreBackupWithRename(t *testing.T) {
// dbs := []string{"db1", "db2"}
// restoreInfo, err := backupProvider.RestoreBackup("dbaas_1_1", dbs, "snapshots", true)
// assert.Nil(t, err)
// assert.Regexp(t, regexp.MustCompile("dbaas_.*_a"), restoreInfo["a"])
// assert.Regexp(t, regexp.MustCompile("dbaas_.*_b"), restoreInfo["b"])
//}

func TestRestoreBackupWithEmptyDatabasePrefixes(t *testing.T) {
dbs := []string{}
restoreInfo, err := backupProvider.RestoreBackup("dbaas_1_1", dbs, "snapshots", false, context.Background())
Expand Down
16 changes: 0 additions & 16 deletions build.sh

This file was deleted.

3 changes: 1 addition & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ FROM golang:1.22.5-alpine3.20 as builder
ENV GOPRIVATE=github.com/Netcracker \
GOSUMDB=off \
CGO_ENABLED=0 \
GO111MODULE=on \
ELASTIC_HOST=172.28.0.2
GO111MODULE=on

ARG GH_ACCESS_TOKEN

Expand Down
4 changes: 2 additions & 2 deletions physical/physical_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestRegistration(t *testing.T) {
testServer.URL,
dao.BasicAuth{
Username: "cluster-dba",
Password: "Bnmq5567_PO",
Password: "test",
},
"",
nil,
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestFailedRegistration(t *testing.T) {
testServer.URL,
dao.BasicAuth{
Username: "cluster-dba",
Password: "Bnmq5567_PO",
Password: "test",
},
"",
nil,
Expand Down

0 comments on commit 9c2d2fc

Please sign in to comment.