Skip to content

Commit

Permalink
Merge pull request #315 from GoogleCloudPlatform/issue314
Browse files Browse the repository at this point in the history
feat: adds conditional failure policy #314
  • Loading branch information
srinandan authored Dec 10, 2024
2 parents 82435d9 + 2271f90 commit 47dc5ad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/client/integrations/integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ type taskconfig struct {
SuccessPolicy *successPolicy `json:"successPolicy,omitempty"`
TaskTemplate string `json:"taskTemplate,omitempty"`
FailurePolicy *failurePolicy `json:"failurePolicy,omitempty"`
ConditionalFailurePolicies *conditionalFailurePolicy `json:"conditionalFailurePolicies,omitempty"`
SynchronousCallFailurePolicy *failurePolicy `json:"synchronousCallFailurePolicy,omitempty"`
ErrorCatcherId string `json:"errorCatcherId,omitempty"`
ExternalTaskType string `json:"externalTaskType,omitempty"`
Expand Down Expand Up @@ -244,6 +245,7 @@ type failurePolicy struct {
RetryStrategy string `json:"retryStrategy,omitempty"`
MaxRetries int `json:"maxRetries,omitempty"`
IntervalTime string `json:"intervalTime,omitempty"`
Condition string `json:"condition,omitempty"`
}

type cloudSchedulerConfig struct {
Expand All @@ -260,6 +262,11 @@ type integrationConnection struct {
CustomConnection bool
}

type conditionalFailurePolicy struct {
FailurePolicies []failurePolicy `json:"failurePolicies,omitempty"`
DefaultFailurePolicy *failurePolicy `json:"defaultFailurePolicy,omitempty"`
}

// CreateVersion
func CreateVersion(name string, content []byte, overridesContent []byte, snapshot string,
userlabel string, grantPermission bool,
Expand Down

0 comments on commit 47dc5ad

Please sign in to comment.