Skip to content

Commit

Permalink
Prepare for release v0.16.0 (#1394)
Browse files Browse the repository at this point in the history
ProductLine: Stash

Release: v2021.10.11

Release-tracker: stashed/CHANGELOG#41
Signed-off-by: 1gtm <1gtm@appscode.com>
  • Loading branch information
1gtm committed Oct 9, 2021
1 parent 7c26c7d commit 535efca
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
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,
})
}

0 comments on commit 535efca

Please sign in to comment.