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

feat: [deploy] A new field timed_promote_release_rule is added to message .google.cloud.deploy.v1.AutomationRule #5806

Merged
merged 2 commits into from
Nov 14, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -4150,9 +4150,48 @@ message AutomationRule {
// rollout.
RepairRolloutRule repair_rollout_rule = 3
[(google.api.field_behavior) = OPTIONAL];

// Optional. The `TimedPromoteReleaseRule` will automatically promote a
// release from the current target(s) to the specified target(s) on a
// configured schedule.
TimedPromoteReleaseRule timed_promote_release_rule = 4
[(google.api.field_behavior) = OPTIONAL];
}
}

// The `TimedPromoteReleaseRule` will automatically promote a release from the
// current target(s) to the specified target(s) on a configured schedule.
message TimedPromoteReleaseRule {
// Required. ID of the rule. This ID must be unique in the `Automation`
// resource to which this rule belongs. The format is
// `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
string id = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. The ID of the stage in the pipeline to which this `Release` is
// deploying. If unspecified, default it to the next stage in the promotion
// flow. The value of this field could be one of the following:
//
// * The last segment of a target name
// * "@next", the next target in the promotion sequence
string destination_target_id = 2 [(google.api.field_behavior) = OPTIONAL];

// Required. Schedule in crontab format. e.g. "0 9 * * 1" for every Monday at
// 9am.
string schedule = 3 [(google.api.field_behavior) = REQUIRED];

// Required. The time zone in IANA format [IANA Time Zone
// Database](https://www.iana.org/time-zones) (e.g. America/New_York).
string time_zone = 4 [(google.api.field_behavior) = REQUIRED];

// Output only. Information around the state of the Automation rule.
AutomationRuleCondition condition = 5
[(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. The starting phase of the rollout created by this rule. Default
// to the first phase.
string destination_phase = 6 [(google.api.field_behavior) = OPTIONAL];
}

// The `PromoteRelease` rule will automatically promote a release from the
// current target to a specified target.
message PromoteReleaseRule {
Expand Down Expand Up @@ -4284,6 +4323,34 @@ message AutomationRuleCondition {
// Optional. Details around targets enumerated in the rule.
TargetsPresentCondition targets_present_condition = 1
[(google.api.field_behavior) = OPTIONAL];

// Details specific to the automation rule type.
oneof rule_type_condition {
// Optional. TimedPromoteReleaseCondition contains rule conditions specific
// to a an Automation with a timed promote release rule defined.
TimedPromoteReleaseCondition timed_promote_release_condition = 2
[(google.api.field_behavior) = OPTIONAL];
}
}

// `TimedPromoteReleaseCondition` contains conditions specific to an Automation
// with a Timed Promote Release rule defined.
message TimedPromoteReleaseCondition {
// The targets involved in a single timed promotion.
message Targets {
// Optional. The source target ID.
string source_target_id = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. The destination target ID.
string destination_target_id = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Output only. When the next scheduled promotion(s) will occur.
google.protobuf.Timestamp next_promotion_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. A list of targets involved in the upcoming timed promotion(s).
repeated Targets targets_list = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// The request object for `CreateAutomation`.
Expand Down Expand Up @@ -4521,9 +4588,9 @@ message AutomationRun {
Automation automation_snapshot = 6
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The ID of the target that represents the promotion stage that
// initiates the `AutomationRun`. The value of this field is the last segment
// of a target name.
// Output only. The ID of the source target that initiates the
// `AutomationRun`. The value of this field is the last segment of a target
// name.
string target_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Current state of the `AutomationRun`.
Expand Down Expand Up @@ -4562,6 +4629,11 @@ message AutomationRun {
// Output only. Repairs a failed 'Rollout'.
RepairRolloutOperation repair_rollout_operation = 17
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Promotes a release to a specified 'Target' as defined in a
// Timed Promote Release rule.
TimedPromoteReleaseOperation timed_promote_release_operation = 19
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Output only. Earliest time the `AutomationRun` will attempt to resume.
Expand Down Expand Up @@ -4624,6 +4696,20 @@ message RepairRolloutOperation {
string job_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Contains the information of an automated timed promote-release operation.
message TimedPromoteReleaseOperation {
// Output only. The ID of the target that represents the promotion stage to
// which the release will be promoted. The value of this field is the last
// segment of a target name.
string target_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The name of the release to be promoted.
string release = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The starting phase of the rollout created by this operation.
string phase = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// RepairPhase tracks the repair attempts that have been made for
// each `RepairPhaseConfig` specified in the `Automation` resource.
message RepairPhase {
Expand Down
Loading
Loading