|
6367 | 6367 | "versioningOverride": { |
6368 | 6368 | "$ref": "#/definitions/v1VersioningOverride", |
6369 | 6369 | "description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." |
| 6370 | + }, |
| 6371 | + "priority": { |
| 6372 | + "$ref": "#/definitions/v1Priority", |
| 6373 | + "title": "Priority metadata" |
6370 | 6374 | } |
6371 | 6375 | } |
6372 | 6376 | }, |
|
6552 | 6556 | "versioningOverride": { |
6553 | 6557 | "$ref": "#/definitions/v1VersioningOverride", |
6554 | 6558 | "description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." |
| 6559 | + }, |
| 6560 | + "priority": { |
| 6561 | + "$ref": "#/definitions/v1Priority", |
| 6562 | + "title": "Priority metadata" |
6555 | 6563 | } |
6556 | 6564 | } |
6557 | 6565 | }, |
|
7179 | 7187 | "useWorkflowBuildId": { |
7180 | 7188 | "type": "boolean", |
7181 | 7189 | "description": "If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise,\nAssignment rules of the activity's Task Queue will be used to determine the Build ID." |
| 7190 | + }, |
| 7191 | + "priority": { |
| 7192 | + "$ref": "#/definitions/v1Priority", |
| 7193 | + "description": "Priority metadata. If this message is not present, or any fields are not\npresent, they inherit the values from the workflow." |
7182 | 7194 | } |
7183 | 7195 | } |
7184 | 7196 | }, |
|
9729 | 9741 | "versioningOverride": { |
9730 | 9742 | "$ref": "#/definitions/v1VersioningOverride", |
9731 | 9743 | "description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." |
| 9744 | + }, |
| 9745 | + "priority": { |
| 9746 | + "$ref": "#/definitions/v1Priority", |
| 9747 | + "title": "Priority metadata" |
9732 | 9748 | } |
9733 | 9749 | }, |
9734 | 9750 | "description": "NewWorkflowExecutionInfo is a shared message that encapsulates all the\nrequired arguments to starting a workflow in different contexts." |
|
10100 | 10116 | "lastDeployment": { |
10101 | 10117 | "$ref": "#/definitions/v1Deployment", |
10102 | 10118 | "description": "The deployment this activity was dispatched to most recently. Present only if the activity\nwas dispatched to a versioned worker." |
| 10119 | + }, |
| 10120 | + "priority": { |
| 10121 | + "$ref": "#/definitions/v1Priority", |
| 10122 | + "title": "Priority metadata" |
10103 | 10123 | } |
10104 | 10124 | } |
10105 | 10125 | }, |
|
10320 | 10340 | "retryPolicy": { |
10321 | 10341 | "$ref": "#/definitions/v1RetryPolicy", |
10322 | 10342 | "description": "This is the retry policy the service uses which may be different from the one provided\n(or not) during activity scheduling. The service can override the provided one if some\nvalues are not specified or exceed configured system limits." |
| 10343 | + }, |
| 10344 | + "priority": { |
| 10345 | + "$ref": "#/definitions/v1Priority", |
| 10346 | + "title": "Priority metadata" |
10323 | 10347 | } |
10324 | 10348 | } |
10325 | 10349 | }, |
|
10452 | 10476 | } |
10453 | 10477 | } |
10454 | 10478 | }, |
| 10479 | + "v1Priority": { |
| 10480 | + "type": "object", |
| 10481 | + "properties": { |
| 10482 | + "priorityKey": { |
| 10483 | + "type": "integer", |
| 10484 | + "format": "int32", |
| 10485 | + "description": "Priority key is a positive integer from 1 to n, where smaller integers\ncorrespond to higher priorities (tasks run sooner). In general, tasks in\na queue should be processed in close to priority order, although small\ndeviations are possible.\n\nThe maximum priority value (minimum priority) is determined by server\nconfiguration, and defaults to 5.\n\nIf priority is not present (or zero), then the effective priority will be\nthe default priority, which is is calculated by (min+max)/2. With the\ndefault max of 5, and min of 1, that comes out to 3." |
| 10486 | + }, |
| 10487 | + "fairnessKey": { |
| 10488 | + "type": "string", |
| 10489 | + "description": "Fairness key is a short string that's used as a key for a fairness\nbalancing mechanism. It may correspond to a tenant id, or to a fixed\nstring like \"high\" or \"low\". The default is the empty string.\n\nThe fairness mechanism attempts to dispatch tasks for a given key in\nproportion to its weight. For example, using a thousand distinct tenant\nids, each with a weight of 1.0 (the default) will result in each tenant\ngetting a roughly equal share of task dispatch throughput.\n\n(Note: this does not imply equal share of worker capacity! Fairness\ndecisions are made only at dispatch time based on queue statistics, not\ncurrent worker load.)\n\nAs another example, using keys \"high\" and \"low\" with weight 9.0 and 1.0\nrespectively will prefer dispatching \"high\" tasks over \"low\" tasks at a\n9:1 ratio, while allowing either key to use all worker capacity if the\nother is not present.\n\nAll fairness mechanisms, including rate limits, are best-effort and\nprobabilistic. The results may not match what a \"perfect\" algorithm with\ninfinite resources would produce. The more unique keys are used, the less\naccurate the results will be.\n\nFairness keys are limited to 64 bytes." |
| 10490 | + }, |
| 10491 | + "fairnessWeight": { |
| 10492 | + "type": "number", |
| 10493 | + "format": "float", |
| 10494 | + "description": "Fairness weight for a task can come from multiple sources for\nflexibility. From highest to lowest precedence:\n1. Weights for a small set of keys can be overridden in task queue\n configuration with an API.\n2. It can be attached to the workflow/activity in this field.\n3. The default weight of 1.0 will be used.\nNote that if the weight for a key is attached in this field, for best\nresults, the same weight should be used for the same key for a reasonable\namount of time (minutes). It may change, but it may take some time for\nthe change to be reflected.\n\nThe recommended range of usable weights is [0.001, 1000]." |
| 10495 | + }, |
| 10496 | + "fairnessRateLimit": { |
| 10497 | + "type": "number", |
| 10498 | + "format": "float", |
| 10499 | + "description": "The fairness mechanism can also enforce rate limits per fairness key.\nRate limits are specified in tasks dispatched per second.\nAs with weights, rate limits can come from different sources:\n1. Rate limits for a small set of keys can be overridden in task queue\n configuration with an API.\n2. It can be attached to the workflow/activity in this field.\n3. The \"default\" rate limit for keys that are not overridden can be set\n in task queue configuration also.\n4. Otherwise, a very high rate limit will be applied." |
| 10500 | + }, |
| 10501 | + "orderingKey": { |
| 10502 | + "type": "string", |
| 10503 | + "format": "int64", |
| 10504 | + "description": "Ordering key is a positive integer from 1 to MaxInt64. After priority and\nfairness mechanisms are applied, tasks will be finally ordered by\nordering_key. Note that fine-grained values are allowed here, as opposed\nto priority.\n\nFor example, applications might use the start time of a workflow (in\nseconds since the unix epoch) as ordering key for the workflow and all\nactivities in it. This will have the effect of prioritizing activities of\nworkflows that were started earlier, encouring completing older workflows\nover making progress in newer ones." |
| 10505 | + } |
| 10506 | + }, |
| 10507 | + "description": "Priority contains metadata that controls relative ordering of task processing\nwhen tasks are backed up in a queue. Initially, Priority will be used in\nmatching (workflow and activity) task queues. Later it may be used in history\ntask queues and in rate limiting decisions.\n\nPriority is attached to workflows and activities. By default, activities\ninherit Priority from the workflow that created them, but may override fields\nwhen an activity is started or modified.\n\nDespite being named \"Priority\", this message also contains fields that\ncontrol \"fairness\" mechanisms.\n\nFor all fields, the field not present or equal to zero/empty string means to\ninherit the value from the calling workflow, or if there is no calling\nworkflow, then use the default value.\n\nFor all fields other than fairness_key, the zero value isn't meaningful so\nthere's no confusion between inherit/default and a meaningful value. For\nfairness_key, the empty string will be interpreted as \"inherit\". This means\nthat if a workflow has a non-empty fairness key, you can't override the\nfairness key of its activity to the empty string.\n\nThe overall semantics of Priority are:\n1. First, consider \"priority\": higher priority (lower number) goes first.\n2. Next, consider fairness: try to dispatch tasks for different fairness keys\n in proportion to their weight.\n3. Finally, tasks may be ordered by an additional ordering key.\n\nApplications may use any subset of mechanisms that are useful to them and\nleave the other fields to use default values.\n\nNot all queues in the system may support the \"full\" semantics of all priority\nfields. (Currently only support in matching task queues is planned.)" |
| 10508 | + }, |
10455 | 10509 | "v1ProtocolMessageCommandAttributes": { |
10456 | 10510 | "type": "object", |
10457 | 10511 | "properties": { |
|
11158 | 11212 | "useWorkflowBuildId": { |
11159 | 11213 | "type": "boolean", |
11160 | 11214 | "description": "If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise,\nAssignment rules of the activity's Task Queue will be used to determine the Build ID." |
| 11215 | + }, |
| 11216 | + "priority": { |
| 11217 | + "$ref": "#/definitions/v1Priority", |
| 11218 | + "description": "Priority metadata. If this message is not present, or any fields are not\npresent, they inherit the values from the workflow." |
11161 | 11219 | } |
11162 | 11220 | } |
11163 | 11221 | }, |
|
11703 | 11761 | "inheritBuildId": { |
11704 | 11762 | "type": "boolean", |
11705 | 11763 | "description": "If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment\nrules of the child's Task Queue will be used to independently assign a Build ID to it." |
| 11764 | + }, |
| 11765 | + "priority": { |
| 11766 | + "$ref": "#/definitions/v1Priority", |
| 11767 | + "description": "Priority metadata. If this message is not present, or any fields are not\npresent, they inherit the values from the workflow." |
11706 | 11768 | } |
11707 | 11769 | } |
11708 | 11770 | }, |
|
11820 | 11882 | "inheritBuildId": { |
11821 | 11883 | "type": "boolean", |
11822 | 11884 | "description": "If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment\nrules of the child's Task Queue will be used to independently assign a Build ID to it." |
| 11885 | + }, |
| 11886 | + "priority": { |
| 11887 | + "$ref": "#/definitions/v1Priority", |
| 11888 | + "title": "Priority metadata" |
11823 | 11889 | } |
11824 | 11890 | } |
11825 | 11891 | }, |
|
12008 | 12074 | "versioningOverride": { |
12009 | 12075 | "$ref": "#/definitions/v1VersioningOverride", |
12010 | 12076 | "description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." |
| 12077 | + }, |
| 12078 | + "priority": { |
| 12079 | + "$ref": "#/definitions/v1Priority", |
| 12080 | + "title": "Priority metadata" |
12011 | 12081 | } |
12012 | 12082 | } |
12013 | 12083 | }, |
|
13059 | 13129 | "versioningInfo": { |
13060 | 13130 | "$ref": "#/definitions/v1WorkflowExecutionVersioningInfo", |
13061 | 13131 | "description": "Absent value means the workflow execution is not versioned. When present, the execution might\nbe versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`.\nExperimental. Versioning info is experimental and might change in the future." |
| 13132 | + }, |
| 13133 | + "priority": { |
| 13134 | + "$ref": "#/definitions/v1Priority", |
| 13135 | + "title": "Priority metadata" |
13062 | 13136 | } |
13063 | 13137 | }, |
13064 | 13138 | "description": "Hold basic information about a workflow execution.\nThis structure is a part of visibility, and thus contain a limited subset of information." |
|
13245 | 13319 | "versioningOverride": { |
13246 | 13320 | "$ref": "#/definitions/v1VersioningOverride", |
13247 | 13321 | "description": "Versioning override applied to this workflow when it was started." |
| 13322 | + }, |
| 13323 | + "priority": { |
| 13324 | + "$ref": "#/definitions/v1Priority", |
| 13325 | + "title": "Priority metadata" |
13248 | 13326 | } |
13249 | 13327 | }, |
13250 | 13328 | "title": "Always the first event in workflow history" |
|
0 commit comments