Skip to content
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

Implement data sandboxing updates #20258

Merged
merged 16 commits into from
Mar 6, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ import menu_book from '../icon-svgs/menu_book.svg';
import more_horiz from '../icon-svgs/more_horiz.svg';
import ms_teams from '../icon-svgs/ms_teams.svg';
import multi_asset from '../icon-svgs/multi_asset.svg';
import new_in_branch from '../icon-svgs/new_in_branch.svg';
import nightlight from '../icon-svgs/nightlight.svg';
import no_access from '../icon-svgs/no_access.svg';
import observation from '../icon-svgs/observation.svg';
Expand Down Expand Up @@ -310,6 +311,7 @@ export const Icons = {
menu,
menu_book,
more_horiz,
new_in_branch,
nightlight,
no_access,
people,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export const ASSET_NODE_LIVE_FRAGMENT = gql`
}
}
}
changedReasons
salazarm marked this conversation as resolved.
Show resolved Hide resolved
freshnessInfo {
...AssetNodeLiveFreshnessInfo
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {AssetNodeFragment} from './types/AssetNode.types';
import {withMiddleTruncation} from '../app/Util';
import {useAssetLiveData} from '../asset-data/AssetLiveDataProvider';
import {PartitionCountTags} from '../assets/AssetNodePartitionCounts';
import {StaleReasonsTags} from '../assets/Stale';
import {StaleReasonsTag} from '../assets/Stale';
import {AssetChecksStatusSummary} from '../assets/asset-checks/AssetChecksStatusSummary';
import {assetDetailsPathForKey} from '../assets/assetDetailsPathForKey';
import {AssetComputeKindTag} from '../graph/OpTags';
Expand All @@ -34,7 +34,7 @@ export const AssetNode = React.memo(({definition, selected}: Props) => {

return (
<AssetInsetForHoverEffect>
<AssetTopTags definition={definition} liveData={liveData} />
<StaleReasonsTag liveData={liveData} assetKey={definition.assetKey} />
salazarm marked this conversation as resolved.
Show resolved Hide resolved
<AssetNodeContainer $selected={selected}>
<AssetNodeBox $selected={selected} $isSource={isSource}>
<AssetName $isSource={isSource}>
Expand Down Expand Up @@ -63,7 +63,6 @@ export const AssetNode = React.memo(({definition, selected}: Props) => {
{definition.isPartitioned && !definition.isSource && (
<PartitionCountTags definition={definition} liveData={liveData} />
)}
<StaleReasonsTags liveData={liveData} assetKey={definition.assetKey} include="self" />
</Box>

<AssetNodeStatusRow definition={definition} liveData={liveData} />
Expand All @@ -77,17 +76,6 @@ export const AssetNode = React.memo(({definition, selected}: Props) => {
);
}, isEqual);

interface AssetTopTagsProps {
definition: AssetNodeFragment;
liveData?: LiveDataForNode;
}

const AssetTopTags = ({definition, liveData}: AssetTopTagsProps) => (
<Box flex={{gap: 4}} padding={{left: 4}} style={{height: 24}}>
<StaleReasonsTags liveData={liveData} assetKey={definition.assetKey} include="upstream" />
</Box>
);

const AssetNodeRowBox = styled(Box)`
white-space: nowrap;
line-height: 12px;
Expand Down Expand Up @@ -219,6 +207,7 @@ export const ASSET_NODE_FRAGMENT = gql`
graphName
hasMaterializePermission
jobNames
changedReasons
opNames
opVersion
description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
AssetNodeLiveMaterializationFragment,
AssetNodeLiveObservationFragment,
} from '../asset-data/types/AssetLiveDataProvider.types';
import {RunStatus, StaleStatus} from '../graphql/types';
import {ChangeReason, RunStatus, StaleStatus} from '../graphql/types';

/**
* IMPORTANT: This file is used by the WebWorker so make sure we don't indirectly import React or anything that relies on window/document
Expand Down Expand Up @@ -154,6 +154,7 @@ export interface LiveDataForNode {
staleStatus: StaleStatus | null;
staleCauses: AssetGraphLiveQuery['assetNodes'][0]['staleCauses'];
assetChecks: AssetCheckLiveFragment[];
changedReasons?: Array<ChangeReason>;
partitionStats: {
numMaterialized: number;
numMaterializing: number;
Expand All @@ -165,6 +166,7 @@ export interface LiveDataForNode {

export const MISSING_LIVE_DATA: LiveDataForNode = {
unstartedRunIds: [],
changedReasons: [],
inProgressRunIds: [],
runWhichFailedToMaterialize: null,
freshnessInfo: null,
Expand Down Expand Up @@ -217,6 +219,7 @@ export const buildLiveDataForNode = (

return {
lastMaterialization,
changedReasons: assetNode.changedReasons,
lastMaterializationRunStatus:
latestRunForAsset && lastMaterialization?.runId === latestRunForAsset?.id
? latestRunForAsset.status
Expand Down
Loading
Loading