File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed
protos/local/temporal/sdk/core/workflow_activation Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ message WorkflowActivation {
9292 // build id, if this worker was using the deprecated Build ID-only
9393 // feature(s).
9494 common.WorkerDeploymentVersion deployment_version_for_current_task = 9 ;
95+ // The last seen SDK version from the most recent WFT completed event
96+ string last_sdk_version = 10 ;
9597}
9698
9799message WorkflowActivationJob {
Original file line number Diff line number Diff line change @@ -519,6 +519,7 @@ pub mod coresdk {
519519 history_size_bytes : 0 ,
520520 continue_as_new_suggested : false ,
521521 deployment_version_for_current_task : None ,
522+ last_sdk_version : String :: new ( ) ,
522523 }
523524 }
524525
Original file line number Diff line number Diff line change @@ -203,6 +203,15 @@ impl InternalFlags {
203203 Self :: Disabled => Either :: Right ( iter:: empty ( ) ) ,
204204 }
205205 }
206+
207+ pub ( crate ) fn last_sdk_version ( & self ) -> Option < & str > {
208+ match self {
209+ InternalFlags :: Enabled {
210+ last_sdk_version, ..
211+ } if !last_sdk_version. is_empty ( ) => Some ( last_sdk_version) ,
212+ InternalFlags :: Enabled { .. } | InternalFlags :: Disabled => None ,
213+ }
214+ }
206215}
207216
208217impl CoreInternalFlags {
Original file line number Diff line number Diff line change @@ -465,6 +465,11 @@ impl WorkflowMachines {
465465 continue_as_new_suggested : self . continue_as_new_suggested ,
466466 deployment_version_for_current_task : deployment_version_for_current_task
467467 . map ( Into :: into) ,
468+ last_sdk_version : ( * self . observed_internal_flags )
469+ . borrow ( )
470+ . last_sdk_version ( )
471+ . unwrap_or_default ( )
472+ . to_owned ( ) ,
468473 }
469474 }
470475
You can’t perform that action at this time.
0 commit comments