@@ -114,9 +114,9 @@ def create_plan_dag_spec(
114114 for s , interval in intervals_to_remove :
115115 all_snapshots [s .snapshot_id ].remove_interval (interval )
116116
117- initial_deployability_index = DeployabilityIndex .create (all_snapshots )
118- deployability_index = (
119- initial_deployability_index if request .is_dev else DeployabilityIndex .all_deployable ()
117+ deployability_index_for_creation = DeployabilityIndex .create (all_snapshots )
118+ deployability_index_for_evaluation = (
119+ deployability_index_for_creation if request .is_dev else DeployabilityIndex .all_deployable ()
120120 )
121121
122122 if not request .skip_backfill :
@@ -125,7 +125,7 @@ def create_plan_dag_spec(
125125 start = request .environment .start_at ,
126126 end = end ,
127127 execution_time = now (),
128- deployability_index = deployability_index ,
128+ deployability_index = deployability_index_for_evaluation ,
129129 restatements = request .restatements ,
130130 ignore_cron = True ,
131131 )
@@ -136,13 +136,17 @@ def create_plan_dag_spec(
136136 common .BackfillIntervalsPerSnapshot (
137137 snapshot_id = s .snapshot_id ,
138138 intervals = intervals ,
139- before_promote = request .is_dev or initial_deployability_index .is_representative (s ),
139+ before_promote = request .is_dev or deployability_index_for_creation .is_representative (s ),
140140 )
141141 for s , intervals in backfill_batches .items ()
142142 ]
143143
144144 no_gaps_snapshot_names = (
145- {s .name for s in all_snapshots .values () if initial_deployability_index .is_representative (s )}
145+ {
146+ s .name
147+ for s in all_snapshots .values ()
148+ if deployability_index_for_creation .is_representative (s )
149+ }
146150 if request .no_gaps and not request .is_dev
147151 else None
148152 if request .no_gaps
@@ -170,7 +174,8 @@ def create_plan_dag_spec(
170174 forward_only = request .forward_only ,
171175 environment_expiration_ts = request .environment .expiration_ts ,
172176 dag_start_ts = to_timestamp (now_dt ),
173- deployability_index = deployability_index ,
177+ deployability_index = deployability_index_for_evaluation ,
178+ deployability_index_for_creation = deployability_index_for_creation ,
174179 no_gaps_snapshot_names = no_gaps_snapshot_names ,
175180 )
176181
0 commit comments