Skip to content
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

[Maintenance] Update go-driver version to v1.6.0 - GT-505 #1443

Merged
merged 5 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More replaces for IsNotFound
  • Loading branch information
nikita-vanyasin committed Oct 17, 2023
commit 394101a44de7de3ff3f9c8d22c474dbb8d161908
2 changes: 1 addition & 1 deletion pkg/handlers/backup/arango_client_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (ac *arangoClientBackupImpl) Progress(jobID driver.BackupTransferJobID) (Ar
func (ac *arangoClientBackupImpl) Exists(backupID driver.BackupID) (bool, error) {
_, err := ac.Get(backupID)
if err != nil {
if driver.IsNotFound(err) {
if driver.IsNotFoundGeneral(err) {
return false, nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/backup/state_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func stateCreateHandler(h *handler, backup *backupApi.ArangoBackup) (*backupApi.

backupMeta, err := client.Get(response.ID)
if err != nil {
if driver.IsNotFound(err) {
if driver.IsNotFoundGeneral(err) {
return wrapUpdateStatus(backup,
updateStatusState(backupApi.ArangoBackupStateFailed,
"backup is not present after creation"),
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/backup/state_downloading.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func stateDownloadingHandler(h *handler, backup *backupApi.ArangoBackup) (*backu

details, err := client.Progress(driver.BackupTransferJobID(backup.Status.Progress.JobID))
if err != nil {
if driver.IsNotFound(err) {
if driver.IsNotFoundGeneral(err) {
return wrapUpdateStatus(backup,
updateStatusState(backupApi.ArangoBackupStateDownloadError,
"job with id %s does not exist anymore", backup.Status.Progress.JobID),
Expand All @@ -76,7 +76,7 @@ func stateDownloadingHandler(h *handler, backup *backupApi.ArangoBackup) (*backu
if details.Completed {
backupMeta, err := client.Get(driver.BackupID(backup.Spec.Download.ID))
if err != nil {
if driver.IsNotFound(err) {
if driver.IsNotFoundGeneral(err) {
return wrapUpdateStatus(backup,
updateStatusState(backupApi.ArangoBackupStateDownloadError,
"backup is not present after download"),
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/backup/state_ready.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func stateReadyHandler(h *handler, backup *backupApi.ArangoBackup) (*backupApi.A

backupMeta, err := client.Get(driver.BackupID(backup.Status.Backup.ID))
if err != nil {
if driver.IsNotFound(err) {
if driver.IsNotFoundGeneral(err) {
return wrapUpdateStatus(backup,
updateStatusState(backupApi.ArangoBackupStateDeleted, ""),
updateStatusAvailable(false),
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/backup/state_unavailable.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,7 @@ func stateUnavailableHandler(h *handler, backup *backupApi.ArangoBackup) (*backu

backupMeta, err := client.Get(driver.BackupID(backup.Status.Backup.ID))
if err != nil {
if driver.IsNotFound(err) {
if driver.IsNotFoundGeneral(err) {
return wrapUpdateStatus(backup,
updateStatusState(backupApi.ArangoBackupStateDeleted, ""),
updateStatusAvailable(false),
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/backup/state_upload.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,7 @@ func stateUploadHandler(h *handler, backup *backupApi.ArangoBackup) (*backupApi.

meta, err := client.Get(driver.BackupID(backup.Status.Backup.ID))
if err != nil {
if driver.IsNotFound(err) {
if driver.IsNotFoundGeneral(err) {
return wrapUpdateStatus(backup,
updateStatusState(backupApi.ArangoBackupStateDeleted, ""),
updateStatusAvailable(false),
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/backup/state_uploading.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func stateUploadingHandler(h *handler, backup *backupApi.ArangoBackup) (*backupA

details, err := client.Progress(driver.BackupTransferJobID(backup.Status.Progress.JobID))
if err != nil {
if driver.IsNotFound(err) {
if driver.IsNotFoundGeneral(err) {
return wrapUpdateStatus(backup,
updateStatusState(backupApi.ArangoBackupStateUploadError,
"job with id %s does not exist anymore", backup.Status.Progress.JobID),
Expand Down