From 4c6e9e5d1043cb917b93cbb9d0d80d3cb2c73e48 Mon Sep 17 00:00:00 2001 From: OwenKephart Date: Fri, 25 Oct 2024 08:56:58 -0700 Subject: [PATCH] [1.9] Replace Auto-materialize references in the UI with Automation condition (#25414) ## Summary & Motivation Just hunting down references to the deprecated terminology. Left the old global AMP page as-is, as this is a legacy concept and it might be more confusing to see it refered to using DA terminology. ## How I Tested These Changes ## Changelog NOCHANGELOG --- .../ui-components/src/components/Icon.tsx | 4 +-- ...ze_policy.svg => automation_condition.svg} | 0 .../ui-core/src/assets/AssetNodeOverview.tsx | 2 +- .../assets/AutomaterializeDaemonStatusTag.tsx | 2 +- .../AutomaterializeTagWithEvaluation.tsx | 4 +-- .../DeclarativeAutomationBanner.tsx | 25 ------------------- .../GlobalAutomaterializationContent.tsx | 4 --- .../src/automation/MergedAutomationRoot.tsx | 2 +- .../src/overview/groupRunsByAutomation.tsx | 2 +- .../ui-core/src/runs/CreatedByTag.tsx | 10 ++++---- .../packages/ui-core/src/runs/RunTag.tsx | 1 + .../ui-core/src/runs/RunsFilterInput.tsx | 6 ++--- .../src/sensors/SensorPageAutomaterialize.tsx | 4 --- .../ui-core/src/sensors/SensorRoot.tsx | 6 ----- .../src/workspace/VirtualizedSensorRow.tsx | 9 ++++--- .../dagster/dagster/_daemon/asset_daemon.py | 4 +-- .../test_asset_daemon_failure_recovery.py | 5 ++-- 17 files changed, 27 insertions(+), 63 deletions(-) rename js_modules/dagster-ui/packages/ui-components/src/icon-svgs/{auto_materialize_policy.svg => automation_condition.svg} (100%) delete mode 100644 js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/DeclarativeAutomationBanner.tsx diff --git a/js_modules/dagster-ui/packages/ui-components/src/components/Icon.tsx b/js_modules/dagster-ui/packages/ui-components/src/components/Icon.tsx index 5b5fcdab38fa3..a6493e1b087e7 100644 --- a/js_modules/dagster-ui/packages/ui-components/src/components/Icon.tsx +++ b/js_modules/dagster-ui/packages/ui-components/src/components/Icon.tsx @@ -26,9 +26,9 @@ import asset_plot from '../icon-svgs/asset_plot.svg'; import assignment from '../icon-svgs/assignment.svg'; import assignment_turned_in from '../icon-svgs/assignment_turned_in.svg'; import attach_file from '../icon-svgs/attach_file.svg'; -import auto_materialize_policy from '../icon-svgs/auto_materialize_policy.svg'; import auto_observe from '../icon-svgs/auto_observe.svg'; import automation from '../icon-svgs/automation.svg'; +import automation_condition from '../icon-svgs/automation_condition.svg'; import backfill from '../icon-svgs/backfill.svg'; import badge from '../icon-svgs/badge.svg'; import bar_chart from '../icon-svgs/bar_chart.svg'; @@ -424,7 +424,7 @@ export const Icons = { assignment, assignment_turned_in, attach_file, - auto_materialize_policy, + automation_condition, auto_observe, automation, backfill, diff --git a/js_modules/dagster-ui/packages/ui-components/src/icon-svgs/auto_materialize_policy.svg b/js_modules/dagster-ui/packages/ui-components/src/icon-svgs/automation_condition.svg similarity index 100% rename from js_modules/dagster-ui/packages/ui-components/src/icon-svgs/auto_materialize_policy.svg rename to js_modules/dagster-ui/packages/ui-components/src/icon-svgs/automation_condition.svg diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeOverview.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeOverview.tsx index 73c8a3a5edcbe..5df0bc40ec4be 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeOverview.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeOverview.tsx @@ -661,7 +661,7 @@ export const AssetNodeOverview = ({ {renderDefinitionSection()} - + {renderAutomationDetailsSection()} {cachedOrLiveAssetNode.isExecutable ? ( diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutomaterializeDaemonStatusTag.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutomaterializeDaemonStatusTag.tsx index 18ce69738d7bc..bec898d87034d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutomaterializeDaemonStatusTag.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutomaterializeDaemonStatusTag.tsx @@ -10,7 +10,7 @@ export const AutomaterializeDaemonStatusTag = () => { - Auto-materialized + Automation condition - Auto-materialized + Automation condition ); }; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/DeclarativeAutomationBanner.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/DeclarativeAutomationBanner.tsx deleted file mode 100644 index 090ca81557248..0000000000000 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/DeclarativeAutomationBanner.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import {Alert} from '@dagster-io/ui-components'; - -export const DeclarativeAutomationBanner = () => { - return ( - - Automation conditions enable a declarative approach to asset automation. Instead of - defining imperative workflows to execute your assets, you just describe the conditions - under which they should be executed.{' '} - - Learn more about declarative automation here - - . - - } - /> - ); -}; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/GlobalAutomaterializationContent.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/GlobalAutomaterializationContent.tsx index 1b76b93b41ccc..e019c90eae633 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/GlobalAutomaterializationContent.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/GlobalAutomaterializationContent.tsx @@ -12,7 +12,6 @@ import {useCallback, useMemo, useState} from 'react'; import {ASSET_DAEMON_TICKS_QUERY} from './AssetDaemonTicksQuery'; import {AutomaterializationTickDetailDialog} from './AutomaterializationTickDetailDialog'; import {AutomaterializeRunHistoryTable} from './AutomaterializeRunHistoryTable'; -import {DeclarativeAutomationBanner} from './DeclarativeAutomationBanner'; import {InstanceAutomaterializationEvaluationHistoryTable} from './InstanceAutomaterializationEvaluationHistoryTable'; import { AssetDaemonTickFragment, @@ -146,9 +145,6 @@ export const GlobalAutomaterializationContent = () => { return ( <> - - - diff --git a/js_modules/dagster-ui/packages/ui-core/src/automation/MergedAutomationRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/automation/MergedAutomationRoot.tsx index 040bc40ee03a9..78155c7ff3ca3 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/automation/MergedAutomationRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/automation/MergedAutomationRoot.tsx @@ -89,7 +89,7 @@ export const MergedAutomationRoot = () => { const automationTypeFilter = useStaticSetFilter({ name: 'Automation type', allValues: ALL_AUTOMATION_VALUES, - icon: 'auto_materialize_policy', + icon: 'automation_condition', getStringValue: (value) => value.label, state: automationFilterState, renderLabel: ({value}) => {value.label}, diff --git a/js_modules/dagster-ui/packages/ui-core/src/overview/groupRunsByAutomation.tsx b/js_modules/dagster-ui/packages/ui-core/src/overview/groupRunsByAutomation.tsx index c232ac21612e1..b07353811b852 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/overview/groupRunsByAutomation.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/overview/groupRunsByAutomation.tsx @@ -39,7 +39,7 @@ const automationName = (automation: RunAutomation | null) => { const {type} = automation; switch (type) { case 'legacy-amp': - return 'Auto-materialized'; + return 'Automation condition'; case 'schedule': case 'sensor': return automation.name; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/CreatedByTag.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/CreatedByTag.tsx index c04be6fee6509..d3295d3ef242a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/CreatedByTag.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/CreatedByTag.tsx @@ -29,7 +29,7 @@ export const CreatedByTagCellWrapper = styled(Box)``; type TagType = | { - type: 'user' | 'schedule' | 'sensor' | 'auto-materialize' | 'auto-observe'; + type: 'user' | 'schedule' | 'sensor' | 'automation-condition' | 'auto-observe'; tag: RunTagsFragment; } | {type: 'manual'}; @@ -53,11 +53,11 @@ const pluckTagFromList = (tags: RunTagsFragment[]): TagType => { const {key} = tag; switch (key) { case DagsterTag.Automaterialize: - return {type: 'auto-materialize', tag}; + return {type: 'automation-condition', tag}; case DagsterTag.CreatedBy: { // Backwards compatibility if (tag.value === 'auto_materialize') { - return {type: 'auto-materialize', tag}; + return {type: 'automation-condition', tag}; } else { continue; } @@ -105,8 +105,8 @@ export const CreatedByTag = ({repoAddress, tags, onAddTag}: Props) => { ); } - case 'auto-materialize': - return Auto-materialize policy; + case 'automation-condition': + return Automation condition; case 'auto-observe': return Auto-observation; } diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTag.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTag.tsx index 71ab7cc54f9d2..e1ca9582f8422 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTag.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTag.tsx @@ -5,6 +5,7 @@ import {Link} from 'react-router-dom'; import {TagAction, TagActionsPopover} from '../ui/TagActions'; export enum DagsterTag { + AutomationCondition = 'dagster/from_automation_condition', Automaterialize = 'dagster/auto_materialize', AutoObserve = 'dagster/auto_observe', Namespace = 'dagster/', diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFilterInput.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFilterInput.tsx index 3edaf3032ea42..729fa14616682 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFilterInput.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFilterInput.tsx @@ -499,8 +499,8 @@ export const useRunsFilterInput = ({tokens, onChange, enabledFilters}: RunsFilte } else if (value.type === DagsterTag.User) { return ; } else if (value.type === DagsterTag.Automaterialize) { - icon = ; - labelValue = 'Auto-materialize policy'; + icon = ; + labelValue = 'Automation condition'; } return ( @@ -511,7 +511,7 @@ export const useRunsFilterInput = ({tokens, onChange, enabledFilters}: RunsFilte }, getStringValue: (x) => { if (x.type === DagsterTag.Automaterialize) { - return 'Auto-materialize policy'; + return 'Automation condition'; } return x.value!; }, diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPageAutomaterialize.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPageAutomaterialize.tsx index dc2aef75abfff..747d5e3600db5 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPageAutomaterialize.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPageAutomaterialize.tsx @@ -13,7 +13,6 @@ import {useFeatureFlags} from '../app/Flags'; import {useRefreshAtInterval} from '../app/QueryRefresh'; import {AutomaterializationTickDetailDialog} from '../assets/auto-materialization/AutomaterializationTickDetailDialog'; import {AutomaterializeRunHistoryTable} from '../assets/auto-materialization/AutomaterializeRunHistoryTable'; -import {DeclarativeAutomationBanner} from '../assets/auto-materialization/DeclarativeAutomationBanner'; import {SensorAutomaterializationEvaluationHistoryTable} from '../assets/auto-materialization/SensorAutomaterializationEvaluationHistoryTable'; import {AssetDaemonTickFragment} from '../assets/auto-materialization/types/AssetDaemonTicksQuery.types'; import {InstigationTickStatus, RunsFilter} from '../graphql/types'; @@ -168,9 +167,6 @@ export const SensorPageAutomaterialize = (props: Props) => { return ( <> - - - Evaluation timeline diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorRoot.tsx index a0a3dd8068017..9075e06e96161 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorRoot.tsx @@ -17,7 +17,6 @@ import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; import {FIFTEEN_SECONDS, useMergedRefresh, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useTrackPageView} from '../app/analytics'; -import {DeclarativeAutomationBanner} from '../assets/auto-materialization/DeclarativeAutomationBanner'; import {AUTOMATION_ASSET_SELECTION_FRAGMENT} from '../automation/AutomationAssetSelectionFragment'; import {InstigationTickStatus, SensorType} from '../graphql/types'; import {useDocumentTitle} from '../hooks/useDocumentTitle'; @@ -156,11 +155,6 @@ export const SensorRoot = ({repoAddress}: {repoAddress: RepoAddress}) => { sensorDaemonStatus={sensorDaemonStatus} padding={{vertical: 16, horizontal: 24}} /> - {isAutomationSensor && ( - - - - )}