@@ -588,7 +588,7 @@ def name_version(self) -> SnapshotNameVersion:
588588 return SnapshotNameVersion (name = self .name , version = self .version )
589589
590590
591- class MinimalSnapshot (PydanticModel ):
591+ class SnapshotIdAndVersion (PydanticModel ):
592592 """A stripped down version of a snapshot that is used in situations where we want to fetch the main fields of the snapshots table
593593 without the overhead of parsing the full snapshot payload and fetching intervals.
594594 """
@@ -597,7 +597,7 @@ class MinimalSnapshot(PydanticModel):
597597 version : str
598598 dev_version_ : t .Optional [str ] = Field (alias = "dev_version" )
599599 identifier : str
600- fingerprint : SnapshotFingerprint
600+ fingerprint_ : t . Union [ str , SnapshotFingerprint ] = Field ( alias = "fingerprint" )
601601
602602 @property
603603 def snapshot_id (self ) -> SnapshotId :
@@ -607,6 +607,13 @@ def snapshot_id(self) -> SnapshotId:
607607 def name_version (self ) -> SnapshotNameVersion :
608608 return SnapshotNameVersion (name = self .name , version = self .version )
609609
610+ @property
611+ def fingerprint (self ) -> SnapshotFingerprint :
612+ value = self .fingerprint_
613+ if isinstance (value , str ):
614+ self .fingerprint_ = value = SnapshotFingerprint .parse_raw (value )
615+ return value
616+
610617 @property
611618 def dev_version (self ) -> str :
612619 return self .dev_version_ or self .fingerprint .to_version ()
@@ -1487,9 +1494,11 @@ class SnapshotTableCleanupTask(PydanticModel):
14871494 dev_table_only : bool
14881495
14891496
1490- SnapshotIdLike = t .Union [SnapshotId , SnapshotTableInfo , MinimalSnapshot , Snapshot ]
1497+ SnapshotIdLike = t .Union [SnapshotId , SnapshotTableInfo , SnapshotIdAndVersion , Snapshot ]
14911498SnapshotInfoLike = t .Union [SnapshotTableInfo , Snapshot ]
1492- SnapshotNameVersionLike = t .Union [SnapshotNameVersion , SnapshotTableInfo , MinimalSnapshot , Snapshot ]
1499+ SnapshotNameVersionLike = t .Union [
1500+ SnapshotNameVersion , SnapshotTableInfo , SnapshotIdAndVersion , Snapshot
1501+ ]
14931502
14941503
14951504class DeployabilityIndex (PydanticModel , frozen = True ):
0 commit comments