File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
packages/cli-v3/src/entryPoints/managed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -514,7 +514,7 @@ export class ManagedRunController {
514514 supervisorApiUrl : this . env . TRIGGER_SUPERVISOR_API_URL ,
515515 } ;
516516
517- await this . currentExecution . processEnvOverrides ( "socket disconnected" ) ;
517+ await this . currentExecution . processEnvOverrides ( "socket disconnected" , true ) ;
518518
519519 const newEnv = {
520520 workerInstanceName : this . env . TRIGGER_WORKER_INSTANCE_NAME ,
Original file line number Diff line number Diff line change @@ -896,7 +896,10 @@ export class RunExecution {
896896 /**
897897 * Processes env overrides from the metadata service. Generally called when we're resuming from a suspended state.
898898 */
899- public async processEnvOverrides ( reason ?: string ) : Promise < { overrides : Metadata } | null > {
899+ public async processEnvOverrides (
900+ reason ?: string ,
901+ shouldPollForSnapshotChanges ?: boolean
902+ ) : Promise < { overrides : Metadata } | null > {
900903 if ( ! this . metadataClient ) {
901904 return null ;
902905 }
@@ -943,6 +946,12 @@ export class RunExecution {
943946 this . httpClient . updateRunnerId ( this . env . TRIGGER_RUNNER_ID ) ;
944947 }
945948
949+ // Poll for snapshot changes immediately
950+ if ( shouldPollForSnapshotChanges ) {
951+ this . sendDebugLog ( "[override] polling for snapshot changes" , { reason } ) ;
952+ this . fetchAndProcessSnapshotChanges ( "restore" ) . catch ( ( ) => { } ) ;
953+ }
954+
946955 return {
947956 overrides,
948957 } ;
You can’t perform that action at this time.
0 commit comments