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

Prepare for release v0.16.0 #1394

Merged
merged 1 commit into from
Oct 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ require (
kmodules.xyz/openshift v0.0.0-20210618001443-f2507caa512f
kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027
kmodules.xyz/webhook-runtime v0.0.0-20210928141616-7f73c2ab318a
stash.appscode.dev/apimachinery v0.15.1-0.20211008114243-3ddabb572a0a
stash.appscode.dev/apimachinery v0.16.0
)

replace bitbucket.org/ww/goautoneg => gomodules.xyz/goautoneg v0.0.0-20120707110453-a547fc61f48d
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1263,5 +1263,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
stash.appscode.dev/apimachinery v0.15.1-0.20211008114243-3ddabb572a0a h1:MYMUAvHKN+UFtB0HDX+oZjpfFQdetDchiEe3DsFqtXg=
stash.appscode.dev/apimachinery v0.15.1-0.20211008114243-3ddabb572a0a/go.mod h1:owQaNhtUMh6s727PX9dGIoLlqblMvMOtYLF2jy9CUek=
stash.appscode.dev/apimachinery v0.16.0 h1:6mvmPatv9nR5Wc+PCt3Cg9R7WRJRqhy2yLu2b/HmXhA=
stash.appscode.dev/apimachinery v0.16.0/go.mod h1:unpV/YyHVECNrAdFjFg/SetmPeUjfvc2+P8cnGjih/U=
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ sigs.k8s.io/structured-merge-diff/v4/typed
sigs.k8s.io/structured-merge-diff/v4/value
# sigs.k8s.io/yaml v1.2.0
sigs.k8s.io/yaml
# stash.appscode.dev/apimachinery v0.15.1-0.20211008114243-3ddabb572a0a
# stash.appscode.dev/apimachinery v0.16.0
## explicit
stash.appscode.dev/apimachinery/apis
stash.appscode.dev/apimachinery/apis/repositories
Expand Down
4 changes: 4 additions & 0 deletions vendor/stash.appscode.dev/apimachinery/apis/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ const (
StashInitContainerInjected = "StashInitContainerInjected"
// RestoreJobCreated indicates whether the restore job was created
RestoreJobCreated = "RestoreJobCreated"
// RestoreCompleted condition indicates whether the restore process has been completed or not.
// This condition is particularly helpful when the restore addon require some additional operations to perform
// before marking the RestoreSession Succeeded/Failed.
RestoreCompleted = "RestoreCompleted"

// GlobalPreBackupHookSucceeded indicates whether the global PreBackupHook was executed successfully or not
GlobalPreBackupHookSucceeded = "GlobalPreBackupHookSucceeded"
Expand Down
18 changes: 18 additions & 0 deletions vendor/stash.appscode.dev/apimachinery/pkg/conditions/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,21 @@ func SetInitContainerInjectedConditionToFalse(inv invoker.RestoreInvoker, tref a
Message: fmt.Sprintf("Failed to inject Stash init-container. Reason: %v", err.Error()),
})
}

func SetRestoreCompletedConditionToTrue(inv invoker.RestoreInvoker, tref api_v1beta1.TargetRef, msg string) error {
return inv.SetCondition(&tref, kmapi.Condition{
Type: apis.RestoreCompleted,
Status: core.ConditionTrue,
Reason: "PostRestoreTasksExecuted",
Message: msg,
})
}

func SetRestoreCompletedConditionToFalse(inv invoker.RestoreInvoker, tref api_v1beta1.TargetRef, msg string) error {
return inv.SetCondition(&tref, kmapi.Condition{
Type: apis.RestoreCompleted,
Status: core.ConditionFalse,
Reason: "PostRestoreTasksNotExecuted",
Message: msg,
})
}