diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service/gapic_version.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service/gapic_version.py index 0688549d000d..558c8aab67c5 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service/gapic_version.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.12.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/gapic_version.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/gapic_version.py index 0688549d000d..558c8aab67c5 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/gapic_version.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.12.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/__init__.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/__init__.py index 1e53dbea48d4..85ed7ebc134a 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/__init__.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/__init__.py @@ -23,6 +23,7 @@ from .services.environments import EnvironmentsAsyncClient, EnvironmentsClient from .services.image_versions import ImageVersionsAsyncClient, ImageVersionsClient from .types.environments import ( + AirflowMetadataRetentionPolicyConfig, CheckUpgradeRequest, CheckUpgradeResponse, CloudDataLineageIntegration, @@ -94,6 +95,7 @@ __all__ = ( "EnvironmentsAsyncClient", "ImageVersionsAsyncClient", + "AirflowMetadataRetentionPolicyConfig", "CheckUpgradeRequest", "CheckUpgradeResponse", "CloudDataLineageIntegration", diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py index 0688549d000d..558c8aab67c5 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.12.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/types/__init__.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/types/__init__.py index 018e10860877..0a12b6cd1c3f 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/types/__init__.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/types/__init__.py @@ -14,6 +14,7 @@ # limitations under the License. # from .environments import ( + AirflowMetadataRetentionPolicyConfig, CheckUpgradeRequest, CheckUpgradeResponse, CloudDataLineageIntegration, @@ -83,6 +84,7 @@ from .operations import OperationMetadata __all__ = ( + "AirflowMetadataRetentionPolicyConfig", "CheckUpgradeRequest", "CheckUpgradeResponse", "CloudDataLineageIntegration", diff --git a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/types/environments.py b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/types/environments.py index 33c7b7195135..b83e81eb209b 100644 --- a/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/types/environments.py +++ b/packages/google-cloud-orchestration-airflow/google/cloud/orchestration/airflow/service_v1beta1/types/environments.py @@ -76,6 +76,7 @@ "WorkloadsConfig", "DataRetentionConfig", "TaskLogsRetentionConfig", + "AirflowMetadataRetentionPolicyConfig", "StorageConfig", "RecoveryConfig", "ScheduledSnapshotsConfig", @@ -1443,9 +1444,11 @@ class EnvironmentConfig(proto.Message): multiple chunks, each with a size of at least 4 hours. - If this value is omitted, Cloud Composer - components may be subject to maintenance at any - time. + If this value is omitted, the default value for + maintenance window is applied. By default, + maintenance windows are from 00:00:00 to + 04:00:00 (GMT) on Friday, Saturday, and Sunday + every week. workloads_config (google.cloud.orchestration.airflow.service_v1beta1.types.WorkloadsConfig): Optional. The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. The @@ -2608,6 +2611,9 @@ class TriggererResource(proto.Message): class DagProcessorResource(proto.Message): r"""Configuration for resources used by Airflow DAG processors. + This field is supported for Cloud Composer environments in versions + composer-3.\ *.*-airflow-*.*.\* and newer. + Attributes: cpu (float): Optional. CPU request and limit for a single @@ -2673,16 +2679,36 @@ class DataRetentionConfig(proto.Message): mechanism. Attributes: + airflow_database_retention_days (int): + Optional. The number of days describing for + how long to store event-based records in airflow + database. If the retention mechanism is enabled + this value must be a positive integer otherwise, + value should be set to 0. task_logs_retention_config (google.cloud.orchestration.airflow.service_v1beta1.types.TaskLogsRetentionConfig): Optional. The configuration settings for task logs retention + airflow_metadata_retention_config (google.cloud.orchestration.airflow.service_v1beta1.types.AirflowMetadataRetentionPolicyConfig): + Optional. The retention policy for airflow + metadata database. """ + airflow_database_retention_days: int = proto.Field( + proto.INT32, + number=1, + ) task_logs_retention_config: "TaskLogsRetentionConfig" = proto.Field( proto.MESSAGE, number=4, message="TaskLogsRetentionConfig", ) + airflow_metadata_retention_config: "AirflowMetadataRetentionPolicyConfig" = ( + proto.Field( + proto.MESSAGE, + number=5, + message="AirflowMetadataRetentionPolicyConfig", + ) + ) class TaskLogsRetentionConfig(proto.Message): @@ -2691,8 +2717,7 @@ class TaskLogsRetentionConfig(proto.Message): Attributes: storage_mode (google.cloud.orchestration.airflow.service_v1beta1.types.TaskLogsRetentionConfig.TaskLogsStorageMode): Optional. The mode of storage for Airflow - workers task logs. For details, see - go/composer-store-task-logs-in-cloud-logging-only-design-doc + workers task logs. """ class TaskLogsStorageMode(proto.Enum): @@ -2719,6 +2744,45 @@ class TaskLogsStorageMode(proto.Enum): ) +class AirflowMetadataRetentionPolicyConfig(proto.Message): + r"""The policy for airflow metadata database retention. + + Attributes: + retention_mode (google.cloud.orchestration.airflow.service_v1beta1.types.AirflowMetadataRetentionPolicyConfig.RetentionMode): + Optional. Retention can be either enabled or + disabled. + retention_days (int): + Optional. How many days data should be + retained for. + """ + + class RetentionMode(proto.Enum): + r"""Describes retention policy. + + Values: + RETENTION_MODE_UNSPECIFIED (0): + Default mode doesn't change environment + parameters. + RETENTION_MODE_ENABLED (1): + Retention policy is enabled. + RETENTION_MODE_DISABLED (2): + Retention policy is disabled. + """ + RETENTION_MODE_UNSPECIFIED = 0 + RETENTION_MODE_ENABLED = 1 + RETENTION_MODE_DISABLED = 2 + + retention_mode: RetentionMode = proto.Field( + proto.ENUM, + number=1, + enum=RetentionMode, + ) + retention_days: int = proto.Field( + proto.INT32, + number=2, + ) + + class StorageConfig(proto.Message): r"""The configuration for data storage in the environment. diff --git a/packages/google-cloud-orchestration-airflow/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json index b85d03b7e36d..3fffc7af33c9 100644 --- a/packages/google-cloud-orchestration-airflow/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-orchestration-airflow", - "version": "1.12.2" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-orchestration-airflow/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json index 212a148e95a5..4c413d500bdb 100644 --- a/packages/google-cloud-orchestration-airflow/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow/samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-orchestration-airflow-service", - "version": "1.12.2" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_environments.py b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_environments.py index 3065d1a2d3eb..caa5f98019f7 100644 --- a/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_environments.py +++ b/packages/google-cloud-orchestration-airflow/tests/unit/gapic/service_v1beta1/test_environments.py @@ -10931,7 +10931,12 @@ def test_create_environment_rest(request_type): } }, "data_retention_config": { - "task_logs_retention_config": {"storage_mode": 1} + "airflow_database_retention_days": 3279, + "task_logs_retention_config": {"storage_mode": 1}, + "airflow_metadata_retention_config": { + "retention_mode": 1, + "retention_days": 1512, + }, }, "resilience_mode": 1, }, @@ -11856,7 +11861,12 @@ def test_update_environment_rest(request_type): } }, "data_retention_config": { - "task_logs_retention_config": {"storage_mode": 1} + "airflow_database_retention_days": 3279, + "task_logs_retention_config": {"storage_mode": 1}, + "airflow_metadata_retention_config": { + "retention_mode": 1, + "retention_days": 1512, + }, }, "resilience_mode": 1, },