diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 5e0c615af..b24d412d0 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -7104,7 +7104,37 @@ "format": "date-time" }, "drainageStatus": { - "$ref": "#/definitions/v1VersionDrainageStatus" + "$ref": "#/definitions/v1VersionDrainageStatus", + "description": "Deprecated. Use `drainage_info` instead." + }, + "drainageInfo": { + "$ref": "#/definitions/v1VersionDrainageInfo", + "title": "Information about workflow drainage to help the user determine when it is safe\nto decommission a Version. Not present while version is current or ramping" + }, + "currentSinceTime": { + "type": "string", + "format": "date-time", + "description": "Unset if not current." + }, + "rampingSinceTime": { + "type": "string", + "format": "date-time", + "description": "Unset if not ramping. Updated when the version first starts ramping, not on each ramp change." + }, + "routingUpdateTime": { + "type": "string", + "format": "date-time", + "description": "Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed." + }, + "firstActivationTime": { + "type": "string", + "format": "date-time", + "description": "Timestamp when this version first became current or ramping." + }, + "lastDeactivationTime": { + "type": "string", + "format": "date-time", + "description": "Timestamp when this version last stopped being current or ramping." } } }, @@ -14933,12 +14963,22 @@ "currentSinceTime": { "type": "string", "format": "date-time", - "description": "\nNil if not current." + "description": "\nUnset if not current." }, "rampingSinceTime": { "type": "string", "format": "date-time", - "description": "\nNil if not ramping. Updated when the version first starts ramping, not on each ramp change." + "description": "\nUnset if not ramping. Updated when the version first starts ramping, not on each ramp change." + }, + "firstActivationTime": { + "type": "string", + "format": "date-time", + "description": "Timestamp when this version first became current or ramping." + }, + "lastDeactivationTime": { + "type": "string", + "format": "date-time", + "description": "Timestamp when this version last stopped being current or ramping." }, "rampPercentage": { "type": "number", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 28aab1cfb..7468f857e 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -12221,7 +12221,40 @@ components: - VERSION_DRAINAGE_STATUS_DRAINING - VERSION_DRAINAGE_STATUS_DRAINED type: string + description: Deprecated. Use `drainage_info` instead. format: enum + drainageInfo: + allOf: + - $ref: '#/components/schemas/VersionDrainageInfo' + description: |- + Information about workflow drainage to help the user determine when it is safe + to decommission a Version. Not present while version is current or ramping + currentSinceTime: + type: string + description: |- + Unset if not current. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) + format: date-time + rampingSinceTime: + type: string + description: |- + Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) + format: date-time + routingUpdateTime: + type: string + description: Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed. + format: date-time + firstActivationTime: + type: string + description: Timestamp when this version first became current or ramping. + format: date-time + lastDeactivationTime: + type: string + description: Timestamp when this version last stopped being current or ramping. + format: date-time WorkerDeploymentOptions: type: object properties: @@ -12290,14 +12323,22 @@ components: description: |- (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - Nil if not current. + Unset if not current. format: date-time rampingSinceTime: type: string description: |- (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - Nil if not ramping. Updated when the version first starts ramping, not on each ramp change. + Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. + format: date-time + firstActivationTime: + type: string + description: Timestamp when this version first became current or ramping. + format: date-time + lastDeactivationTime: + type: string + description: Timestamp when this version last stopped being current or ramping. format: date-time rampPercentage: type: number diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index ead82fcdf..15b9230db 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -107,14 +107,19 @@ message WorkerDeploymentVersionInfo { // (-- api-linter: core::0140::prepositions=disabled // aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - // Nil if not current. + // Unset if not current. google.protobuf.Timestamp current_since_time = 5; // (-- api-linter: core::0140::prepositions=disabled // aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) - // Nil if not ramping. Updated when the version first starts ramping, not on each ramp change. + // Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. google.protobuf.Timestamp ramping_since_time = 6; + // Timestamp when this version first became current or ramping. + google.protobuf.Timestamp first_activation_time = 12; + // Timestamp when this version last stopped being current or ramping. + google.protobuf.Timestamp last_deactivation_time = 13; + // Range: [0, 100]. Must be zero if the version is not ramping (i.e. `ramping_since_time` is nil). // Can be in the range [0, 100] if the version is ramping. float ramp_percentage = 7; @@ -193,7 +198,25 @@ message WorkerDeploymentInfo { // Required. WorkerDeploymentVersion deployment_version = 4; google.protobuf.Timestamp create_time = 2; + // Deprecated. Use `drainage_info` instead. enums.v1.VersionDrainageStatus drainage_status = 3; + // Information about workflow drainage to help the user determine when it is safe + // to decommission a Version. Not present while version is current or ramping + VersionDrainageInfo drainage_info = 5; + // Unset if not current. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) + google.protobuf.Timestamp current_since_time = 6; + // Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) + google.protobuf.Timestamp ramping_since_time = 7; + // Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed. + google.protobuf.Timestamp routing_update_time = 8; + // Timestamp when this version first became current or ramping. + google.protobuf.Timestamp first_activation_time = 9; + // Timestamp when this version last stopped being current or ramping. + google.protobuf.Timestamp last_deactivation_time = 10; } }