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

Fixes null run ID bug #958

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const ErrorView = (props: {

const errorAttributes = getNodeRunAttributes<AttributeError1>(
props.nodeRunData.flatMap((i) => i?.attributes || []),
props.nodeRunData.map((i) => i?.dag_run || 0),
"AttributeError1"
);
const [priorRunIndex, setPriorRunIndex] = useState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const ResultsSummaryView = (props: {

const primitive1Views = getNodeRunAttributes<AttributePrimitive1>(
props.nodeRunData.flatMap((i) => i?.attributes || []),
props.runIds,
"AttributePrimitive1"
);
if (primitive1Views.length > 0) {
Expand All @@ -162,6 +163,7 @@ export const ResultsSummaryView = (props: {
);
}


// ... [similar blocks for other attributes]

// const error1Views = getNodeRunAttributes<AttributeError1>(
Expand All @@ -180,6 +182,7 @@ export const ResultsSummaryView = (props: {

const dict1Views = getNodeRunAttributes<AttributeDict1>(
props.nodeRunData.flatMap((i) => i?.attributes || []),
props.runIds,
"AttributeDict1"
);

Expand All @@ -195,6 +198,7 @@ export const ResultsSummaryView = (props: {

const dict2Views = getNodeRunAttributes<AttributeDict2>(
props.nodeRunData.flatMap((i) => i?.attributes || []),
props.runIds,
"AttributeDict2"
);
if (dict2Views.length > 0) {
Expand All @@ -210,6 +214,7 @@ export const ResultsSummaryView = (props: {
const dagworksDescribe3Views =
getNodeRunAttributes<AttributeDagworksDescribe3>(
props.nodeRunData.flatMap((i) => i?.attributes || []),
props.runIds,
"AttributeDagworksDescribe3"
);
if (dagworksDescribe3Views.length > 0) {
Expand All @@ -225,6 +230,7 @@ export const ResultsSummaryView = (props: {

const pandasDescribe1View = getNodeRunAttributes<AttributePandasDescribe1>(
props.nodeRunData.flatMap((i) => i?.attributes || []),
props.runIds,
"AttributePandasDescribe1"
);

Expand All @@ -241,6 +247,7 @@ export const ResultsSummaryView = (props: {

const unsupportedViews = getNodeRunAttributes<AttributeUnsupported1>(
props.nodeRunData.flatMap((i) => i?.attributes || []),
props.runIds,
"AttributeUnsupported1"
);

Expand Down
7 changes: 0 additions & 7 deletions ui/frontend/src/components/dashboard/Visualize/DAGViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -971,13 +971,6 @@ const GroupedNodeComponent = (props: {
{groupName}
</span>
</div>
{/* <CollapseExpandIcon
className="font-extrabold hover:scale-110 cursor-pointer"
onClick={() => {
//eslint-disable-next-line no-debugger
toggleCollapseExpand();
}}
/> */}
</>
)}
</span>
Expand Down
5 changes: 3 additions & 2 deletions ui/frontend/src/state/api/friendlyApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,18 @@ export type DAGWorksDescribeColumn =

export function getNodeRunAttributes<T>(
allAttributes: NodeRunAttribute[],
dagRunIds: number[],
cls: keyof typeof nodeAttributeTypeMap
): { name: string; value: T; runId: number }[] {
const { version, type } = nodeAttributeTypeMap[cls];
return allAttributes
.map((item) => {
.map((item, i) => {
return {
name: item.name,
value: item.value as T,
schema_version: item.schema_version,
type: item.type,
runId: item.dag_run as number,
runId: dagRunIds[i],
};
})
.filter((attr) => attr.schema_version === version && attr.type === type);
Expand Down
Loading