Skip to content

Commit 0f44538

Browse files
Google APIscopybara-github
authored andcommitted
feat: A new method CheckUpgrade is added to service Environments
feat: A new field `satisfies_pzi` is added to message `.google.cloud.orchestration.airflow.service.v1.Environment` feat: A new message `CheckUpgradeRequest` is added feat: A new field `airflow_metadata_retention_config` is added to message `.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig` feat: A new message `AirflowMetadataRetentionPolicyConfig` is added docs: A comment for field `maintenance_window` in message `.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig` is changed docs: A comment for message `WorkloadsConfig` is changed docs: A comment for field `storage_mode` in message `.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig` is changed PiperOrigin-RevId: 673766368
1 parent c27097e commit 0f44538

1 file changed

Lines changed: 83 additions & 4 deletions

File tree

google/cloud/orchestration/airflow/service/v1/environments.proto

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ service Environments {
133133
option (google.api.method_signature) = "parent";
134134
}
135135

136+
// Check if an upgrade operation on the environment will succeed.
137+
//
138+
// In case of problems detailed info can be found in the returned Operation.
139+
rpc CheckUpgrade(CheckUpgradeRequest) returns (google.longrunning.Operation) {
140+
option (google.api.http) = {
141+
post: "/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade"
142+
body: "*"
143+
};
144+
option (google.longrunning.operation_info) = {
145+
response_type: "google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse"
146+
metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata"
147+
};
148+
}
149+
136150
// Creates a user workloads Secret.
137151
//
138152
// This method is supported for Cloud Composer environments in versions
@@ -1091,8 +1105,9 @@ message EnvironmentConfig {
10911105
// This may be split into multiple chunks, each with a size of
10921106
// at least 4 hours.
10931107
//
1094-
// If this value is omitted, the default value for maintenance window will be
1095-
// applied. The default value is Saturday and Sunday 00-06 GMT.
1108+
// If this value is omitted, the default value for maintenance window is
1109+
// applied. By default, maintenance windows are from 00:00:00 to 04:00:00
1110+
// (GMT) on Friday, Saturday, and Sunday every week.
10961111
MaintenanceWindow maintenance_window = 12
10971112
[(google.api.field_behavior) = OPTIONAL];
10981113

@@ -1771,6 +1786,9 @@ message WorkloadsConfig {
17711786
}
17721787

17731788
// Configuration for resources used by Airflow DAG processors.
1789+
//
1790+
// This field is supported for Cloud Composer environments in versions
1791+
// composer-3.*.*-airflow-*.*.* and newer.
17741792
message DagProcessorResource {
17751793
// Optional. CPU request and limit for a single Airflow DAG processor
17761794
// replica.
@@ -1929,10 +1947,47 @@ message Environment {
19291947
// Output only. Reserved for future use.
19301948
bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
19311949

1950+
// Output only. Reserved for future use.
1951+
bool satisfies_pzi = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
1952+
19321953
// Optional. Storage configuration for this environment.
19331954
StorageConfig storage_config = 9 [(google.api.field_behavior) = OPTIONAL];
19341955
}
19351956

1957+
// Request to check whether image upgrade will succeed.
1958+
message CheckUpgradeRequest {
1959+
// Required. The resource name of the environment to check upgrade for, in the
1960+
// form:
1961+
// "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
1962+
string environment = 1 [(google.api.field_behavior) = REQUIRED];
1963+
1964+
// Optional. The version of the software running in the environment.
1965+
// This encapsulates both the version of Cloud Composer functionality and the
1966+
// version of Apache Airflow. It must match the regular expression
1967+
// `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
1968+
// When used as input, the server also checks if the provided version is
1969+
// supported and denies the request for an unsupported version.
1970+
//
1971+
// The Cloud Composer portion of the image version is a full
1972+
// [semantic version](https://semver.org), or an alias in the form of major
1973+
// version number or `latest`. When an alias is provided, the server replaces
1974+
// it with the current Cloud Composer version that satisfies the alias.
1975+
//
1976+
// The Apache Airflow portion of the image version is a full semantic version
1977+
// that points to one of the supported Apache Airflow versions, or an alias in
1978+
// the form of only major or major.minor versions specified. When an alias is
1979+
// provided, the server replaces it with the latest Apache Airflow version
1980+
// that satisfies the alias and is supported in the given Cloud Composer
1981+
// version.
1982+
//
1983+
// In all cases, the resolved image version is stored in the same field.
1984+
//
1985+
// See also [version
1986+
// list](/composer/docs/concepts/versioning/composer-versions) and [versioning
1987+
// overview](/composer/docs/concepts/versioning/composer-versioning-overview).
1988+
string image_version = 2 [(google.api.field_behavior) = OPTIONAL];
1989+
}
1990+
19361991
// Message containing information about the result of an upgrade check
19371992
// operation.
19381993
message CheckUpgradeResponse {
@@ -1970,6 +2025,10 @@ message CheckUpgradeResponse {
19702025

19712026
// The configuration setting for Airflow database data retention mechanism.
19722027
message DataRetentionConfig {
2028+
// Optional. The retention policy for airflow metadata database.
2029+
AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 1
2030+
[(google.api.field_behavior) = OPTIONAL];
2031+
19732032
// Optional. The configuration settings for task logs retention
19742033
TaskLogsRetentionConfig task_logs_retention_config = 2
19752034
[(google.api.field_behavior) = OPTIONAL];
@@ -1990,7 +2049,27 @@ message TaskLogsRetentionConfig {
19902049
CLOUD_LOGGING_ONLY = 2;
19912050
}
19922051

1993-
// Optional. The mode of storage for Airflow workers task logs. For details,
1994-
// see go/composer-store-task-logs-in-cloud-logging-only-design-doc
2052+
// Optional. The mode of storage for Airflow workers task logs.
19952053
TaskLogsStorageMode storage_mode = 2 [(google.api.field_behavior) = OPTIONAL];
19962054
}
2055+
2056+
// The policy for airflow metadata database retention.
2057+
message AirflowMetadataRetentionPolicyConfig {
2058+
// Describes retention policy.
2059+
enum RetentionMode {
2060+
// Default mode doesn't change environment parameters.
2061+
RETENTION_MODE_UNSPECIFIED = 0;
2062+
2063+
// Retention policy is enabled.
2064+
RETENTION_MODE_ENABLED = 1;
2065+
2066+
// Retention policy is disabled.
2067+
RETENTION_MODE_DISABLED = 2;
2068+
}
2069+
2070+
// Optional. Retention can be either enabled or disabled.
2071+
RetentionMode retention_mode = 1 [(google.api.field_behavior) = OPTIONAL];
2072+
2073+
// Optional. How many days data should be retained for.
2074+
int32 retention_days = 2 [(google.api.field_behavior) = OPTIONAL];
2075+
}

0 commit comments

Comments
 (0)