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

[1.9] Replace Auto-materialize references in the UI with Automation condition #25414

Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -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';
Expand Down Expand Up @@ -424,7 +424,7 @@ export const Icons = {
assignment,
assignment_turned_in,
attach_file,
auto_materialize_policy,
automation_condition,
auto_observe,
automation,
backfill,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ export const AssetNodeOverview = ({
<LargeCollapsibleSection header="Definition" icon="info">
{renderDefinitionSection()}
</LargeCollapsibleSection>
<LargeCollapsibleSection header="Automation details" icon="auto_materialize_policy">
<LargeCollapsibleSection header="Automation details" icon="automation_condition">
{renderAutomationDetailsSection()}
</LargeCollapsibleSection>
{cachedOrLiveAssetNode.isExecutable ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const AutomaterializeDaemonStatusTag = () => {
<Tooltip
content={
paused
? 'Auto-materializing is paused. New materializations will not be triggered by auto-materialization policies.'
? 'Automation condition evaluation is paused. New materializations will not be triggered by automation conditions.'
: ''
}
canShow={paused}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const AutomaterializeTagWithEvaluation = ({assetKeys, evaluationId}: Prop
content={
<div style={{width: '340px'}}>
<Box padding={{vertical: 8, horizontal: 12}} border="bottom" style={{fontWeight: 600}}>
Auto-materialized
Automation condition
</Box>
<Box
flex={{direction: 'column', gap: 12}}
Expand Down Expand Up @@ -65,7 +65,7 @@ export const AutomaterializeTagWithEvaluation = ({assetKeys, evaluationId}: Prop
}
interactionKind="hover"
>
<Tag icon="auto_materialize_policy">Auto-materialized</Tag>
<Tag icon="automation_condition">Automation condition</Tag>
</Popover>
);
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -146,9 +145,6 @@ export const GlobalAutomaterializationContent = () => {

return (
<>
<Box padding={{vertical: 12, horizontal: 24}}>
<DeclarativeAutomationBanner />
</Box>
<Table>
<tbody>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}) => <span>{value.label}</span>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions js_modules/dagster-ui/packages/ui-core/src/runs/CreatedByTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'};
Expand All @@ -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;
}
Expand Down Expand Up @@ -105,8 +105,8 @@ export const CreatedByTag = ({repoAddress, tags, onAddTag}: Props) => {
</Tag>
);
}
case 'auto-materialize':
return <Tag icon="auto_materialize_policy">Auto-materialize policy</Tag>;
case 'automation-condition':
return <Tag icon="automation_condition">Automation condition</Tag>;
case 'auto-observe':
return <Tag icon="auto_observe">Auto-observation</Tag>;
}
Expand Down
1 change: 1 addition & 0 deletions js_modules/dagster-ui/packages/ui-core/src/runs/RunTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,8 @@ export const useRunsFilterInput = ({tokens, onChange, enabledFilters}: RunsFilte
} else if (value.type === DagsterTag.User) {
return <UserDisplay email={value.value!} isFilter />;
} else if (value.type === DagsterTag.Automaterialize) {
icon = <Icon name="auto_materialize_policy" />;
labelValue = 'Auto-materialize policy';
icon = <Icon name="automation_condition" />;
labelValue = 'Automation condition';
}
return (
<Box flex={{direction: 'row', gap: 4, alignItems: 'center'}}>
Expand All @@ -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!;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -168,9 +167,6 @@ export const SensorPageAutomaterialize = (props: Props) => {

return (
<>
<Box padding={{vertical: 12, horizontal: 24}}>
<DeclarativeAutomationBanner />
</Box>
<SensorInfo assetDaemonHealth={daemonStatus} padding={{vertical: 16, horizontal: 24}} />
<Box padding={{vertical: 12, horizontal: 24}} border="bottom">
<Subtitle2>Evaluation timeline</Subtitle2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -156,11 +155,6 @@ export const SensorRoot = ({repoAddress}: {repoAddress: RepoAddress}) => {
sensorDaemonStatus={sensorDaemonStatus}
padding={{vertical: 16, horizontal: 24}}
/>
{isAutomationSensor && (
<Box padding={{vertical: 12, horizontal: 24}}>
<DeclarativeAutomationBanner />
</Box>
)}
<TickHistoryTimeline
tickResultType={tickResultType}
repoAddress={repoAddress}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,15 @@ export const SENSOR_TYPE_META: Record<
},
[SensorType.AUTO_MATERIALIZE]: {
name: 'Automation condition sensor',
icon: 'auto_materialize_policy',
icon: 'automation_condition',
description:
'Auto-materialize sensors trigger runs based on auto-materialize policies defined on assets.',
'Automation condition sensors trigger runs based on conditions defined on assets or checks.',
},
[SensorType.AUTOMATION]: {
name: 'Automation condition sensor',
icon: 'auto_materialize_policy',
description: 'Automation sensors trigger runs based on conditions defined on assets.',
icon: 'automation_condition',
description:
'Automation condition sensors trigger runs based on conditions defined on assets or checks.',
},
[SensorType.FRESHNESS_POLICY]: {
name: 'Freshness policy sensor',
Expand Down
4 changes: 2 additions & 2 deletions python_modules/dagster/dagster/_daemon/asset_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def __exit__(
):
try:
raise Exception(
"Unable to reach the code server. Auto-materialization will resume once the code server is available."
"Unable to reach the code server. Automation condition evaluation will resume once the code server is available."
) from exception_value
except:
error_data = DaemonErrorCapture.on_exception(sys.exc_info())
Expand Down Expand Up @@ -853,7 +853,7 @@ def _process_auto_materialize_tick_generator(
error_info = DaemonErrorCapture.on_exception(
exc_info=sys.exc_info(),
logger=self._logger,
log_message="Auto-materialize daemon caught an error",
log_message="Automation condition daemon caught an error",
)

yield error_info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,9 @@ def test_error_loop_after_cursor_written(daemon_not_paused_instance, crash_locat
assert ticks[0].tick_data.failure_count == 0

assert "WHERE IS THE CODE" in str(ticks[0].tick_data.error)
assert "Auto-materialization will resume once the code server is available" in str(
ticks[0].tick_data.error
assert (
"Automation condition evaluation will resume once the code server is available"
in str(ticks[0].tick_data.error)
)

# Run requests are still on the tick since they were stored there before the
Expand Down
Loading