Skip to content

Commit

Permalink
Add ASSET_MATERIALIZATION_FAILURE event
Browse files Browse the repository at this point in the history
  • Loading branch information
gibsondan committed Aug 8, 2024
1 parent 987bc4d commit 3c9fe09
Show file tree
Hide file tree
Showing 20 changed files with 350 additions and 48 deletions.

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

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions js_modules/dagster-ui/packages/ui-core/src/graphql/schema.graphql

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

46 changes: 46 additions & 0 deletions js_modules/dagster-ui/packages/ui-core/src/graphql/types.ts

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 @@ -152,6 +152,7 @@ export const LogsRowStructuredContent = ({node, metadata}: IStructuredContentPro
/>
);
case 'AssetMaterializationPlannedEvent':
case 'AssetMaterializationFailureEvent':
return <DefaultContent eventType={eventType} message={node.message} />;
case 'ObjectStoreOperationEvent':
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import {weakmapMemoize} from '../app/Util';

export function filterLogs(logs: LogsProviderLogs, filter: LogFilter, filterStepKeys: string[]) {
const filteredNodes = logs.allNodes.filter((node) => {
// These events are used to determine which assets a run will materialize and are not intended
// These events are used for internal bookkeeping and are not intended
// to be displayed in the Dagster UI. Pagination is offset based, so we remove these logs client-side.
if (
node.__typename === 'AssetMaterializationPlannedEvent' ||
node.__typename === 'AssetCheckEvaluationPlannedEvent'
node.__typename === 'AssetCheckEvaluationPlannedEvent' ||
node.__typename === 'AssetMaterializationFailureEvent'
) {
return false;
}
Expand Down

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

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

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

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

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 @@ -222,6 +222,7 @@ def from_dagster_event_record(event_record: EventLogEntry, pipeline_name: str) -
GrapheneAlertSuccessEvent,
GrapheneAssetCheckEvaluationEvent,
GrapheneAssetCheckEvaluationPlannedEvent,
GrapheneAssetMaterializationFailureEvent,
GrapheneAssetMaterializationPlannedEvent,
GrapheneEngineEvent,
GrapheneExecutionStepFailureEvent,
Expand Down Expand Up @@ -303,6 +304,8 @@ def from_dagster_event_record(event_record: EventLogEntry, pipeline_name: str) -
)
elif dagster_event.event_type == DagsterEventType.ASSET_MATERIALIZATION_PLANNED:
return GrapheneAssetMaterializationPlannedEvent(event=event_record)
elif dagster_event.event_type == DagsterEventType.ASSET_MATERIALIZATION_FAILURE:
return GrapheneAssetMaterializationFailureEvent(event=event_record)
elif dagster_event.event_type == DagsterEventType.STEP_EXPECTATION_RESULT:
data = cast(StepExpectationResultData, dagster_event.event_specific_data)
return GrapheneStepExpectationResultEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,20 @@ def __init__(self, event):
)


class GrapheneAssetMaterializationFailureEvent(graphene.ObjectType):
assetKey = graphene.Field(GrapheneAssetKey)

class Meta:
name = "AssetMaterializationFailureEvent"
interfaces = (GrapheneMessageEvent, GrapheneRunEvent)

def __init__(self, event: EventLogEntry):
self._event = event

def resolve_assetKey(self, _graphene_info: ResolveInfo):
return self._event.get_dagster_event().asset_materialization_failure_data.asset_key


class GrapheneAssetMaterializationPlannedEvent(graphene.ObjectType):
assetKey = graphene.Field(GrapheneAssetKey)
runOrError = graphene.NonNull("dagster_graphql.schema.pipelines.pipeline.GrapheneRunOrError")
Expand Down Expand Up @@ -586,6 +600,7 @@ class Meta:
GrapheneAlertSuccessEvent,
GrapheneAlertFailureEvent,
GrapheneAssetMaterializationPlannedEvent,
GrapheneAssetMaterializationFailureEvent,
GrapheneAssetCheckEvaluationPlannedEvent,
GrapheneAssetCheckEvaluationEvent,
)
Expand Down
Loading

0 comments on commit 3c9fe09

Please sign in to comment.