@@ -139,6 +139,7 @@ function containerAppToCreateApplication(
139139 delete ( app as Record < string , unknown > ) [ "image_build_context" ] ;
140140 delete ( app as Record < string , unknown > ) [ "image_vars" ] ;
141141 delete ( app as Record < string , unknown > ) [ "rollout_step_percentage" ] ;
142+ delete ( app as Record < string , unknown > ) [ "rollout_kind" ] ;
142143
143144 return app ;
144145}
@@ -366,6 +367,7 @@ export async function apply(
366367 id : ApplicationID ;
367368 name : ApplicationName ;
368369 rollout_step_percentage ?: number ;
370+ rollout_kind : CreateApplicationRolloutRequest . kind ;
369371 }
370372 ) [ ] = [ ] ;
371373
@@ -499,19 +501,24 @@ export async function apply(
499501 }
500502 }
501503
502- actions . push ( {
503- action : "modify" ,
504- application : createApplicationToModifyApplication ( appConfig ) ,
505- id : application . id ,
506- name : application . name ,
507- // The rollout logic is still pretty much attached
508- // to the fact of the container application using DOs.
509- // When we allow rollouts on non-DO, this should not be necessary.
510- rollout_step_percentage :
511- application . durable_objects !== undefined
512- ? appConfigNoDefaults . rollout_step_percentage ?? 25
513- : undefined ,
514- } ) ;
504+ if ( appConfigNoDefaults . rollout_kind !== "none" ) {
505+ actions . push ( {
506+ action : "modify" ,
507+ application : createApplicationToModifyApplication ( appConfig ) ,
508+ id : application . id ,
509+ name : application . name ,
510+ rollout_step_percentage :
511+ application . durable_objects !== undefined
512+ ? appConfigNoDefaults . rollout_step_percentage ?? 25
513+ : appConfigNoDefaults . rollout_step_percentage ,
514+ rollout_kind :
515+ appConfigNoDefaults . rollout_kind == "full_manual"
516+ ? CreateApplicationRolloutRequest . kind . FULL_MANUAL
517+ : CreateApplicationRolloutRequest . kind . FULL_AUTO ,
518+ } ) ;
519+ } else {
520+ log ( "Skipping application rollout" ) ;
521+ }
515522
516523 printLine ( "" ) ;
517524 continue ;
@@ -675,6 +682,7 @@ export async function apply(
675682 ( action . application
676683 . configuration as ModifyDeploymentV2RequestBody ) ?? { } ,
677684 step_percentage : action . rollout_step_percentage ,
685+ kind : action . rollout_kind ,
678686 } ) ,
679687 {
680688 json : args . json ,
0 commit comments