diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx index cdb6002e5e63f..3bd476ed9f0b9 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx @@ -243,6 +243,7 @@ const Header = ({assetNode, repoAddress}: HeaderProps) => { ); }; + const AssetCatalogLink = styled(Link)` display: flex; gap: 4px; @@ -264,13 +265,6 @@ const SIDEBAR_ASSET_FRAGMENT = gql` cronSchedule cronScheduleTimezone } - autoMaterializePolicy { - rules { - className - decisionType - description - } - } backfillPolicy { description } diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__stories__/SidebarAssetInfo.stories.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__stories__/SidebarAssetInfo.stories.tsx index 2e088346ccf29..a0d8a02c85fba 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__stories__/SidebarAssetInfo.stories.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__stories__/SidebarAssetInfo.stories.tsx @@ -8,11 +8,8 @@ import {AssetEventsQuery} from '../../assets/types/useRecentAssetEvents.types'; import {ASSET_EVENTS_QUERY} from '../../assets/useRecentAssetEvents'; import { AssetNode, - AutoMaterializeDecisionType, RunStatus, buildAssetNode, - buildAutoMaterializePolicy, - buildAutoMaterializeRule, buildCompositeConfigType, buildFreshnessPolicy, buildRegularDagsterType, @@ -278,18 +275,6 @@ export const AssetWithPolicies = () => { buildEventsMock({reported: false}), buildPartitionHealthMock(MockAssetKey.path[0]!), buildSidebarQueryMock({ - autoMaterializePolicy: buildAutoMaterializePolicy({ - rules: [ - buildAutoMaterializeRule({ - decisionType: AutoMaterializeDecisionType.MATERIALIZE, - description: 'Rule 1', - }), - buildAutoMaterializeRule({ - decisionType: AutoMaterializeDecisionType.SKIP, - description: 'Skip Rule 1', - }), - ], - }), freshnessPolicy: buildFreshnessPolicy({ maximumLagMinutes: 60, cronSchedule: '* 1 1 1 1', diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/SidebarAssetInfo.types.ts b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/SidebarAssetInfo.types.ts index a915501726ef6..9da350a4397a7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/SidebarAssetInfo.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/SidebarAssetInfo.types.ts @@ -160,15 +160,6 @@ export type SidebarAssetFragment = { cronSchedule: string | null; cronScheduleTimezone: string | null; } | null; - autoMaterializePolicy: { - __typename: 'AutoMaterializePolicy'; - rules: Array<{ - __typename: 'AutoMaterializeRule'; - className: string; - decisionType: Types.AutoMaterializeDecisionType; - description: string; - }>; - } | null; backfillPolicy: {__typename: 'BackfillPolicy'; description: string} | null; partitionDefinition: {__typename: 'PartitionDefinition'; description: string} | null; assetKey: {__typename: 'AssetKey'; path: Array}; @@ -16284,15 +16275,6 @@ export type SidebarAssetQuery = { cronSchedule: string | null; cronScheduleTimezone: string | null; } | null; - autoMaterializePolicy: { - __typename: 'AutoMaterializePolicy'; - rules: Array<{ - __typename: 'AutoMaterializeRule'; - className: string; - decisionType: Types.AutoMaterializeDecisionType; - description: string; - }>; - } | null; backfillPolicy: {__typename: 'BackfillPolicy'; description: string} | null; partitionDefinition: {__typename: 'PartitionDefinition'; description: string} | null; assetKey: {__typename: 'AssetKey'; path: Array}; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetSidebarActivitySummary.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetSidebarActivitySummary.tsx index 722348e06d331..e1d043a79d578 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetSidebarActivitySummary.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetSidebarActivitySummary.tsx @@ -1,4 +1,4 @@ -import {Body, Box, Colors, Icon, MiddleTruncate, Spinner} from '@dagster-io/ui-components'; +import {Body, Box, Colors, MiddleTruncate, Spinner} from '@dagster-io/ui-components'; import {useEffect} from 'react'; import {Link} from 'react-router-dom'; @@ -69,20 +69,6 @@ export const AssetSidebarActivitySummary = ({ )} - {asset.autoMaterializePolicy && ( - - - - View automation history - - - - - )} - {asset.backfillPolicy && ( diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutoMaterializeExperimentalBanner.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutoMaterializeExperimentalBanner.tsx index 3e81f920642c0..00900219ae5d8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutoMaterializeExperimentalBanner.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutoMaterializeExperimentalBanner.tsx @@ -1,8 +1,8 @@ -import {Alert, Box, Colors, Icon, Tag, Tooltip} from '@dagster-io/ui-components'; +import {Alert, Box, Colors, Icon} from '@dagster-io/ui-components'; import {useStateWithStorage} from '../../hooks/useStateWithStorage'; -const LearnMoreLink = +const LEARN_MORE_LINK = 'https://docs.dagster.io/concepts/assets/asset-auto-execution#auto-materializing-assets-'; export const AutoMaterializeExperimentalBanner = () => { @@ -14,7 +14,7 @@ export const AutoMaterializeExperimentalBanner = () => { } onClose={() => { setClosed(true); @@ -22,7 +22,7 @@ export const AutoMaterializeExperimentalBanner = () => { description={ You can learn more about this new feature and provide feedback{' '} - + here . @@ -32,13 +32,3 @@ export const AutoMaterializeExperimentalBanner = () => { ); }; - -export const AutoMaterializeExperimentalTag = () => { - return ( - - - Experimental - - - ); -}; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanel.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanel.tsx index a6f6991cc3541..53b0a3c9902d4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanel.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanel.tsx @@ -173,8 +173,8 @@ export const AutomaterializeMiddlePanel = (props: Props) => { Manage sensor - - Learn more about automation policies + + Learn more about declarative automation 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 new file mode 100644 index 0000000000000..3e22697d6e8eb --- /dev/null +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/DeclarativeAutomationBanner.tsx @@ -0,0 +1,25 @@ +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 ae45a76f176cd..82f33ff07ba1b 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 @@ -1,10 +1,11 @@ import {useLazyQuery} from '@apollo/client'; -import {Alert, Box, Checkbox, Colors, Spinner, Subtitle2, Table} from '@dagster-io/ui-components'; +import {Box, Checkbox, Colors, Spinner, Subtitle2, Table} from '@dagster-io/ui-components'; 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, @@ -122,26 +123,8 @@ export const GlobalAutomaterializationContent = () => { return ( <> - - - Auto-materialization enables a declarative approach to asset scheduling – instead of - defining imperative workflows to materialize your assets, you just describe the - conditions under which they should be materialized.{' '} - - Learn more about auto-materialization here - - . - - } - /> + + diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/DaemonList.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/DaemonList.tsx index aa35fb1e6a075..e50e3de5148f3 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/DaemonList.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/DaemonList.tsx @@ -7,7 +7,6 @@ import {useConfirmation} from '../app/CustomConfirmationProvider'; import {useUnscopedPermissions} from '../app/Permissions'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {Timestamp} from '../app/time/Timestamp'; -import {AutoMaterializeExperimentalTag} from '../assets/AutoMaterializePolicyPage/AutoMaterializeExperimentalBanner'; import {useAutoMaterializeSensorFlag} from '../assets/AutoMaterializeSensorFlag'; import {useAutomaterializeDaemonStatus} from '../assets/useAutomaterializeDaemonStatus'; import {testId} from '../testing/testId'; @@ -65,19 +64,19 @@ export const DaemonList = ({daemonStatuses, showTimestampColumn = true}: Props) - {assetDaemon ? ( + {assetDaemon && hasGlobalAMP ? (
Auto-materializing - + Experimental {automaterialize.loading ? (
- ) : hasGlobalAMP ? ( + ) : ( - ) : null} + )}
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 324e78c55bf05..df979615b1ae2 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 @@ -1,5 +1,5 @@ import {useLazyQuery} from '@apollo/client'; -import {Alert, Box, Colors, Spinner, Subtitle2} from '@dagster-io/ui-components'; +import {Box, Colors, Spinner, Subtitle2} from '@dagster-io/ui-components'; import {useCallback, useMemo, useState} from 'react'; import {ASSET_SENSOR_TICKS_QUERY} from './AssetSensorTicksQuery'; @@ -12,6 +12,7 @@ import {SensorFragment} from './types/SensorFragment.types'; 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} from '../graphql/types'; @@ -151,26 +152,8 @@ export const SensorPageAutomaterialize = (props: Props) => { return ( <> - - - Auto-materialization enables a declarative approach to asset scheduling – instead of - defining imperative workflows to materialize your assets, you just describe the - conditions under which they should be materialized.{' '} - - Learn more about auto-materialization here - - . - - } - /> + +