pub struct BuildIdAssignmentRule {
pub target_build_id: String,
pub ramp: Option<Ramp>,
}Expand description
Assignment rules are applied to new Workflow and Activity executions at schedule time to assign them to a Build ID.
Assignment rules will not be used in the following cases:
- Child Workflows or Continue-As-New Executions who inherit their
parent/previous Workflow’s assigned Build ID (by setting the
inherit_build_idflag - default behavior in SDKs when the same Task Queue is used.) - An Activity that inherits the assigned Build ID of its Workflow (by
setting the
use_workflow_build_idflag - default behavior in SDKs when the same Task Queue is used.)
In absence of (applicable) redirect rules (CompatibleBuildIdRedirectRules)
the task will be dispatched to Workers of the Build ID determined by the
assignment rules (or inherited). Otherwise, the final Build ID will be
determined by the redirect rules.
Once a Workflow completes its first Workflow Task in a particular Build ID it stays in that Build ID regardless of changes to assignment rules. Redirect rules can be used to move the workflow to another compatible Build ID.
When using Worker Versioning on a Task Queue, in the steady state,
there should typically be a single assignment rule to send all new executions
to the latest Build ID. Existence of at least one such “unconditional”
rule at all times is enforces by the system, unless the force flag is used
by the user when replacing/deleting these rules (for exceptional cases).
During a deployment, one or more additional rules can be added to assign a subset of the tasks to a new Build ID based on a “ramp percentage”.
When there are multiple assignment rules for a Task Queue, the rules are evaluated in order, starting from index 0. The first applicable rule will be applied and the rest will be ignored.
In the event that no assignment rule is applicable on a task (or the Task Queue is simply not versioned), the tasks will be dispatched to an unversioned Worker.
Fields§
§target_build_id: String§ramp: Option<Ramp>If a ramp is provided, this rule will be applied only to a sample of tasks according to the provided percentage. This option can be used only on “terminal” Build IDs (the ones not used as source in any redirect rules).
Trait Implementations§
Source§impl Clone for BuildIdAssignmentRule
impl Clone for BuildIdAssignmentRule
Source§fn clone(&self) -> BuildIdAssignmentRule
fn clone(&self) -> BuildIdAssignmentRule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuildIdAssignmentRule
impl Debug for BuildIdAssignmentRule
Source§impl Default for BuildIdAssignmentRule
impl Default for BuildIdAssignmentRule
Source§impl Message for BuildIdAssignmentRule
impl Message for BuildIdAssignmentRule
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl Name for BuildIdAssignmentRule
impl Name for BuildIdAssignmentRule
Source§const NAME: &'static str = "BuildIdAssignmentRule"
const NAME: &'static str = "BuildIdAssignmentRule"
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.Source§const PACKAGE: &'static str = "temporal.api.taskqueue.v1"
const PACKAGE: &'static str = "temporal.api.taskqueue.v1"
., e.g. google.protobuf.Source§fn full_name() -> String
fn full_name() -> String
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for BuildIdAssignmentRule
impl PartialEq for BuildIdAssignmentRule
impl StructuralPartialEq for BuildIdAssignmentRule
Auto Trait Implementations§
impl Freeze for BuildIdAssignmentRule
impl RefUnwindSafe for BuildIdAssignmentRule
impl Send for BuildIdAssignmentRule
impl Sync for BuildIdAssignmentRule
impl Unpin for BuildIdAssignmentRule
impl UnsafeUnpin for BuildIdAssignmentRule
impl UnwindSafe for BuildIdAssignmentRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request