Skip to content

Commit

Permalink
claire/add-flag-to-skip-dimension-matching-check
Browse files Browse the repository at this point in the history
  • Loading branch information
clairelin135 committed Jan 9, 2024
1 parent 1a16fb0 commit 464c840
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const LaunchAssetChoosePartitionsDialogBody = ({
return mergedAssetHealth([]);
}
if (target.type === 'job' || assetHealthLoading) {
return mergedAssetHealth(assetHealth);
return mergedAssetHealth(assetHealth, true);
}
return assetHealth.find(itemWithAssetKey(target.anchorAssetKey)) || mergedAssetHealth([]);
}, [assetHealth, assetHealthLoading, target]);
Expand Down Expand Up @@ -428,7 +428,7 @@ const LaunchAssetChoosePartitionsDialogBody = ({
if (target.type === 'pureWithAnchorAsset') {
notices.push(
`Dagster will materialize all partitions downstream of the ` +
`selected partitions for the selected assets, using separate runs
`selected partitions for the selected assets, using separate runs
${backfillPolicyVaries ? `and obeying backfill policies.` : `as needed.`}`,
);
} else if (backfillPolicyVaries) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ the asset health bar you see is a flattened representation of the health of all
"show per-asset health" button beneath.
*/
export function mergedAssetHealth(assetHealth: PartitionHealthData[]): PartitionHealthDataMerged {
export function mergedAssetHealth(
assetHealth: PartitionHealthData[],
skipDimensionLengthsMatchingCheck: boolean = false,
): PartitionHealthDataMerged {
if (!assetHealth.length) {
return {
dimensions: [],
Expand All @@ -57,7 +60,8 @@ export function mergedAssetHealth(assetHealth: PartitionHealthData[]): Partition
h.dimensions.every(
(dim, idx) => dim.partitionKeys.length === dimensions[idx]!.partitionKeys.length,
),
)
) &&
!skipDimensionLengthsMatchingCheck
) {
throw new Error(
'Attempting to show unified asset health for assets with dimension of different lengths',
Expand Down

0 comments on commit 464c840

Please sign in to comment.