Repository navigation
fix: Ensure that representative but not deployable snapshots use the Prod physical models consistently #6065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a4cf88c
0c03fc2
b880f77
f83d29e
a1be70b
e6836f7
b1a8ba2
c031462
0fa1cad
e7b7b99
1cbdecc
ffb5c62
528cd3b
1b702f3
a37847d
960603b
7bc1fa3
4aa9c72
9514eaf
fed3297
d8a8a64
409227f
bb4508d
09f2b0f
2e0c0ff
597c4b0
900c82d
74227b3
8d76d98
a30c2a0
c9f245e
02854a2
9c8e1a5
0ca3162
96a9a16
0e23f60
189baa1
4201d3c
0d989f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,6 +185,7 @@ def merged_missing_intervals( | |
| ignore_cron=ignore_cron, | ||
| end_bounded=end_bounded, | ||
| ) | ||
|
|
||
| # Filtering snapshots after computing missing intervals because we need all snapshots in order | ||
| # to correctly infer start dates. | ||
| if selected_snapshots is not None: | ||
|
|
@@ -851,16 +852,10 @@ def _run_or_audit( | |
| else: | ||
| environment_naming_info = environment | ||
|
|
||
| deployability_index = deployability_index or ( | ||
| DeployabilityIndex.create(self.snapshots.values(), start=start) | ||
| if environment_naming_info.name != c.PROD | ||
| else DeployabilityIndex.all_deployable() | ||
| ) | ||
| execution_time = execution_time or now_timestamp() | ||
|
|
||
| self.state_sync.refresh_snapshot_intervals(self.snapshots.values()) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I didn't catch this before, but you'll want to move |
||
| for s_id, interval in (remove_intervals or {}).items(): | ||
| self.snapshots[s_id].remove_interval(interval) | ||
| execution_time = execution_time or now_timestamp() | ||
|
|
||
| all_auto_restatement_triggers: t.Dict[SnapshotId, t.List[SnapshotId]] = {} | ||
| if auto_restatement_enabled: | ||
|
|
@@ -872,6 +867,12 @@ def _run_or_audit( | |
| {s.name_version: s.next_auto_restatement_ts for s in self.snapshots.values()} | ||
| ) | ||
|
|
||
| deployability_index = deployability_index or ( | ||
| DeployabilityIndex.create(self.snapshots.values(), start=start) | ||
| if environment_naming_info.name != c.PROD | ||
| else DeployabilityIndex.all_deployable() | ||
| ) | ||
|
|
||
| merged_intervals = self.merged_missing_intervals( | ||
| start, | ||
| end, | ||
|
|
@@ -1083,7 +1084,9 @@ def merged_missing_intervals( | |
| restatements = restatements or {} | ||
| validate_date_range(start, end) | ||
|
|
||
| return compute_interval_params( | ||
| deployability_index = deployability_index or DeployabilityIndex.all_deployable() | ||
|
|
||
| snapshots_to_intervals = compute_interval_params( | ||
| snapshots, | ||
| start=start or earliest_start_date(snapshots), | ||
| end=end or now_timestamp(), | ||
|
|
@@ -1096,6 +1099,15 @@ def merged_missing_intervals( | |
| end_bounded=end_bounded, | ||
| ) | ||
|
|
||
| if snapshots: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Along with the audit bug fix, this needs to be: This will have have a dev |
||
| snapshots_to_intervals = { | ||
| snapshot: interval | ||
| for snapshot, interval in snapshots_to_intervals.items() | ||
| if deployability_index.is_eligible_for_physical_layer(snapshot) | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| } | ||
|
|
||
| return snapshots_to_intervals | ||
|
|
||
|
|
||
| def compute_interval_params( | ||
| snapshots: t.Collection[Snapshot], | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.